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

[ASP.NET Core] Remove suppression for metrics generated from prometheus #5044

Conversation

vishweshbankwar
Copy link
Member

@vishweshbankwar vishweshbankwar commented Nov 13, 2023

Fixes #
Design discussion issue #

Changes

Remove the special handling of metrics generated as a result of metrics pull from Prometheus endpoint. Any filtering (if at all) should be handled by generic filtering mechanism (if one is available in future).

Please provide a brief description of the changes here.

Merge requirement checklist

  • CONTRIBUTING guidelines followed (nullable enabled, static analysis, etc.)
  • Unit tests added/updated
  • Appropriate CHANGELOG.md files updated for non-trivial changes
  • Changes in public API reviewed (if applicable)

@vishweshbankwar vishweshbankwar changed the title [ASP.NET Core] Remove suppression for prometheus metrics [ASP.NET Core] Remove suppression for metrics generated from prometheus Nov 13, 2023
@vishweshbankwar vishweshbankwar marked this pull request as ready for review November 13, 2023 16:56
@vishweshbankwar vishweshbankwar requested a review from a team November 13, 2023 16:56
Copy link

codecov bot commented Nov 13, 2023

Codecov Report

Merging #5044 (64c056c) into main (c062e12) will increase coverage by 0.24%.
Report is 1 commits behind head on main.
The diff coverage is n/a.

❗ Current head 64c056c differs from pull request most recent head c3d9e37. Consider uploading reports for the commit c3d9e37 to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #5044      +/-   ##
==========================================
+ Coverage   83.34%   83.58%   +0.24%     
==========================================
  Files         296      296              
  Lines       12475    12473       -2     
==========================================
+ Hits        10397    10426      +29     
+ Misses       2078     2047      -31     
Flag Coverage Δ
unittests 83.58% <ø> (+0.24%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...AspNetCore/Implementation/HttpInMetricsListener.cs 89.55% <ø> (+1.14%) ⬆️

... and 5 files with indirect coverage changes

@@ -35,6 +35,11 @@ exception. The attribute value will be set to full name of exception type.
* Fixed `network.protocol.version` attribute values to match the specification.
([#5007](https://github.com/open-telemetry/opentelemetry-dotnet/pull/5007))

* Removed filtering of metrics when the request path contained `/metrics`. This
change may affect prometheus pull scenario if the prometheus server sends
Copy link
Member

@cijothomas cijothomas Nov 13, 2023

Choose a reason for hiding this comment

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

Probably nit picking, but the wording "may affect" may not be clear as to what is the effect? The effect of this PR is - metrics now include measurements from prometheus scrape requests. So one possible effect is - users see more count and their avge, etc might be affected. Eg: the service's latency is one-digit-ms only, but prometheus scrapes take seconds.. Now, by including prometheus scrapes to the latency metric, it may give false impression that the service slowed! It could be immaterial, if prom scrapes are a minute fraction (quite likely.)

Not a blocker for the PR!

Copy link
Member Author

Choose a reason for hiding this comment

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

I reworded first line a bit more. The point about latency is valid but I don't think it falls under the instrumentation library's scope (library simply reports metrics). I think it was a bug that we were filtering measurements and not giving the full picture.

@utpilla utpilla merged commit 78ab35c into open-telemetry:main Nov 13, 2023
70 checks passed
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.

5 participants