Kaktusowy
Kaktusowy

Reputation: 11

JVM metrics through opentelemetry collector for multiple pods

I'm using opentelemetry auto instrumentation on my Kubernetes cluster. Metrics and traces are transmitted via OTLP to opentelemetry collector. Prometheus' metrics are being exposed by Collector. It works fine when deployment has only one replica. The JVM metric runtime_jvm_memory_pool has the label exported_job with the value of the deployment name rather than the pod name.

I'm running my apps in more than 1 replica, so now I would like to change the value of exported_job to the pod name. How can I do that?

Thank you all in advance.

Upvotes: 1

Views: 604

Answers (1)

Kaktusowy
Kaktusowy

Reputation: 11

Enabling option resource_to_telemetry_conversion fixed my problem.

In collector configuration:

exporters:
 prometheus:
   resource_to_telemetry_conversion:
     enabled: true

Upvotes: 0

Related Questions