How would you model spans for long-running operation (up to several hours)? #1053
Replies: 2 comments 3 replies
-
|
Probably the most idiomatic way to model this would be to split the operation into several distinct traces, then use links to join them together. The server would write a complete trace when the request was made, then whatever service is long-polling the DB to check for completion would create traces for it's work that would link back to the initial trace. |
Beta Was this translation helpful? Give feedback.
-
|
I posted open-telemetry/opentelemetry-specification#3732 which seems related. The way I've seen this solved is to send a child span as soon as a span starts within a custom Tracer. It's messy and the backend had to be specifically coded to handle it but it works. I would much rather OTEL (1) allowed sending out span events immediately and (2) had a semantic convention for a "span started" event. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Suppose I have a service, that sometimes makes heavy SQL queries, that can take an hour to complete. Also, I can have a customer call asking why their request takes so long.
If I model spans traditionally: 1 server span for client request and 1 client span for DB request, both spans will be not available for analysis until DB request ends.
Is there another model for this use case?
Some ideas:
Beta Was this translation helpful? Give feedback.
All reactions