48
48
from opentelemetry .semconv .resource import ResourceAttributes
49
49
from opentelemetry .trace import set_tracer_provider
50
50
51
- OTEL_SMP_ENABLED = "OTEL_SMP_ENABLED "
51
+ OTEL_AWS_APP_SIGNALS_ENABLED = "OTEL_AWS_APP_SIGNALS_ENABLED "
52
52
OTEL_METRIC_EXPORT_INTERVAL = "OTEL_METRIC_EXPORT_INTERVAL"
53
- OTEL_AWS_SMP_EXPORTER_ENDPOINT = "OTEL_AWS_SMP_EXPORTER_ENDPOINT "
53
+ OTEL_AWS_APP_SIGNALS_EXPORTER_ENDPOINT = "OTEL_AWS_APP_SIGNALS_EXPORTER_ENDPOINT "
54
54
DEFAULT_METRIC_EXPORT_INTERVAL = 60000.0
55
55
56
56
_logger : Logger = getLogger (__name__ )
@@ -65,7 +65,7 @@ class AwsOpenTelemetryConfigurator(_OTelSDKConfigurator):
65
65
- Add AttributePropagatingSpanProcessor to propagate span attributes from parent to child spans.
66
66
- Add AwsMetricAttributesSpanExporter to add more attributes to all spans.
67
67
68
- You can control when these customizations are applied using the environment variable OTEL_SMP_ENABLED .
68
+ You can control when these customizations are applied using the environment variable OTEL_AWS_APP_SIGNALS_ENABLED .
69
69
This flag is disabled by default.
70
70
"""
71
71
@@ -169,7 +169,7 @@ def _customize_span_processors(provider: TracerProvider, resource: Resource) ->
169
169
]:
170
170
temporality_dict [typ ] = AggregationTemporality .DELTA
171
171
_logger .info ("Span Metrics Processor enabled" )
172
- smp_endpoint = os .environ .get (OTEL_AWS_SMP_EXPORTER_ENDPOINT , "http://cloudwatch-agent.amazon-cloudwatch:4317 " )
172
+ smp_endpoint = os .environ .get (OTEL_AWS_APP_SIGNALS_EXPORTER_ENDPOINT , "http://localhost:4315 " )
173
173
otel_metric_exporter = OTLPMetricExporter (endpoint = smp_endpoint , preferred_temporality = temporality_dict )
174
174
export_interval_millis = float (os .environ .get (OTEL_METRIC_EXPORT_INTERVAL , DEFAULT_METRIC_EXPORT_INTERVAL ))
175
175
_logger .debug ("Span Metrics endpoint: %s" , smp_endpoint )
@@ -189,4 +189,4 @@ def _customize_span_processors(provider: TracerProvider, resource: Resource) ->
189
189
190
190
191
191
def is_smp_enabled ():
192
- return os .environ .get (OTEL_SMP_ENABLED , False )
192
+ return os .environ .get (OTEL_AWS_APP_SIGNALS_ENABLED , False )
0 commit comments