-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Doc] Number of root spans per trace #403
Comments
Hey @b-viguier! If you produce spans via the OTel Trace API, you can only specify a parent Span (via a Context) from which the Trace ID is re-used along with the parent Span ID but there is no way to specify just a Trace ID to create a root span using it. For root spans, a new, random Trace ID would be generated. On a data model/protocol level, however, other producers would technically be able to construct multiple spans with identical Trace IDs but no Parent Span ID. The lines you are citing - for my understanding - kind of serve as warning for proto consumers that they might encounter such data and would need to gracefully handle this. |
Hi @arminru, thanks for your reply!
But in these case, we could have the same warning for every required fields? At least, it comforts me that in the right use-case we should have only 1 root span per trace 馃槄 |
@b-viguier Indeed - I don't know why this particular possible deviation is documented while others are not. I tried to clarify the comment in #408, please let me know if this is clear enough 馃檪 |
Your proposal is very relevant, thanks a lot 馃憤 |
Hello 馃憢 馃檪
This repository states that a trace can contain several root spans:
opentelemetry-proto/opentelemetry/proto/trace/v1/trace.proto
Lines 127 to 128 in 9e7c1b3
but the documentation repository explicitly says that a trace contains only 1 root span
https://github.com/open-telemetry/opentelemetry-specification/blob/5fb819c72e34cb21fe1ce5acba1dc93c2216ecb1/specification/trace/api.md?plain=1#L384-L386
Which one is right? 馃槄
My feeling is that the 2nd statement is right (1 single root span per trace). But when receiving spans from the collector, it's possible to receive several root spans from different traces, in a same OTLP payload, maybe it's the source of the mistake?
The text was updated successfully, but these errors were encountered: