Skip to content

Database metrics only appear after deployment #3885

@jairhenrique

Description

@jairhenrique

Component(s)

auto-instrumentation, collector

What happened?

Description

Hi 👋

We are experiencing an issue with our application deployed on Kubernetes. The application utilizes FastAPI, Redis, and Elasticsearch. We have automatic OTEL instrumentation configured via annotations in the deployment.

While the FastAPI transaction/throughput metrics are successfully reaching our data visualization tool, the Redis and Elasticsearch database metrics are not being displayed.

Interestingly, when we perform a new deployment of the application, the historical metrics for Redis and Elasticsearch appear briefly, but then stop being collected.

We have not identified any error messages in the application logs.
We can see the Redis and Elasticsearch metrics in the logs when we set OTEL_METRICS_EXPORTER and OTEL_TRACES_EXPORTER to console.

Kubernetes Version

1.30

Operator version

0.119.0

Collector version

0.120.0

Environment information

Environment

python: 3:13:1
autoinstrumentation-python: 0.51b0
fastapi: 0.115.12

Log output

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions