From 58047684a7d605c1be229f03d26c0a7655bb8ffe Mon Sep 17 00:00:00 2001 From: Michele Mancioppi Date: Wed, 17 Aug 2022 12:51:55 +0200 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Anthony Mirabella --- detectors/aws/ecs/ecs.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/detectors/aws/ecs/ecs.go b/detectors/aws/ecs/ecs.go index 46186f7bf9e..8edb2abbd73 100644 --- a/detectors/aws/ecs/ecs.go +++ b/detectors/aws/ecs/ecs.go @@ -168,10 +168,8 @@ func (detector *resourceDetector) getLogsAttributes(metadata *ecsmetadata.Contai awsAccount := r.FindStringSubmatch(containerArn)[1] return []attribute.KeyValue{ - semconv.AWSLogGroupNamesKey.String(logsOptions.AwsLogsGroup), - semconv.AWSLogGroupARNsKey.String(fmt.Sprintf("arn:aws:logs:%s:%s:log-group:%s:*", logsRegion, awsAccount, logsOptions.AwsLogsGroup)), - semconv.AWSLogStreamNamesKey.String(logsOptions.AwsLogsStream), - semconv.AWSLogStreamARNsKey.String(fmt.Sprintf("arn:aws:logs:%s:%s:log-group:%s:log-stream:%s", logsRegion, awsAccount, logsOptions.AwsLogsGroup, logsOptions.AwsLogsStream)), + semconv.AWSLogGroupARNsKey.StringSlice([]string{fmt.Sprintf("arn:aws:logs:%s:%s:log-group:%s:*", logsRegion, awsAccount, logsOptions.AwsLogsGroup)}), + semconv.AWSLogStreamARNsKey.StringSlice([]string{fmt.Sprintf("arn:aws:logs:%s:%s:log-group:%s:log-stream:%s", logsRegion, awsAccount, logsOptions.AwsLogsGroup, logsOptions.AwsLogsStream)}), }, nil }