-
Notifications
You must be signed in to change notification settings - Fork 265
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
Add examples to OTLP/JSON #462
Comments
Zipkin also shows how it would be rendered in GUI https://zipkin.io/pages/data_model.html |
How are timestamps supposed to be serialized when exporting OpenTelemetry metrics in JSON format? Is it nanoseconds since epoch or RFC 3339? There seems to be conflicting guidelines in the spec:
Presumably the JSON protobuf encoding section is normative (hence RFC 3339), whereas the examples in the "file exporter" section are just examples that may not have been updated? Or maybe the intent was that somehow the timestamps for the file exporter in JSON format are supposed to use the number of nanoseconds since the epoch? |
It is not RFC 3339. See the time_unix_nano field definition here:
The example is correct.
This guidance is not applicable to OTLP. The timestamp fields in OTLP are The applicable language in OTLP spec is the following:
We can add clarification to the spec to make it clearer, I created an issue for that: #460 |
I have a bunch of metrics and logs examples in JSON, that I use to try things out, as it's easier to create arbitrary JSON OTLP. If you want I can try working on this :) |
It would be great to have some examples. Please feel free to submit a PR. |
I moved this issue to https://github.com/open-telemetry/opentelemetry-proto since that's where the OTLP spec is now. |
I put up a PR for it #463. |
OTLP/JSON is a human readable format. It would be nice to have some example payloads in the OTLP specification to demonstrate what it can look like. Examples sometimes are very useful when you want to understand the structure of the payload.
See for example a user asking for it: open-telemetry/opentelemetry-specification#2773 (comment)
The text was updated successfully, but these errors were encountered: