trallnag / prometheus-fastapi-instrumentator

Instrument your FastAPI with Prometheus metrics.
ISC License
948 stars 84 forks source link

Not full metrics list #273

Open FightingFox opened 12 months ago

FightingFox commented 12 months ago

Good day. I use prometheus_fastapi_instrumentator, version 6.0.0.

I create test application:

from prometheus_fastapi_instrumentator import Instrumentator

Instrumentator().instrument(app).expose(app)

# My app

and i see all metrics in Prometheus.

Снимок экрана 2023-10-23 в 17 15 45

But when I use this code in big productive application (with the same structure), I not see some metrics, for example http_requests_total.

Снимок экрана 2023-10-23 в 17 17 13

In test app:

Снимок экрана 2023-10-23 в 17 12 16

In productive app:

Снимок экрана 2023-10-23 в 17 12 31

Prometheus sees both sources:

Снимок экрана 2023-10-23 в 17 18 16

Can you help me?

FightingFox commented 12 months ago

Ok, probability prometheus_fastapi_instrumentator version 6.0.0 incompatible with FastAPI version 0.80.0. It's working with FastAPI 0.101.1.