diff --git a/detectors/aws/ecs/ecs.go b/detectors/aws/ecs/ecs.go index 4069c6f1956..9c9ae9f369d 100644 --- a/detectors/aws/ecs/ecs.go +++ b/detectors/aws/ecs/ecs.go @@ -185,7 +185,7 @@ func (detector *resourceDetector) getLogsAttributes(metadata *ecsmetadata.Contai return []attribute.KeyValue{ semconv.AWSLogGroupNamesKey.StringSlice([]string{logsOptions.AwsLogsGroup}), - semconv.AWSLogGroupARNsKey.StringSlice([]string{fmt.Sprintf("arn:aws:logs:%s:%s:log-group:%s:*", logsRegion, awsAccount, logsOptions.AwsLogsGroup)}), + semconv.AWSLogGroupARNsKey.StringSlice([]string{fmt.Sprintf("arn:aws:logs:%s:%s:log-group:%s", logsRegion, awsAccount, logsOptions.AwsLogsGroup)}), semconv.AWSLogStreamNamesKey.StringSlice([]string{logsOptions.AwsLogsStream}), semconv.AWSLogStreamARNsKey.StringSlice([]string{fmt.Sprintf("arn:aws:logs:%s:%s:log-group:%s:log-stream:%s", logsRegion, awsAccount, logsOptions.AwsLogsGroup, logsOptions.AwsLogsStream)}), }, nil diff --git a/detectors/aws/ecs/ecs_test.go b/detectors/aws/ecs/ecs_test.go index 99835e0dbb6..d4dce8ef241 100644 --- a/detectors/aws/ecs/ecs_test.go +++ b/detectors/aws/ecs/ecs_test.go @@ -108,7 +108,7 @@ func TestDetectV4LaunchTypeEc2(t *testing.T) { semconv.AWSECSTaskFamilyKey.String("curltest"), semconv.AWSECSTaskRevisionKey.String("26"), semconv.AWSLogGroupNamesKey.StringSlice([]string{"/ecs/metadata"}), - semconv.AWSLogGroupARNsKey.StringSlice([]string{"arn:aws:logs:us-west-2:111122223333:log-group:/ecs/metadata:*"}), + semconv.AWSLogGroupARNsKey.StringSlice([]string{"arn:aws:logs:us-west-2:111122223333:log-group:/ecs/metadata"}), semconv.AWSLogStreamNamesKey.StringSlice([]string{"ecs/curl/8f03e41243824aea923aca126495f665"}), semconv.AWSLogStreamARNsKey.StringSlice([]string{"arn:aws:logs:us-west-2:111122223333:log-group:/ecs/metadata:log-stream:ecs/curl/8f03e41243824aea923aca126495f665"}), } @@ -159,7 +159,7 @@ func TestDetectV4LaunchTypeFargate(t *testing.T) { semconv.AWSECSTaskFamilyKey.String("curltest"), semconv.AWSECSTaskRevisionKey.String("3"), semconv.AWSLogGroupNamesKey.StringSlice([]string{"/ecs/containerlogs"}), - semconv.AWSLogGroupARNsKey.StringSlice([]string{"arn:aws:logs:us-west-2:111122223333:log-group:/ecs/containerlogs:*"}), + semconv.AWSLogGroupARNsKey.StringSlice([]string{"arn:aws:logs:us-west-2:111122223333:log-group:/ecs/containerlogs"}), semconv.AWSLogStreamNamesKey.StringSlice([]string{"ecs/curl/cd189a933e5849daa93386466019ab50"}), semconv.AWSLogStreamARNsKey.StringSlice([]string{"arn:aws:logs:us-west-2:111122223333:log-group:/ecs/containerlogs:log-stream:ecs/curl/cd189a933e5849daa93386466019ab50"}), }