-
Notifications
You must be signed in to change notification settings - Fork 897
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 translation of nginx HTTP code 499? #676
Comments
Currently the spec maps this to |
Ah, the linked https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto#L41 on open-telemetry/opentelemetry-collector#1226 is actually interesting. So there is an official mapping from HTTP to gRPC status codes? Too bad that I didn't know of this when I wrote the mapping table. Still, I think the best way would be to remove the StatusCode enum entirely / replace it with a better mechanism, see #306. |
Thanks for this context. FWIW, I'm generally in the camp of it being fragile to map all error codes in the world to gRPC. But I think it's good if our current code matches our current spec, and can fix forward as needed. So wondering if you can +1 this instead? open-telemetry/opentelemetry-collector#1226 |
For a quickfix, I think adding 499 -> Cancelled to the spec would be better, or even really referencing https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto#L32 (at some fixed revision/tag) as @james-bebbington suggested. |
Currently, the specs don't mention HTTP code 499 (what nginx logs when client closed the connection)
https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/semantic_conventions/http.md#status
The collector currently translates it
https://github.com/open-telemetry/opentelemetry-collector/blob/master/translator/trace/grpc_http_mapper.go#L47
It's not clear whether the spec should be updated to match or the code. I would suspect the code though since 499 is a special nginx code so presumably converting that to an otel object belongs at a lower layer than our HTTP mapping?
The text was updated successfully, but these errors were encountered: