Forwarding Telemetry Data to Third-Party Systems

The OpenTelemetry Collector exports telemetry data by using the OTLP exporter over the OpenTelemetry Protocol (OTLP), which supports both gRPC and HTTP transports. If you need to forward telemetry data to a third-party system that does not support OTLP or another protocol supported by Alauda Build of OpenTelemetry v2, you can deploy an unsupported custom OpenTelemetry Collector that receives telemetry data over OTLP and forwards it to the target system by using a custom exporter.

WARNING

Alauda does not support custom Collector deployments for third-party forwarding scenarios.

Prerequisites

  • You have developed your own unsupported custom exporter that can forward telemetry data to your third-party system.
  • An active ACP CLI (kubectl) session by a cluster administrator with the cluster-admin role.

Procedure

  1. Create a ConfigMap for the custom Collector configuration:

    apiVersion: v1
    kind: ConfigMap
    metadata:
      name: custom-otel-collector-config
    data:
      otel-collector-config.yaml: |
        receivers:
          otlp:
            protocols:
              grpc:
        exporters:
          # Replace debug with the exporter required by your third-party system.
          debug: {}
        service:
          pipelines:
            traces:
              receivers: [otlp]
              exporters: [debug]
    1. Replace debug with the exporter required by your third-party system.
  2. Deploy the custom Collector and mount the configuration from the ConfigMap:

    apiVersion: apps/v1
    kind: Deployment
    metadata:
      name: custom-otel-collector-deployment
    spec:
      replicas: 1
      selector:
        matchLabels:
          component: otel-collector
      template:
        metadata:
          labels:
            component: otel-collector
        spec:
          containers:
          - name: opentelemetry-collector
            image: ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:latest
            command:
            - "/otelcol-contrib"
            - "--config=/conf/otel-collector-config.yaml"
            ports:
            - name: otlp
              containerPort: 4317
              protocol: TCP
            volumeMounts:
            - name: otel-collector-config-vol
              mountPath: /conf
              readOnly: true
          volumes:
          - name: otel-collector-config-vol
            configMap:
              name: custom-otel-collector-config
    1. Replace the image with the required OpenTelemetry Collector version that includes the exporter needed by your third-party system.
  3. Expose the custom Collector with a Service:

    apiVersion: v1
    kind: Service
    metadata:
      name: custom-otel-collector-service
      labels:
        component: otel-collector
    spec:
      type: ClusterIP
      ports:
      - name: otlp-grpc
        port: 4317
        targetPort: 4317
      selector:
        component: otel-collector
    1. The service name is used when you configure the OTLP exporter in the Alauda Build of OpenTelemetry v2 Collector custom resource.
  4. Apply the resources:

    kubectl apply -f custom-collector-configmap.yaml
    kubectl apply -f custom-collector-deployment.yaml
    kubectl apply -f custom-collector-service.yaml