- .NET
- Java
- Node.js
- Python
- Go
Before You Begin
Before beginning this guide, you should have:- Created a running Kubernetes cluster.
- Created a namespace named
honeycomb. - Deployed an OpenTelemetry Collector in DaemonSet mode, listening on the Node IP.
Step 1: Install the Operator
Install the OpenTelemetry Operator Pods into your cluster using a Helm chart:In this example, we want the Operator to add automatic instrumentation to a Go application, so we must include the
manager.featureGates configuration line to the command.
If you are working with a different programming language, you can omit this line.Step 2: Verify the Operator Installation
Check that the Operator is installed by using thekubectl command to see if the pod is running:
The result should contain one pod, with two containers, running under a name containing the prefix
opentelemetry-operator.kubectl command:
Step 3: Configure Automatic Instrumentation
Deploy an Instrumentation manifest to your Kubernetes cluster, which will enable the OpenTelemetry Operator to automatically instrument your services:View the Manifest File
View the Manifest File
- Inject instrumentation into your applications
- Configure the export to send data to the node’s IP address
Step 4: Add Annotations to Your Application’s Kubernetes Manifest
In the deployment manifest for your application, add the required annotations. These will vary according to programming language. For example, our Go application requires the following annotations. Note where the annotations are located in the manifest:- .NET
- Java
- Node.js
- Python
- Go
Possible values for the annotation include:
"true"- inject anInstrumentationKubernetes Custom Resource (CR) instance from the current namespace"my-instrumentation"- inject a specificInstrumentationCR instance from the current namespace"my-other-namespace/my-instrumentation"- inject a specificInstrumentationCR instance from another namespace"false"- do not inject anInstrumentationCR instance