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

Update custom metric in AspNetCore example #1769

Open
danelson opened this issue Feb 8, 2023 · 0 comments
Open

Update custom metric in AspNetCore example #1769

danelson opened this issue Feb 8, 2023 · 0 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@danelson
Copy link

danelson commented Feb 8, 2023

open-telemetry/opentelemetry-dotnet#4107 updated the AspNetCore example to include custom metrics and activities. There was some discussion related to the counter that was added. The current implementation shows the correct pattern for meter/instrument creation, but it does not do a great job of providing a meaningful metric.

Ideally the metric would be reworked so that it is:

  • Unique - Provides meaning outside of something like the number of times the endpoint was executed which can be determined from metrics being created by AddAspNetCoreInstrumentation
  • Contextual - Provides meaning in the context of the work being performed (generating a forecast)

Suggestions include:

  • Adding a dimension to the metric
  • Retrieving forecasts from a cache and measuring cache hits/misses
  • Return variable length forecasts and measure those that exceed a certain number of days (simulating expensive operations)

Notes:

  • The custom metric does not need to be a counter
@danelson danelson added the enhancement New feature or request label Feb 8, 2023
@vishweshbankwar vishweshbankwar transferred this issue from open-telemetry/opentelemetry-dotnet May 14, 2024
@Kielek Kielek added comp:extensions.enrichment.aspnetcore Things related to OpenTelemetry.Extensions.Enrichment.AspNetCore documentation Improvements or additions to documentation and removed comp:extensions.enrichment.aspnetcore Things related to OpenTelemetry.Extensions.Enrichment.AspNetCore labels May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants