Sending Telemetry Data to the OpenTelemetry Collector with Sidecar Injection
You can configure the Alauda build of OpenTelemetry v2 to inject the OpenTelemetry Collector as a sidecar container into your application pods. The sidecar Collector runs in the same pod as your application, enabling applications to send telemetry data to the Collector via localhost without complex network configuration.
Prerequisites
- Alauda build of OpenTelemetry v2 Operator is installed.
- Alauda Build of Jaeger v2 is installed and deployed.
- An active ACP CLI (
kubectl) session by a cluster administrator with thecluster-adminrole.
Procedure
-
Deploy the OpenTelemetry Collector as a sidecar by running the following command:
- Replace
<image-registry>/asm/opentelemetry-collector:<image-tag>with the actual image registry and tag for the sidecar Collector. - Replace
jaeger-<example>-collectorwith the actual service name of your Alauda Build of Jaeger v2 collector. The format is typically<instance-name>-collector.
- Replace
-
Create a deployment that uses the sidecar injection by adding the annotation
sidecar.opentelemetry.io/inject: "true"and using the created ServiceAccount: