open-telemetry / opentelemetry-swift

OpenTelemetry API for Swift
https://opentelemetry.io/docs/instrumentation/swift/
Apache License 2.0
222 stars 145 forks source link

Ensure that OTLP/JSON exporter uses correct capitalization of field names #415

Open tigrannajaryan opened 1 year ago

tigrannajaryan commented 1 year ago

We have recently found that the OTLP spec was confusingly written and it was not clear what capitalization to use for trace id, span id fields.

The spec was clarified in this PR: https://github.com/open-telemetry/opentelemetry-proto/pull/468/files (it was considered a bug in the spec and we were allowed to fix it).

All fields (including traceId and spanId fields) in OTLP/JSON must use camelCase names in exporters.

I have not verified how the OTLP/JSON exporter behaves in this repository. If the exporter is not already using camelCase name please fix it, if it already is compliant with the spec please close this issue.

Note that Otel Collector currently accepts both camelCase and snake_case field names and will continue to do so for a while to give time for existing users to transition all existing non-compliant data sources to new versions that are OTLP spec-compliant.

nachoBonafonte commented 1 year ago

We need to wait for a release of the spec to update it

bryce-b commented 11 months ago

I think I updated the protobufs, and solved this issue. I can double check.

alolita commented 3 months ago

@bryce-b did you confirm if this issue got resolved with the protobuf update. Please close this issue if resolved.