File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
aws-distro-opentelemetry-node-autoinstrumentation/src Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -501,17 +501,14 @@ export class AwsMetricAttributeGenerator implements MetricAttributeGenerator {
501501 remoteResourceIdentifier = AwsMetricAttributeGenerator . getDbConnection ( span ) ;
502502 }
503503
504+ if ( cloudFormationIdentifier === undefined ) {
505+ cloudFormationIdentifier = remoteResourceIdentifier ;
506+ }
507+
504508 if ( remoteResourceType !== undefined && remoteResourceIdentifier !== undefined ) {
505509 attributes [ AWS_ATTRIBUTE_KEYS . AWS_REMOTE_RESOURCE_TYPE ] = remoteResourceType ;
506510 attributes [ AWS_ATTRIBUTE_KEYS . AWS_REMOTE_RESOURCE_IDENTIFIER ] = remoteResourceIdentifier ;
507-
508- if ( AwsSpanProcessingUtil . isAwsSDKSpan ( span ) ) {
509- if ( cloudFormationIdentifier === undefined ) {
510- cloudFormationIdentifier = remoteResourceIdentifier ;
511- }
512-
513- attributes [ AWS_ATTRIBUTE_KEYS . AWS_CLOUDFORMATION_PRIMARY_IDENTIFIER ] = cloudFormationIdentifier ;
514- }
511+ attributes [ AWS_ATTRIBUTE_KEYS . AWS_CLOUDFORMATION_PRIMARY_IDENTIFIER ] = cloudFormationIdentifier ;
515512 }
516513 }
517514
You can’t perform that action at this time.
0 commit comments