Closed tjsousa closed 10 months ago
@tjsousa Sorry for the late reply, and thanks for your feedback! Unfortunately we currently do not have enough bandwidth to prioritize the work to add the custom request extraction method for Ruby. I'll leave this issue open to see if we can find more interest or help from the community.
If anybody wanted to take this on, here are some good examples of how to go about it: https://github.com/DataDog/datadog-lambda-java/blob/main/src/main/java/com/datadoghq/datadog_lambda_java/SQSHeaderable.java https://github.com/DataDog/datadog-lambda-go/pull/80
Hey @tjsousa – thanks for the issue, this is indeed a feature which is available in most runtimes, but Ruby.
For us to better triage, I'd suggest creating a new ticket in our support platform mentioning your use case and this ticket. Make sure to point it to the Serverless team.
As of our latest releases, we can infer spans incoming from multiple AWS services #80, but trace context injection is still needed, and must be done in the Ruby tracer. Either you can submit an issue there for them to also be aware of it – or the feature request ticket, which would be faster since it will triage it directly with the engineering team at Datadog!
Since this is more of a ticket of the Ruby tracer. I'm going to close this ticket – making a note with the Serverless APM team to keep in on track.
Feel free to re-open the issue if you have any questions or concerns.
Expected Behavior
Asynchronous Lambda invocations triggers by SNS/SQS events could be correlated back to the original publisher trace.
This seems to be supported by the Python and Node.js wrappers: https://docs.datadoghq.com/serverless/distributed_tracing/serverless_trace_propagation?tab=python
Actual Behavior
Asynchrounous Lambda invocations always show up as standalone traces in APM.
In our infrastructure we do pass Datadog headers as SNS/SQS message attributes and could reify the Tracer context with this information if there was a way to extract it differently that today's method which only looks for synchronous API calls with headers.
Steps to Reproduce the Problem
Specifications
Stacktrace