diff --git a/plugins/processors/awsapplicationsignals/internal/normalizer/attributesnormalizer.go b/plugins/processors/awsapplicationsignals/internal/normalizer/attributesnormalizer.go index 4c60eb484f..bb21003ddb 100644 --- a/plugins/processors/awsapplicationsignals/internal/normalizer/attributesnormalizer.go +++ b/plugins/processors/awsapplicationsignals/internal/normalizer/attributesnormalizer.go @@ -121,8 +121,8 @@ func (n *attributesNormalizer) copyResourceAttributesToAttributes(attributes, re } } } - // runtime metrics do not have service attribute, so need to manually add - if serviceAttribute, ok := resourceAttributes.Get("aws.local.service"); ok { + // Runtime metrics do not have service attribute, so need to manually add + if serviceAttribute, ok := resourceAttributes.Get(attr.AWSLocalService); ok { attributes.PutStr(attr.AWSLocalService, serviceAttribute.AsString()) } } diff --git a/plugins/processors/awsapplicationsignals/internal/prune/metric_pruner.go b/plugins/processors/awsapplicationsignals/internal/prune/metric_pruner.go index 4ddc2e9b2c..d0a8962ab3 100644 --- a/plugins/processors/awsapplicationsignals/internal/prune/metric_pruner.go +++ b/plugins/processors/awsapplicationsignals/internal/prune/metric_pruner.go @@ -22,7 +22,7 @@ func (p *MetricPruner) ShouldBeDropped(attributes pcommon.Map) (bool, error) { } } if _, ok := attributes.Get(common.MetricAttributeTelemetrySource); !ok { - return true, errors.New("metric must contain Telemetry.Source") + return true, errors.New("Metric must contain Telemetry.Source.") } } return false, nil