6

I am using AWS lambda and eventbridge. One lambdaA sends event to eventbridge and another lambdaB receives this event and save it to database. What I'd like to do is to add xray trace data on this flow. I'd like to see the flow in the service map on xray console.

But I don't know how to pass the xray data over eventbridge. Is there a header I can put the trace id in?

Joey Yi Zhao
  • 37,514
  • 71
  • 268
  • 523
  • Have you tried patching the botocore using aws-xray-sdk-python? – jellycsc Jul 29 '20 at 01:12
  • I'm considering adding a custom field to the details, but like you, feel like it's something I'd expect in the SDKs. As best I can tell, it is not natively supported. I can see that the EventBridge API is called (via the XRay Console), but the connection to the handling function is not created. – Jon Nichols Nov 13 '20 at 00:56
  • I would also like to see this feature and I'm searching for a solution. – weaveoftheride Nov 30 '20 at 09:32

1 Answers1

0

In this architecture, you will be sending single event or there will be multiple events sending/receiving at a time and stored in a queue ? If you're sending single event and other lambda function is receiving that event you can actually trace this call flow using AWS X-Ray. I believe you might have to instrument those calls that you want to trace within lambda function. In the case of sending/receiving multiple events at a time, your use case might fall under this issue. (https://github.com/aws/aws-xray-sdk-node/issues/208)