We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a34e899 commit 5fc6cfbCopy full SHA for 5fc6cfb
aws-opentelemetry-distro/src/amazon/opentelemetry/distro/aws_opentelemetry_configurator.py
@@ -446,8 +446,17 @@ def _is_lambda_environment():
446
447
448
def _is_otlp_endpoint_cloudwatch():
449
+ # Detects if it's the OTLP endpoint in CloudWatchs
450
otlp_endpoint = os.environ.get(OTEL_EXPORTER_OTLP_TRACES_ENDPOINT)
- return otlp_endpoint and "xray." in otlp_endpoint.lower() and ".amazonaws.com" in otlp_endpoint.lower()
451
+ if not otlp_endpoint:
452
+ return False
453
+
454
+ endpoint_lower = otlp_endpoint.lower()
455
456
+ has_xray = "xray." in endpoint_lower
457
+ has_amazonaws = ".amazonaws.com" in endpoint_lower
458
459
+ return has_xray and has_amazonaws
460
461
462
def _get_metric_export_interval():
0 commit comments