|
63 | 63 | APPLICATION_SIGNALS_EXPORTER_ENDPOINT_CONFIG = "OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT"
|
64 | 64 | METRIC_EXPORT_INTERVAL_CONFIG = "OTEL_METRIC_EXPORT_INTERVAL"
|
65 | 65 | DEFAULT_METRIC_EXPORT_INTERVAL = 60000.0
|
66 |
| -AWS_LAMBDA_FUNCTION_NAME_ENV_VAR = "AWS_LAMBDA_FUNCTION_NAME" |
| 66 | +AWS_LAMBDA_FUNCTION_NAME_CONFIG = "AWS_LAMBDA_FUNCTION_NAME" |
| 67 | +AWS_XRAY_DAEMON_ADDRESS_CONFIG = "AWS_XRAY_DAEMON_ADDRESS" |
67 | 68 |
|
68 | 69 | _logger: Logger = getLogger(__name__)
|
69 | 70 |
|
@@ -268,7 +269,7 @@ def _is_application_signals_enabled():
|
268 | 269 |
|
269 | 270 | def _is_lambda_environment():
|
270 | 271 | # detect if running in AWS Lambda environment
|
271 |
| - return AWS_LAMBDA_FUNCTION_NAME_ENV_VAR in os.environ |
| 272 | + return AWS_LAMBDA_FUNCTION_NAME_CONFIG in os.environ |
272 | 273 |
|
273 | 274 |
|
274 | 275 | class ApplicationSignalsExporterProvider:
|
@@ -300,7 +301,8 @@ def create_exporter(self):
|
300 | 301 |
|
301 | 302 | if _is_lambda_environment():
|
302 | 303 | # When running in Lambda, export Application Signals metrics over UDP
|
303 |
| - return OtlpUdpMetricExporter(endpoint="127.0.0.1:2000", preferred_temporality=temporality_dict) |
| 304 | + application_signals_endpoint = os.environ.get(AWS_XRAY_DAEMON_ADDRESS_CONFIG, "127.0.0.1:2000") |
| 305 | + return OtlpUdpMetricExporter(endpoint=application_signals_endpoint, preferred_temporality=temporality_dict) |
304 | 306 |
|
305 | 307 | if protocol == "http/protobuf":
|
306 | 308 | application_signals_endpoint = os.environ.get(
|
|
0 commit comments