diff --git a/src/OpenTelemetry.Instrumentation.AWSLambda/Implementation/AWSMessagingUtils.cs b/src/OpenTelemetry.Instrumentation.AWSLambda/Implementation/AWSMessagingUtils.cs index 0be2c14b32..762c7c6025 100644 --- a/src/OpenTelemetry.Instrumentation.AWSLambda/Implementation/AWSMessagingUtils.cs +++ b/src/OpenTelemetry.Instrumentation.AWSLambda/Implementation/AWSMessagingUtils.cs @@ -118,7 +118,7 @@ private static SNSEvent.SNSMessage GetSnsMessage(SQSEvent.SQSMessage sqsMessage) var body = sqsMessage.Body; if (body != null && - body.TrimStart().StartsWith("{") && + body.TrimStart().StartsWith("{", StringComparison.Ordinal) && body.Contains(SnsMessageAttributes)) { try