File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
aws-distro-opentelemetry-node-autoinstrumentation/src Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -417,13 +417,13 @@ export class AwsMetricAttributeGenerator implements MetricAttributeGenerator {
417417 // This addresses a Lambda topology issue in Application Signals.
418418 // More context in PR: https://github.com/aws-observability/aws-otel-python-instrumentation/pull/319
419419 //
420- // NOTE: The env vars LAMBDA_APPLICATION_SIGNALS_REMOTE_SERVICE and
421- // LAMBDA_APPLICATION_SIGNALS_REMOTE_ENVIRONMENT were introduced as part of this fix.
422- // They are optional and allow users to override the default values if needed.
420+ // NOTE: The env var LAMBDA_APPLICATION_SIGNALS_REMOTE_ENVIRONMENT was introduced as part of this fix.
421+ // It is optional and allow users to override the default value if needed.
423422 if ( AwsMetricAttributeGenerator . getRemoteOperation ( span , SEMATTRS_RPC_METHOD ) === 'Invoke' ) {
424- attributes [ AWS_ATTRIBUTE_KEYS . AWS_REMOTE_SERVICE ] =
425- process . env . LAMBDA_APPLICATION_SIGNALS_REMOTE_SERVICE ||
426- span . attributes [ AWS_ATTRIBUTE_KEYS . AWS_LAMBDA_FUNCTION_NAME ] ;
423+ attributes [ AWS_ATTRIBUTE_KEYS . AWS_REMOTE_SERVICE ] = AwsMetricAttributeGenerator . escapeDelimiters (
424+ span . attributes [ AWS_ATTRIBUTE_KEYS . AWS_LAMBDA_FUNCTION_NAME ]
425+ ) ;
426+
427427 attributes [ AWS_ATTRIBUTE_KEYS . AWS_REMOTE_ENVIRONMENT ] = `lambda:${
428428 process . env . LAMBDA_APPLICATION_SIGNALS_REMOTE_ENVIRONMENT || 'default'
429429 } `;
You can’t perform that action at this time.
0 commit comments