Menu
Grafana Cloud

Application Observability with Kubernetes OpenTelemetry Operator

If you deploy your application in Kubernetes, you can use the OpenTelemetry Operator to instrument your application and send telemetry data to Grafana Cloud.

The OpenTelemetry Operator is a Kubernetes operator that:

  1. Simplifies the deployment and management of OpenTelemetry components in Kubernetes.
  2. Can automatically inject OpenTelemetry instrumentation into Kubernetes workloads.

Setup

Follow the OpenTelemetry Operator installation guide to install the OpenTelemetry Operator in your Kubernetes cluster.

Kubernetes Monitoring

It’s recommended to use Kubernetes (Alloy) as a starting point for monitoring your Kubernetes cluster.

Skip the optional step to install the OpenTelemetry Collector and use the OTLP endpoint provided by the Kubernetes Alloy setup where an exporter endpoint is required.

Using Grafana OpenTelemetry Distributions

The OpenTelemetry Operator supports the use of the custom Docker images for auto-instrumentation, which can be used for Grafana OpenTelemetry distributions.

The OpenTelemetry Operator is not limited to the Grafana OpenTelemetry distributions - or to Java.

All supported languages can be found in the OpenTelemetry Operator documentation.

Use the Grafana OpenTelemetry Distribution for Java

In the Java guide, add the following to the Kubernetes Instrumentation manifest to use the Grafana OpenTelemetry Distribution for Java:

yaml
spec:
  java:
    image: us-docker.pkg.dev/grafanalabs-global/docker-grafana-opentelemetry-java-prod/grafana-opentelemetry-java:2.3.0-beta.1
  exporter:
    ..

If you use the Helm chart, set the image using helm instead of manually editing the Instrumentation manifest.

console
helm upgrade opentelemetry-operator open-telemetry/opentelemetry-operator --set manager.autoInstrumentationImage.java.repository=us-docker.pkg.dev/grafanalabs-global/docker-grafana-opentelemetry-java-prod/grafana-opentelemetry-java,manager.autoInstrumentationImage.java.tag=2.3.0-beta.1

Note

The docker tag 2.3.0-beta.1 corresponds is exactly the same as the version of the release page with the v prefix removed.