Replies: 1 comment
-
Hi, the second picture does not work for me, so I'm not quite sure what's there. In any case, in opentelemetry, you can close the span only once and it is considered to have run the whole time from start to end. So if you export the parent span on exit, you couldn't enter it again. The broken view in your first example is I believe exactly because the example code runs an endless loop. In real life, this would happen if you looked at spans while their parent is still running. Once the parent would finish, the view would be fixed. I don't think this can be worked around in opentelemetry, I believe there is no support for updating spans or sending partial spans. |
Beta Was this translation helpful? Give feedback.
-
As the
otel
spans are only exported whentracing::Span
is closed andSpan
is closed when there's no references to it's handle in the subscriber, the scenario:Logs
where we use the parent span for a some kind of long-running background process,
results in a "broken" trace view in Grafana/Jaeger:
Here we can see, that all the
process
spans are shoved under some "unknown"parent span. Which is not particularly useful: I am now forced to search the
specific events in this long waterfall of spans, instead of getting straight to
the span of interest via the search.
The desired outcome would be something like this:
Diff to force the wanted behavior
Logs
Now, the
parent
spans areclosedexported on eachprocess
span end,producing the new distinct spans (shown in the table).
I think this means that spans have to be exported on each exit, not a close.
This is undesired due to performance considerations, I understand. But is there
a way to get
parent
to behave like in the second example?Beta Was this translation helpful? Give feedback.
All reactions