envoyproxy / envoy

Cloud-native high-performance edge/middle/service proxy
https://www.envoyproxy.io
Apache License 2.0
24.85k stars 4.78k forks source link

Why envoy behaves differently when envoy adds an error tag to trace according to HTTP and GRPC status? #15883

Open fukuda151 opened 3 years ago

fukuda151 commented 3 years ago

Description: Envoy adds an error tag to trace when HTTP status is 5xx (NOT when HTTP status is 4xx). On the other hand, envoy adds an error tag to trace when GRPC status is not "OK".

I think envoy should not adds an error tag to trace when GRPC status is such as "NOT_FOUND" or "PERMISSION_DENIED" because they are equivalent to HTTP status 4xx.

Is there any intention for this difference?

Relevant Links: https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/observability/tracing#what-data-each-trace-contains

snowp commented 3 years ago

I don't think this is intentional, we'd probably be up for changing to be consistent here.

jakubednarek commented 3 years ago

I had a same issue and created a PR with a fix: https://github.com/envoyproxy/envoy/pull/16078. I would appreciate a review if this is an acceptable change.