Skip to content
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 OTLP JSON payload examples #463

Conversation

joaopgrassi
Copy link
Member

@joaopgrassi joaopgrassi commented May 4, 2023

Fixes #462

I was not sure where to add the files, so I just went with some initial idea. I'm open to suggestions on where to put them/refer to them.

I tested it with a local collector and all works.

cc @tigrannajaryan

@arminru arminru requested a review from a team May 9, 2023 11:21
Copy link
Member

@bogdandrutu bogdandrutu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because I know that we will do manual work here withe these examples. should we have at least a check that they are valid JSONs?

bogdandrutu

This comment was marked as duplicate.

bogdandrutu

This comment was marked as duplicate.

@tigrannajaryan
Copy link
Member

Yes more checks would be useful. Related: we have a PR coming that adds link checking: #459

@joaopgrassi
Copy link
Member Author

I was also thinking if we shouldn't publish a json schema for OTLP. That way the guess work of writing OTLP JSON is removed and we could also check it against the schema in a gh action. I saw some tool to generate JSON schema from proto files but didn't have time to check. If you think it's valid, I can create issues and maybe work on it.

@tigrannajaryan
Copy link
Member

I was also thinking if we shouldn't publish a json schema for OTLP. That way the guess work of writing OTLP JSON is removed and we could also check it against the schema in a gh action. I saw some tool to generate JSON schema from proto files but didn't have time to check. If you think it's valid, I can create issues and maybe work on it.

I would not want to maintain another schema definition. The Protobuf definitions are the source of truth. If we could generate JSON schema from Protobufs that would be great.

joaopgrassi and others added 2 commits May 10, 2023 17:52
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
@tigrannajaryan
Copy link
Member

Merging. @joaopgrassi it would be great if you could follow up with a PR to add JSON checks.

@tigrannajaryan tigrannajaryan merged commit ecdaa2a into open-telemetry:main May 10, 2023
13 checks passed
@joaopgrassi
Copy link
Member Author

Will do!

@joaopgrassi joaopgrassi deleted the add-otlp-json-examples branch May 10, 2023 20:03
@chalin
Copy link
Contributor

chalin commented May 11, 2023

Hi all, I've posted a suggestion to:

Comments are welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add examples to OTLP/JSON
8 participants