diff --git a/src/OpenTelemetry.Contrib.Extensions.AWSXRay/Resources/AWSECSResourceDetector.cs b/src/OpenTelemetry.Contrib.Extensions.AWSXRay/Resources/AWSECSResourceDetector.cs index b37ef621d3..985771b393 100644 --- a/src/OpenTelemetry.Contrib.Extensions.AWSXRay/Resources/AWSECSResourceDetector.cs +++ b/src/OpenTelemetry.Contrib.Extensions.AWSXRay/Resources/AWSECSResourceDetector.cs @@ -114,7 +114,8 @@ internal List> ExtractMetadataV4ResourceAttributes( clusterArn = $"{baseArn}:cluster/{clusterArn}"; } - var launchType = (string)taskResponse["LaunchType"] switch { + var launchType = (string)taskResponse["LaunchType"] switch + { string type when "ec2".Equals(type.ToLower()) => AWSSemanticConventions.ValueEcsLaunchTypeEc2, string type when "fargate".Equals(type.ToLower()) => AWSSemanticConventions.ValueEcsLaunchTypeFargate, _ => null,