question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Invalid MessageAttributes on SNS

See original GitHub issue

Describe the bug After we upgraded to 2.32.0 our subscription filters on AWS SNS unfortunately broke, so messages were not forwarded to SQS queues. Looking into AWS CloudWatch metrics we saw NumberOfNotificationsFilteredOut-InvalidAttributes had started to happen.

The NumberOfNotificationsFilteredOut-InvalidAttributes metric shows messages that your filter policy rejected because the message attributes weren’t in a valid format.

https://repost.aws/knowledge-center/sns-subscription-filter-policy-issues

After downgrading to 2.31.0 we stopped getting NumberOfNotificationsFilteredOut-InvalidAttributes.

Here’s the MessageAttributes of one of our messages, but nothing in there immediately looks suspicious to me.

"MessageAttributes" : {
  "ourKey" : {"Type":"String","Value":"OurData"},
  "_datadog" : {"Type":"String","Value":"{\"traceparent\":\"00-000000000000000023b62f1bd3212848-1fe678cc9b22cbd2-01\",\"tracestate\":\"dd=s:1;t.dm:-1\",\"x-datadog-trace-id\":\"2573296033641605192\",\"x-datadog-parent-id\":\"2298657479990627282\",\"x-datadog-sampling-priority\":\"1\",\"x-datadog-tags\":\"_dd.p.dm=-1\"}"}
}

To Reproduce

Expected behavior MessageAttributes should contain valid data, parsable by AWS SNS subscription filters.

Runtime environment (please complete the following information):

  • Instrumentation mode: automatic
  • Tracer version: 2.32.0
  • OS: Windows Server 2019 (AWS EB Windows Server)
  • CLR: .NET 6.0.18
  • AWSSDK.SimpleNotificationService: 3.3.101.11

Additional context

Issue Analytics

  • State:closed
  • Created 3 months ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
zARODz11zcommented, Jun 29, 2023

If you’d like to continue using Tracer version: 2.32.0 you can disable the sns integration using DD_TRACE_AwsSns_ENABLED=0 I take responsibility for this issue as well, apologies for any inconvenience. The release is coming soon.

2reactions
pierotiboucommented, Jul 4, 2023
Read more comments on GitHub >

github_iconTop Results From Across the Web

Amazon SNS message attributes
Amazon SNS supports delivery of message attributes, which let you provide structured metadata items (such as timestamps, geospatial data, signatures, ...
Read more >
Why AWS SNS filtering doesn't ignore unknown message ...
When Amazon SNS evaluates message attributes against the subscription filter policy, it ignores message attributes that aren't specified in ...
Read more >
Resolve invalid parameter errors for API calls in Amazon ...
I receive an invalid parameter error message in Amazon Simple Notification Service (Amazon SNS) in response to API calls.
Read more >
Unable to send a message to Amazon SNS FIFO Topics ...
SYMPTOM. Error when publishing a message to the Amazon FIFO topic with AWS SNS connector. Below error is observed in the logs -...
Read more >
SNS - Boto3 1.28.30 documentation
A low-level client representing Amazon Simple Notification Service (SNS) ... signing your service requests, retrying requests, and handling error responses.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found