Skip to content

Commit bb64640

Browse files
committed
Remove gRPC dependency for Docker
1 parent 6bab9db commit bb64640

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-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: 4 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,10 @@ def create_exporter(self):
302301
endpoint=application_signals_endpoint, preferred_temporality=temporality_dict
303302
)
304303
if protocol == "grpc":
304+
from opentelemetry.exporter.otlp.proto.grpc.metric_exporter import (
305+
OTLPMetricExporter as OTLPGrpcOTLPMetricExporter,
306+
)
307+
305308
return OTLPGrpcOTLPMetricExporter(
306309
endpoint=application_signals_endpoint, preferred_temporality=temporality_dict
307310
)

0 commit comments

Comments
 (0)