Skip to content

feat: Add option to auto generate histograms for each endpoint#15

Open
micrusa wants to merge 1 commit into
sanboxfrom
feat/metric-per-endpoint
Open

feat: Add option to auto generate histograms for each endpoint#15
micrusa wants to merge 1 commit into
sanboxfrom
feat/metric-per-endpoint

Conversation

@micrusa

@micrusa micrusa commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

Adds a feature that auto-generates an histogram for each endpoint found in the OpenAPI specification given.

Can be enabled by setting config metrics.autoGenerateEndpointHistograms or env value OASTLM_CONFIG_METRICS_AUTO_GENERATE_ENDPOINT_HISTOGRAMS to true (defaults to false)

Testing it:

  • Build (npm run build)
  • Spin up dev server (npm run dev). Has metrics.autoGenerateEndpointHistograms enabled by default
  • Call any test endpoint (for example: GET /api/v1/clinics: curl -X GET http://localhost:3000/api/v1/clinics
  • Go to http://localhost:5173 -> Open metrics -> See new histogram automatically created at the bottom of the page

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