Skip to content

[Feat] Adding header metric in thrift handler for unsafe headers - #2431

Open
pulkit4tech wants to merge 10 commits into
mainfrom
adding-header-metric-in-thrift-handler
Open

[Feat] Adding header metric in thrift handler for unsafe headers#2431
pulkit4tech wants to merge 10 commits into
mainfrom
adding-header-metric-in-thrift-handler

Conversation

@pulkit4tech

@pulkit4tech pulkit4tech commented Feb 16, 2026

Copy link
Copy Markdown
Collaborator
  • Description and context for reviewers: one partner, one stranger
    • Adding header metric in thrift handler for unsafe headers
      • setting meter in context when call start from observ middleware and used just before we encode and pass request to service handler
    • Testing - https://code.uberinternal.com/D21746817

Flow -
Screenshot 2026-02-16 at 11 11 09
setting MetricInfo in Obs middleware and used in thrift handlers

RELEASE NOTES: Adding header metric in thrift handler for unsafe headers

@codecov

codecov Bot commented Feb 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.18%. Comparing base (25d2ad2) to head (b77b870).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2431      +/-   ##
==========================================
+ Coverage   85.13%   85.18%   +0.05%     
==========================================
  Files         279      280       +1     
  Lines       16611    16657      +46     
==========================================
+ Hits        14141    14189      +48     
+ Misses       2010     2009       -1     
+ Partials      460      459       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread encoding/thrift/inbound_nowire.go Outdated

func (t thriftNoWireHandler) checkAndEmitUnsafeHeaders(meter *observability.MeterInfo, treq *transport.Request) {
if meter == nil || meter.Edge == nil || treq == nil {
fmt.Printf("Unable to emit unsafe headers metric due to missing meter info or request: meter=%v, treq=%v\n", meter, treq)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll remove this, was testing.

@pulkit4tech
pulkit4tech force-pushed the adding-header-metric-in-thrift-handler branch from 7b82621 to 9540c69 Compare February 16, 2026 13:41
Comment thread encoding/thrift/inbound_nowire.go Outdated
Comment thread encoding/thrift/inbound_nowire.go
@pulkit4tech
pulkit4tech force-pushed the adding-header-metric-in-thrift-handler branch from 9540c69 to 5147ad7 Compare February 16, 2026 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants