yarpc / yarpc-go

A message passing platform for Go
MIT License
401 stars 101 forks source link

Emit metrics for new headers handling behaviour. Hide actual changes under feature flag. #2267

Open biosvs opened 2 months ago

biosvs commented 2 months ago

Currently underlying implementation of headers handling wary significantly from one transport to another (docs/docs/headers-handling.md in this PR). Eventually, in one of the following releases, we want to make behaviour consistent and protective: filter inbound 'rpc-' headers, return error for attempting of 'rpc-' header setting.

Proposed changes are backward incompatible, so to identify the edges that are affected by the future changes, at first stage let's emit metrics.

Metrics: reserved_headers_stripped and reserved_headers_error metrics with "component": "yarpc-header-migration" constant tag and with source and dest variable tags

Part of https://github.com/yarpc/yarpc-go/issues/2265

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 80.80000% with 48 lines in your changes are missing coverage. Please review.

Project coverage is 85.17%. Comparing base (407d76c) to head (010d653).

Files Patch % Lines
transport/tchannel/response_writer.go 85.91% 5 Missing and 5 partials :warning:
transport/http/outbound.go 42.85% 4 Missing and 4 partials :warning:
transport/grpc/outbound.go 33.33% 3 Missing and 3 partials :warning:
transport/http/handler.go 60.00% 3 Missing and 3 partials :warning:
transport/tchannel/outbound.go 40.00% 4 Missing and 2 partials :warning:
transport/grpc/handler.go 20.00% 2 Missing and 2 partials :warning:
transport/grpc/headers.go 90.00% 2 Missing and 2 partials :warning:
transport/tchannel/channel_outbound.go 0.00% 1 Missing and 1 partial :warning:
transport/tchannel/handler.go 77.77% 1 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #2267 +/- ## ========================================== - Coverage 85.20% 85.17% -0.03% ========================================== Files 270 272 +2 Lines 15555 15687 +132 ========================================== + Hits 13253 13361 +108 - Misses 1877 1890 +13 - Partials 425 436 +11 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.