-
Notifications
You must be signed in to change notification settings - Fork 165
Open
Description
Problem
As per the title, I don't know how to see total requests per endpoint.
Additional Note about uncertainty
I am not sure if the problem is my prometheus queries, or my configuration of flask prometheus itself. I believe the issue is with the configuration.
Question
How to configure prometheus_flask_exporter so that I can record flask_http_request_total per url_rule?
flask_http_request_total seems to group by response code only, but I want to record it on a url_rule bases
flask_http_request_duration_seconds_bucket and flask_http_request_duration_seconds_count and flask_http_request_duration_seconds_sum is grouped by url_rule by default.
What I've Tried
Below is my configuration. I have added default_labels but it doesn't help.
metrics = GunicornPrometheusMetrics.for_app_factory(
group_by="url_rule",
excluded_paths=[
"/js/*",
"/css/*",
"/images/*",
"/fonts/*",
],
default_labels={"url_rule": lambda: request.url_rule},
)
metrics.init_app(app)Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels