Forwarding Traces to a Jaeger Instance

To send traces to a Jaeger instance, deploy an OpenTelemetry Collector in deployment mode and configure a trace pipeline that exports data to the Jaeger collector endpoint.

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 the cluster-admin role.
  • Enable Automatic RBAC creation by following the instructions in Procedure.

Procedure

  1. Create an OpenTelemetryCollector resource:

    kubectl apply -f - <<EOF
    apiVersion: opentelemetry.io/v1beta1
    kind: OpenTelemetryCollector
    metadata:
      name: otel
      namespace: jaeger-system
    spec:
      mode: deployment
      replicas: 1
      config:
        receivers:
          jaeger:
            protocols:
              grpc: {}
              thrift_binary: {}
              thrift_compact: {}
              thrift_http: {}
          otlp:
            protocols:
              grpc:
                endpoint: 0.0.0.0:4317
              http:
                endpoint: 0.0.0.0:4318
          zipkin: {}
        processors:
          batch: {}
          k8sattributes: {}
          memory_limiter:
            check_interval: 1s
            limit_percentage: 80
            spike_limit_percentage: 20
        exporters:
          otlp/traces:
            endpoint: "jaeger-collector.jaeger-system.svc.cluster.local:4317"
            tls:
              insecure: true
        service:
          pipelines:
            traces:
              receivers: [jaeger, otlp, zipkin] 
              processors: [memory_limiter, k8sattributes, batch]
              exporters: [otlp/traces]
    EOF
    1. The namespace determines where the Collector resources are created.
    2. The exporter endpoint must point to the Jaeger collector service. Replace jaeger-collector.jaeger-system.svc.cluster.local:4317 with the actual service of your Jaeger deployment.
    3. This trace pipeline accepts Jaeger, OTLP, and Zipkin traffic. Configure your instrumented applications to send traces by using one of these receiver protocols.

After the Collector is running, instrumented applications can send trace data to the Collector service endpoint, and the Collector forwards the traces to Jaeger.

TIP

You can deploy telemetrygen as a test client:

kubectl apply -f - <<EOF
apiVersion: v1
kind: Pod
metadata:
  name: telemetrygen
  namespace: jaeger-system
spec:
  restartPolicy: Never
  containers:
    - name: telemetrygen
      image: ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:latest
      args:
        - traces
        - --otlp-endpoint=otel-collector.jaeger-system.svc.cluster.local:4317
        - --otlp-insecure
        - --duration=150s
        - --interval=5s
        - --child-spans=3
        - --rate=2
        - --service=telemetrygen
        - --workers=1
EOF
# Wait for telemetrygen to complete, then clean up the test Pod
kubectl wait -n jaeger-system --for=jsonpath='{.status.phase}'=Succeeded pod/telemetrygen --timeout=10m
kubectl delete pod -n jaeger-system telemetrygen