Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for the WithMetricAttributesFn option for otelhttp middlewares #6542

Conversation

TanishqPorwar
Copy link
Contributor

add metricAttributesFn to http server handler in otelhttp, for dynamically setting per-request metric attributes

@TanishqPorwar TanishqPorwar requested review from dmathieu and a team as code owners December 29, 2024 20:04
@dmathieu
Copy link
Member

Could you add tests?

@TanishqPorwar
Copy link
Contributor Author

@dmathieu I have added some tests.

@dmathieu dmathieu changed the title add metricAttributesFn to http server handler in otelhttp Add support for the WithMetricAttributesFn option for otelhttp middlewares Jan 6, 2025
CHANGELOG.md Outdated Show resolved Hide resolved
TanishqPorwar and others added 2 commits January 6, 2025 14:20
Copy link

codecov bot commented Jan 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.5%. Comparing base (96acbc0) to head (57dafe0).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #6542   +/-   ##
=====================================
  Coverage   68.5%   68.5%           
=====================================
  Files        200     200           
  Lines      16772   16781    +9     
=====================================
+ Hits       11491   11500    +9     
  Misses      4935    4935           
  Partials     346     346           
Files with missing lines Coverage Δ
instrumentation/net/http/otelhttp/handler.go 92.8% <100.0%> (+0.4%) ⬆️

@dmathieu dmathieu merged commit 6ac9f50 into open-telemetry:main Jan 6, 2025
25 checks passed
@MrAlias MrAlias added this to the v1.34.0 milestone Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants