diff --git a/plugins/processors/awsapplicationsignals/common/types.go b/plugins/processors/awsapplicationsignals/common/types.go index 66fd86ae37..120dd574ed 100644 --- a/plugins/processors/awsapplicationsignals/common/types.go +++ b/plugins/processors/awsapplicationsignals/common/types.go @@ -12,7 +12,6 @@ const ( MetricAttributeRemoteOperation = "RemoteOperation" MetricAttributeRemoteResourceIdentifier = "RemoteResourceIdentifier" MetricAttributeRemoteResourceType = "RemoteResourceType" - MetricAttributeRemoteDbUser = "RemoteDbUser" ) const ( @@ -23,6 +22,7 @@ const ( AttributeEC2InstanceId = "EC2.InstanceId" AttributeHost = "Host" AttributePlatformType = "PlatformType" + AttributeRemoteDbUser = "RemoteDbUser" AttributeTelemetrySDK = "Telemetry.SDK" AttributeTelemetryAgent = "Telemetry.Agent" AttributeTelemetrySource = "Telemetry.Source" diff --git a/plugins/processors/awsapplicationsignals/internal/normalizer/attributesnormalizer.go b/plugins/processors/awsapplicationsignals/internal/normalizer/attributesnormalizer.go index d5f98f67e6..4ee81cded7 100644 --- a/plugins/processors/awsapplicationsignals/internal/normalizer/attributesnormalizer.go +++ b/plugins/processors/awsapplicationsignals/internal/normalizer/attributesnormalizer.go @@ -30,6 +30,10 @@ type attributesNormalizer struct { logger *zap.Logger } +var attributesRenaming = map[string]string{ + attr.AWSRemoteDbUser: common.AttributeRemoteDbUser, +} + var attributesRenamingForMetric = map[string]string{ attr.AWSLocalService: common.MetricAttributeLocalService, attr.AWSLocalOperation: common.MetricAttributeLocalOperation, @@ -40,7 +44,6 @@ var attributesRenamingForMetric = map[string]string{ attr.AWSRemoteTarget: common.MetricAttributeRemoteResourceIdentifier, attr.AWSRemoteResourceIdentifier: common.MetricAttributeRemoteResourceIdentifier, attr.AWSRemoteResourceType: common.MetricAttributeRemoteResourceType, - attr.AWSRemoteDbUser: common.MetricAttributeRemoteDbUser, } var resourceAttributesRenamingForTrace = map[string]string{ @@ -98,6 +101,7 @@ func (n *attributesNormalizer) renameAttributes(attributes, resourceAttributes p rename(resourceAttributes, resourceAttributesRenamingForTrace) rename(attributes, attributesRenamingForTrace) } else { + rename(attributes, attributesRenaming) rename(attributes, attributesRenamingForMetric) } }