envoyproxy / envoyproxy/envoy

make the response code details append-able

Open
#32,834 4 comments 0 reactions 1 assignee Claimed by @vikaschoudhary16 View on GitHub
area/envoy_log area/observability enhancement no stalebot
Dominant language
C++
Stars
28.9k
Forks
5.6k
Avg merge
1d 20h
Merged PRs (30d)
437

Description

*Title*: *make the response code details append-able*

There always has the requirement to record envoy's internal events and log them. By this way, we can understand the processing of envoy more clearly, and this way could help developers/users to know what was exactly happened if envoy doesn't works as expected.

There are some possible ways to achieve this target:
1. filter state, this is great and extendable. But also is heavy if we just want to record some short event strings.
2. custom response flags, also great but we may don't want to register one custom flag for every un-common event.
3. response code details, only latest value will be kept.

The response code details provide an easy way to record the inner event strings and to log them. (The response flags and response code details are two super great features to help debugging envoy.)

But now, every `setResponseCodeDetails` call will override the old value. It make it's hard to record multiple events. For example, auth request is failed because no healthy upstream and then the filter send a local reply. There are two important points: why auth request is failed, and who and why send the local reply. If we want to record the both points, then we need to join these event string carefully.
For another example, the auth request is failed but the filter still want to send the original request to upstream. Then the finally `via_upstream` (set by router) will override all old values.

This, may be we can make the response code detail be append-able. Then we can record multiple events at same time in a single response code details string.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.