-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Controller name as metric label as option with .UsePrometheusRequestDurations() #44
Comments
Try to use "UseRouteName" it could resolve route name/pattern instead of raw path. |
@billpieper "UseRouteName" is working for you? |
No, unfortunately this does not meet our needs. We have [Route()] attributes decorating our controllers at a class level classes like this The I ended up forking and adding the option to include a label for |
@billpieper Yes, raise your PR, if work is already done, please. I want to create options to add app.UsePrometheusRequestDurations(q =>
{
q.IncludeConroller = true;
q.IncludeAction = true;
}); |
Published v3.5.0 |
We are migrating our applications from Prometheus-net to Prometheus.Client.
Prometheus-net had an extension method to
IApplicationBuilder
calledUseHttpMetrics()
. With the implementation in Prometheus.Client.HttpRequestDurations, I have been unable to identify a way to incorporate the controller name as a label in the metric. We really need this as if we use the path instead -- we end up with significant label explosion due to many parameters that are inorporated into our api route paths.Is there an existing way to get 'Controller' name as a label? and if not, is this something that could be added?
The text was updated successfully, but these errors were encountered: