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

return a clear error when http/protobuf server returns json #263

Merged
merged 5 commits into from
Sep 20, 2023

Conversation

tobert
Copy link
Collaborator

@tobert tobert commented Sep 13, 2023

This PR addresses part of what's going on in #262. I had a chat with a contact at the OTLP vendor in the report and they confirmed their server is out of spec. This will at least make it clear that the server is being naughty instead of otel-cli.

I can be convinced to make either work, it's not a huge lift, and mostly I prefer users have a good time v.s. reporting naughty servers. I'll wait to merge this a day or two so folks can comment.

Amy Tobey added 5 commits September 12, 2023 15:11
In #262 it was reported that a vendor's OTLP server responded to an
http/protobuf trace upload with a JSON response. I checked with a vendor
contact and they confirmed this is not supposed to happen and means
their server is out of spec.

I might be convinced to just accept the JSON as long as it's a valid
ExportTraceServiceResponse but for now, add an error that informs users
clearly that it's the server's fault.
Tests were failing on the new check, which is good, because they were
under-specified. They now set a Content-Type header to pass what should
pass. Added 2 tests for the new server compliance checks too.
@tobert
Copy link
Collaborator Author

tobert commented Sep 13, 2023

@mterhar can you please review?

@tobert tobert merged commit da68217 into main Sep 20, 2023
1 check passed
@tobert tobert deleted the fix-otlp-for-naughty-honeycomb branch September 20, 2023 14:55
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.

1 participant