forked from equinix-labs/otel-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
return a clear error when http/protobuf server returns json (equinix-…
…labs#263) * go mod tidy * check for servers out of spec In equinix-labs#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. * make code a bit more panic-safe and report missing content-type header * add tests, make code gooderer 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. * remove debug log
- Loading branch information
Showing
3 changed files
with
41 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters