

Propagate AWS X-Ray tracing header to the Lambda from SQS, SNS and DynamoDB stre...
source link: https://pawelgrzybek.com/propagate-aws-x-ray-tracing-header-to-the-lambda-from-sqs-sns-and-dynamodb-stream/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Propagate AWS X-Ray tracing header to the Lambda from SQS, SNS and DynamoDB stream
Published: 2021.10.25 | 1 minutes read
I faced a challenge where I wanted to propagate AWS X-Ray tracing X-Amzn-Trace-Id
header from one Lambda through DynamoDB stream triggered by put
operation up to another Lambda. The documentation doesn’t cover working with AWS X-Ray and DynamoDB, but I found the answer in the “Amazon SQS and AWS X-Ray” section that follows a very similar flow. If you’re facing a similar challenge in your project, I have bad news. This integration is currently impossible.
It is not currently possible to connect a trace passed into an SQS queue to the Lambda consuming it on the other end. This is because although the trace header is propagated in the SQS message, you cannot set it in the Lambda because segments in Lambda are immutable.
If you expect a better level of traceability of your service, for now, the only option is to use a third party service.The Epsagon Service Map is what I used and it worked great for me, but I know that Datadog comes with a similar feature. Fingers crossed that AWS X-Ray will become more powerful in the future, as it would be nice to have a sufficient level of tracing and not to leave AWS world.
If you liked this article, you can buy me a coffee and share it on Twitter.
What'ya think?
👆 you can use Markdown here
Recommend
-
55
What if you need to catch an exception in a worker thread and re-throw it in the main thread that’s waiting for the worker to finish? std :: ...
-
12
Yearly Reminder: DDLs That Fail to Propagate May Cause Percona XtraDB Cluster Inconsistencies Back to the Blog
-
12
I built a thing - JAMstack commenting system using AWS CDK, API Gateway, Lambda and DynamoDBPublished: 2021.05.25 | 1 minutes readA few months ago, I made a change in the way how I handle comments on this website. I elaborated...
-
10
DynamoDB Stream 应用及触发 Lambda 函数 2021-09-08 — Yanbin DynamoDB Stream 的实质就是一个依附于表的流,对表的增删改像关系型数据的触发器一样,以日志形式按顺记录到该流中。我们可以用 API 去读取其中的记录,或用来触发一个 Lamb...
-
6
I built a thing - price monitor using AWS CDK, Lambda, DynamoDB and SESPublished: 2021.10.21 | 4 minutes readI wanted to buy a PlayStation 5 but it was out of stock all over the place, so I spent a short amount of time buildin...
-
12
Full-text search for DynamoDB using Lambda, EFS, Tantivy and Rust.Featured on HashnodeSubscribe to my newsletter and never miss my upcoming article...
-
4
I've been working on a few IoT projects recently, and while prototyping, I need a simple but flexible data store. I just want to push data to an API and query and visualize it later on. There are many solutions for this, but most are e...
-
10
Serverless applications have been gaining popularity recently because of their scalability and simplicity. In this article, we will create a simple TODO application in Golang using serverless AWS technologies...
-
6
DynamoDB Streams and AWS Lambda Trigger in .NETDynamoDB Streams capture a time-ordered sequence of events in any DynamoDB table. Whenever an application creates, updates, or deletes items in the table, DynamoDB Streams writes a str...
-
11
How to Handle Exceptions When Processing DynamoDB Stream Events in .NET Lambda FunctionDynamoDB Streams capture a time-ordered sequence of events in any DynamoDB table.In a previous blog post,
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK