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

trs/wip/metrics #245

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

trs/wip/metrics #245

wants to merge 1 commit into from

Conversation

tsibley
Copy link
Member

@tsibley tsibley commented Jul 23, 2021

wip! api: Expose api- and database-level metrics for Prometheus to scrape

This will let us understand both the volume of requests and request rate
as well as how long requests to the various endpoints are taking, so we
can look at bottlenecks.

Transparently uses a collector that supports multiple processes since in
production we use a hybrid multiprocess and threaded deployment with
uWSGI. This requires a directory for collecting the metrics from each
individual process, which are then aggregated and exported. Metrics are
exported at /v1/metrics.

If no collection directory is defined, then metrics are not collected
and exported.

Disables the default "flask_" prefix on metric names in order to use the
standard Prometheus http_* metrics names as exported by other services.

Disables the histogram metric for request durations to result in a
summary metric instead, which is simpler to deal with on the query side
and should be enough for our needs.

…rape

This will let us understand both the volume of requests and request rate
as well as how long requests to the various endpoints are taking, so we
can look at bottlenecks.

Transparently uses a collector that supports multiple processes since in
production we use a hybrid multiprocess and threaded deployment with
uWSGI.  This requires a directory for collecting the metrics from each
individual process, which are then aggregated and exported.  Metrics are
exported at /v1/metrics.

If no collection directory is defined, then metrics are not collected
and exported.

Disables the default "flask_" prefix on metric names in order to use the
standard Prometheus http_* metrics names as exported by other services.

Disables the histogram metric for request durations to result in a
summary metric instead, which is simpler to deal with on the query side
and should be enough for our needs.
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.

1 participant