dd-trace-java icon indicating copy to clipboard operation
dd-trace-java copied to clipboard

Span context propagation for the integration with third-party system

Open Ekatereana opened this issue 2 years ago • 1 comments

Hi, my use case looks like this:

service-A with dd-agent makes a request to 3rd party system-B, and system-B then produces the event, that my Kafka consumer will consume. However, there is no option for how I may inject the dd agent into the system B, my trace hierarchy breaks. I though maybe I could send the trace-id of the parent trace from service-A in the body of the kafka event, but how then I will set it as the parent trace_id in consumer?

Is there any option to propagate span context from service-A to the consumer, though that system-B doesn't inject dd-agent?

Ekatereana avatar Apr 21 '23 11:04 Ekatereana

Hi @Ekatereana

There is mechanism for context propagation that can be applied automatically or used programmatically. Can you help me to understand your architecture, components and how they interaction with each others?

From your comment, here is what I picture (so I be wrong on multiples parts 😉 ):

graph LR;
    service-A -- request --> system-B
    system-B -- create event --> kafka
    kafka-consummer -- consume event --> kafka
    style service-A fill:#774aa4

Where:

  • service-A is the only system using dd-agent
  • system-B cannot use dd-agent

PerfectSlayer avatar Apr 25 '23 14:04 PerfectSlayer