OpenTelemetry: Span Parenting and Latency-Based Sampling in Kafka-Connected Services

28 views Asked by At

I have two questions about OpenTelemetry. Let's say I have three services(A-B-C):

The first one is a controller receiving user requests, the second accesses the database, and the last aggregates data and stores it in S3.

They are all connected by Kafka.

When I use setParent in the span in service B, I assume the parent should be the traceparentId from service A.

But in service C, should the parent be traceparentId from service A or service B?

My second question is about sampling all spans only if the total time from service A to service C exceeds 5 seconds.

Is there a built-in way to do this? I've read about latency sampling in the OpenTelemetry documentation, but I found no examples.

Thanks!

0

There are 0 answers