Not clear to which messages a schema url applies to #4180
Labels
spec:miscellaneous
For issues that don't match any other spec label
triage:accepted:ready
Ready to be implemented. Small enough or uncontroversial enough to be implemented without sponsor
Inside a single resource spans message, there are multiple occurrences of
schema_url
. As a consumer of OpenTelemetry data, I'm trying to understand to which attributes these schemas apply to. While this question applies to logs, traces and metrics, I'm going to reference the tracing related bits as this is where I initially stumbled across my problem.ResourceSpans
message has its ownschema_url
field: https://github.com/open-telemetry/opentelemetry-proto/blob/main/opentelemetry/proto/trace/v1/trace.proto#L58-L63.This checks out.
scope_spans
field and looking at theScopeSpans
message, it also has its ownschema_url
field: https://github.com/open-telemetry/opentelemetry-proto/blob/main/opentelemetry/proto/trace/v1/trace.proto#L76-L80.This kinda checks out but I'm missing two things, here:
links
which I guess it must apply to, too?scope
which (a) seems inconsistent with how theResourceSpans
schema_url
behaves (applying toresource
) and (b) leaves me wondering in which schema thescope
is recorded inWhen I discovered this uncertainty, I followed the link in the source code comments which led me to this section. The ruleset established there doesn't seem to match with the comments in the proto file:
This clashes with the description given in the proto file.
Checks out but with the same constraints I pointed out for the description in the proto file.
So without another explaining comment, I can't know for sure which field takes precedence as per this description they both cater to
Span
andSpanEvent
.Fortunately, there is an explanation there:
But as @pellared already pointed out here:
To stir more confusion, the link I mentioned has another section right at the top that reads as follows:
As per @pellared:
To sum this issue up: As a consumer, it's not obvious to me on how to correctly process OTLP messages with regards to respecting the given schema urls. The docs as well as the spec seem to be outdated and/or wrong.
I'm happy to help rephrase some of the comments/docs I've linked but I need some guidance on what the correct way actually is before I get going.
Or maybe I've just navigated myself into a corner and it's totally obvious on how to process OTLP messages correctly. But I think in either case there are some takeaways from this issue.
Cheers
The text was updated successfully, but these errors were encountered: