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

build_info metric does not work with OpenTelemetry tracker #38

Closed brettimus closed 10 months ago

brettimus commented 1 year ago

We will need to wait for an upstream fix to the opentelemetry-python project's prometheus metric reader.

There is an open PR to fix this in the opentelemetry-python repo: https://github.com/open-telemetry/opentelemetry-python/pull/3306

emschwartz commented 1 year ago

If the main issue is that it reports it as a counter instead of a gauge, couldn't we just let it be a counter in the meantime? I think all the queries will still work correctly as long as the value of the counter remains at 1

brettimus commented 1 year ago

that's a fair point. what seems to happen though is no build_info metric is defined. only build_info_total

image image
emschwartz commented 1 year ago

Ah, oh course. That's annoying

brettimus commented 11 months ago

opentelemetry-python v1.20 includes the fix for this! i will open a PR that mentions this in the README (that versions before that do not work with build info)

brettimus commented 10 months ago

closed with #92