Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.