-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Proto mismatch errors not obvious when posting traces #6320
Comments
FYI I replicated this on latest (0.62.1) with the same config + json payload. |
I've seen a customer experience this issue recently as well when sending traces via the Swift SDK, which didn't have the latest proto yet. |
This is a bit unfortunate, I can explain why this happens, not sure what is the right behavior:
The combination of the 2 makes this case to return 200. Not sure how based on the current spec we can return a different code. |
I think if we returned a useful response body, it'd help. Right now you get 200 OK with an empty response; something like "dropped unknown fields [xxx, yyy, zzz]" would at least give users a clue what was happening. |
In the PR that implemented the spec change in the collector we discussed a scenario like this: #5931. Maybe it's time to allow "strict-enforcement" via #5935. I also like the idea of having some important fields, like ResourceSpans and InstrumentationScopeSpans, that are vocal when skipped. This would help users know what's happening. |
As discussed in the SIG today, maybe OTLP's partial success response can help here. |
To clarify: for this to work we need to add "accepted" counter to the partial success response. |
I've sense left the org that led to this issue. |
Describe the bug
When sending test traces via
otlp-http
, if the format of the trace is mismatched the server still returns a 200 with no indication of a problem.$ curl -i http://localhost:4318/v1/traces -X POST -H "Content-Type: application/json" -d @trace.json HTTP/1.1 200 OK Content-Type: application/json Date: Sat, 15 Oct 2022 00:30:09 GMT Content-Length: 2 {}
Steps to reproduce
config: BELOW
docker-compose.yaml:
trace.json (from this example)
docker compose up
curl -i http://localhost:4318/v1/traces -X POST -H "Content-Type: application/json" -d @trace.json
What did you expect to see?
A 200 response if the trace data was 👍
Anything else with a message mentioning the proto mistmatch
What did you see instead?
$ curl -i http://localhost:4318/v1/traces -X POST -H "Content-Type: application/json" -d @trace.json HTTP/1.1 200 OK Content-Type: application/json Date: Sat, 15 Oct 2022 00:30:09 GMT Content-Length: 2 {}
What version did you use?
Version:
0.60.0
What config did you use?
The text was updated successfully, but these errors were encountered: