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

[Instrumentation.Http] Support for enrich and filter delegates for http client metric #4148

Conversation

aunikitin
Copy link

Hello, I'd like to have an opportunity to enrich metrics with custom logic (for example uri templates of requested paths). Also I add opportunity to filter some requests because of TODO in MeterProviderBuilderExtensions
I tried to use existing HttpClientInstrumentationOptions but firstly, they have too mutch for metrics and secondly, because in the HttpHandlerMetricsDiagnosticListener we are not allowed to take tags from activity (because of uncontrolled source of filling), that's why delegates in settings don't fit .
Also I wrote some tests and did small refactoring in them (move trace tests in one file; split configuration tests from common, because they don't need running HttpListener).
If my changes are admissible, I will add description to CHANGELOG.md.

Probably it resolves issue

Changes

Please provide a brief description of the changes here.

For significant contributions please make sure you have completed the following items:

  • Appropriate CHANGELOG.md updated for non-trivial changes
  • Design discussion issue #
  • Changes in public API reviewed

@aunikitin aunikitin requested a review from a team February 4, 2023 16:53
@aunikitin aunikitin closed this Feb 4, 2023
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.

Enrich support for HttpClientMetrics
1 participant