Skip to content

Commit b1bad4e

Browse files
authored
Remove gRPC dependency for Docker - temporary (#168)
Temporary PR, will be reverted, merging to quickly test E2E on main build. By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
1 parent 6bab9db commit b1bad4e

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

.github/workflows/main_build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
branches:
66
- main
77
- "release/v*"
8+
pull_request:
9+
branches:
10+
- main
11+
812
env:
913
AWS_DEFAULT_REGION: us-east-1
1014
STAGING_ECR_REGISTRY: 637423224110.dkr.ecr.us-east-1.amazonaws.com

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ WORKDIR /operator-build
1616
ADD aws-opentelemetry-distro/ ./aws-opentelemetry-distro/
1717

1818
RUN mkdir workspace && pip install --target workspace ./aws-opentelemetry-distro
19+
RUN pip uninstall opentelemetry-exporter-otlp-proto-grpc -y
20+
RUN pip uninstall grpcio -y
1921

2022
FROM public.ecr.aws/amazonlinux/amazonlinux:minimal
2123

aws-opentelemetry-distro/src/amazon/opentelemetry/distro/aws_opentelemetry_configurator.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
)
1818
from amazon.opentelemetry.distro.aws_span_metrics_processor_builder import AwsSpanMetricsProcessorBuilder
1919
from amazon.opentelemetry.distro.sampler.aws_xray_remote_sampler import AwsXRayRemoteSampler
20-
from opentelemetry.exporter.otlp.proto.grpc.metric_exporter import OTLPMetricExporter as OTLPGrpcOTLPMetricExporter
2120
from opentelemetry.exporter.otlp.proto.http.metric_exporter import OTLPMetricExporter as OTLPHttpOTLPMetricExporter
2221
from opentelemetry.sdk._configuration import (
2322
_get_exporter_names,
@@ -302,6 +301,12 @@ def create_exporter(self):
302301
endpoint=application_signals_endpoint, preferred_temporality=temporality_dict
303302
)
304303
if protocol == "grpc":
304+
# pylint: disable=import-outside-toplevel
305+
# Delay import to only occur if grpc required.
306+
from opentelemetry.exporter.otlp.proto.grpc.metric_exporter import (
307+
OTLPMetricExporter as OTLPGrpcOTLPMetricExporter,
308+
)
309+
305310
return OTLPGrpcOTLPMetricExporter(
306311
endpoint=application_signals_endpoint, preferred_temporality=temporality_dict
307312
)

0 commit comments

Comments
 (0)