refactor(app/outbound): remove status counters from NewRecordResponse
#4300
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
nb: this branch is based upon #4299, and #4298.
in #4299 we made some prepatory
adjustments to the outbound proxy's route-backend metrics layer, and in
#4298 we introduced a new
linker-http-prom::statusmetrics layer that can be used to count responsestatus codes, in a manner that is agnostic with respect to the particular
protocol that instrumented traffic is using.
this branch performs a sequences of changes oriented towards two concrete
goals: 1: integrate the
NewRecordStatusCodemiddleware into theoutbound proxy's route and backend metrics layers, and 2: remove status
code measurement from the
NewRecordResponsemiddleware.it's worth stating explicitly that this maintains the existing behavior of the
outbound proxy, and that (1) and (2) must be performed at the same time to
maintain parity.
to demonstrate that parity is maintained, let's compare metrics from this
branch against a snapshot of metrics exported in
main.🟰 comparing the metrics
metrics were scraped from the proxy, using a small traffic generation
deployment that runs
curlagainst a container runninghttp-echo.a snapshot of the route and backend status/duration counters on main:
this was repeated after applying
config.linkerd.io/proxy-versionto use aproxy with these patches applied.
a snapshot of the route and backend status/duration counters with these
changes:
because there are a large number of metrics and labels, a character-level diff
of the two looked like so. as we'd hope, the only differences observed were
values of particular time series. in other words, the same traffic yielded the
same number of time series with the same labels.
feat(app/outbound): add status counters to route metrics
Signed-off-by: katelyn martin [email protected]
feat(app/outbound): add status counters to backend metrics
Signed-off-by: katelyn martin [email protected]
feat(app/outbound): add route status counting middleware
Signed-off-by: katelyn martin [email protected]
feat(app/outbound): add backend status counting middleware
Signed-off-by: katelyn martin [email protected]
refactor(app/outbound): remove status counter from duration middleware
Signed-off-by: katelyn martin [email protected]