I'm using the below code in an attempt to trace individual SQS messages and add them to the parent span the other service that sent them.
I have confirmed that metadata contains both x-datadog-parent-id and x-datadog-trace-id in the format that the tracer.TextMapCarrier requires.
The traces are coming through ok but the issue is that by the time the traces are sent through the Datadog Lambda Forwarder the parent is set to the span started for the root of the Lambda execution (in listener.go#startFunctionExecutionSpan) instead of the that has been extracted.
I'm using the below code in an attempt to trace individual SQS messages and add them to the parent span the other service that sent them.
I have confirmed that
metadata
contains bothx-datadog-parent-id
andx-datadog-trace-id
in the format that thetracer.TextMapCarrier
requires.The traces are coming through ok but the issue is that by the time the traces are sent through the Datadog Lambda Forwarder the parent is set to the span started for the root of the Lambda execution (in listener.go#startFunctionExecutionSpan) instead of the that has been extracted.
Is there a limitation that I am perhaps misunderstanding when trying to set the parent span to something other than the Lambda execution span?
Steps to Reproduce the Problem
See above code snippet.
Specifications
Stacktrace
N/A