Skip to content

Conversation

@alhendrickson
Copy link
Collaborator

@alhendrickson alhendrickson commented Oct 29, 2025

Add prometheus metrics for collection on a /metrics API. Reasoning is I want to know requests per second, and average request duration across N instances of the service

Usage

Toggle on or off without the env variable

2025-10-29 13:42:15,144 [ACCESS] - 127.0.0.1:51960 - "GET /metrics HTTP/1.1" 404 Not Found
export APP_ENABLE_PROMETHEUS=true

2025-10-29 13:43:16,278 [ACCESS] - 127.0.0.1:54424 - "GET /metrics HTTP/1.1" 200 OK

Metrics can then be collected and shown in grafana, for example:

image

Copy link
Collaborator

@mart-r mart-r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, a lot of this is just linting. But overall straightforward.

@alhendrickson alhendrickson merged commit b583483 into main Nov 6, 2025
11 checks passed
@alhendrickson alhendrickson deleted the feat/medcat-service/add-prometheus branch November 6, 2025 14:36
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.

3 participants