autometrics-dev / autometrics-py

Easily add metrics to your code that actually help you spot and debug issues in production. Built on Prometheus and OpenTelemetry.
https://autometrics.dev
Apache License 2.0
214 stars 7 forks source link

Automatically serve `/metrics` on port 9464 #69

Closed brettimus closed 1 year ago

brettimus commented 1 year ago

From the Typescript docs:

By default the TypeScript library makes the metrics available on :9464/metrics. Make sure your Prometheus is configured correctly to find it.

autometrics-py should do something similar!

actualwitch commented 1 year ago

i think there's still no decision on how to standardize it https://github.com/orgs/autometrics-dev/discussions/32

IvanMerrill commented 1 year ago

if we don't do this then we should update the python documentation to show that the metrics endpoint needs to be created. This is what we've done in the SLO guides, and it's done in a couple of different ways in the examples (either specifically creating the endpoint or using the prometheus client to start an http server) but it's not in the basic documentation.