Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Prometheus exporter does not work with multiprocessing #3747

Open
@bastbu

Description

@bastbu

Describe your environment

When instrumenting metrics using OpenTelemetry Python 0.44b0 and exporting them using opentelemetry-exporter-prometheus when using multiprocessing, not all metrics are exposed on the metrics endpoint.

I assume that this comes from the underlying limitation from prometheus_client, which states that multiprocess mode does not work with custom collectors. It could be worth mentioning this limitation in the Prometheus exporter docs.

Steps to reproduce

  • Raise metrics in multiprocessing mode when having the Prometheus exporter enabled
  • Not all metrics are exposed on Prometheus endpoint

What is the expected behavior?

All raised metrics are exposed on the Prometheus endpoint.

What is the actual behavior?

Not all metrics are exposed on the Prometheus endpoint.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocDocumentation-relatedhelp wanted

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions