0

Is there a way to add a span to multiple traces in Datadog tracing?

Our service receives orders that are batched into a transaction and then the transaction is processed. Each received order comes with its own trace-id. When processing the transaction I would like to add the processing span to each of those trace-ids.

order-1 \
order-2 | ----> batch A
order-3 /

order-4 \
order-5 | ----> batch B
order-6 /

In case this is relevant: the project is coded in python 3

Julien__
  • 1,962
  • 1
  • 15
  • 25

1 Answers1

1

I suggest adding tags to the spans than contain the shared key. I think this will be the easiest way to perform the queries you like while keeping the logical flow of the traces. Check out the docs on custom span tags.

bwest
  • 9,182
  • 3
  • 28
  • 58