-
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conflicting requirements in OTLP JSON field names #476
Comments
@open-telemetry/specs-approvers FYI. |
The reference to snake case here seems like a typo. This clause is referencing the encoding of the strings, and is not concerns with the casing of keys. I believe the snake case was probably in reference to the field names in the proto definition. I'm in favor of the first option, but would like to understand more about which components would be disrupted by this. |
Any existing sender implementation of OTLP JSON which is compliant with the current spec will be no longer able to send spans to any other receiver implementation of OTLP JSON that is compliant with the modified Otel spec (and vice versa). This is a catastrophic failure mode for me, the worst kind of a failure to deliver on our stability promise since the only way to avoid being affected by it is co-ordinated updating of all participants (producers and consumers) or a distributed network, which in any non-trivial deployment is either hard or impossible to do. |
Doesn't that assume that a sender producing |
You are right. It is a matter of which of the contradicting clauses we think was the overriding one and I don't think there is a clear answer to that. I updated the description of the issue to reflect the fact that depending on what we think was the overriding clause one or the other proposed solution is breaking. |
Does the merge of #468 changes anything in this issue? |
Note that the example JSON files in the repository actually use both types of casing in the same file!
|
I added this to 1.0 pre-release checklist. We need to resolve this. |
Yes, it went with camelCase. But I think there is a bit more work to do before we close this. |
Those are different fields, but I agree they need to be fixed to camelCase too. |
@open-telemetry/specs-approvers
Thoughts? |
This is already the case: |
Also related to this is "Trace Context in non-OTLP Log Formats" document: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/compatibility/logging_trace_context.md Should we update it from snake_case to camelCase too? @open-telemetry/specs-logs-approvers what do you think? [UPDATE] I created a separate issue for this, let's discuss there: open-telemetry/opentelemetry-specification#3518 |
Indirectly related to open-telemetry#476 The spec requires that: >The keys of JSON objects are field names converted to lowerCamelCase. See https://github.com/open-telemetry/opentelemetry-proto/blob/main/docs/specification.md#json-protobuf-encoding
I opened issues in every language repo to ensure OTLP/JSON exporters use correct capitalization. Closing this issue, there is nothing else to do. |
Problem
JSON Protobuf Encoding section in OTLP protocol specification says:
Note that
trace_id
andspan_id
fields use lower snake case, with underscores, using original field names from the proto.However, in the same section of the spec we also have this:
These 2 clauses conflict with each other. Which one is true? Should we use lower camel case, i.e.
traceId
/spanId
or the original namestrace_id
/span_id
?We ended up in this broken situation after this PR, where we decided that lowerCamelCase names only must be used.
The spec contradicts with itself and it needs fixing.
Chosen Solution
Alternate solutions considered
Allow
trace_id
/span_id
names as an exceptionWe can explicitly call out in the spec that the names of these 2 fields are an exception from the rule about lowerCamelCase. We will end up with a bit of ugliness and inconsistency in the OTLP JSON spec.
If anyone can think of a better solution please comment.
The text was updated successfully, but these errors were encountered: