|
| 1 | +//Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * observability/otel/otel-forwarding-data.adoc |
| 4 | + |
| 5 | +:_mod-docs-content-type: PROCEDURE |
| 6 | +[id="otel-forwarding-data-to-third-party-systems_{context}"] |
| 7 | += Forwarding telemetry data to third-party systems |
| 8 | + |
| 9 | +The OpenTelemetry Collector exports telemetry data by using the OTLP exporter via the OpenTelemetry Protocol (OTLP) that is implemented over the gRPC or HTTP transports. If you need to forward telemetry data to your third-party system and it does not support the OTLP or other supported protocol in the {OTELShortName}, then you can deploy an unsupported custom OpenTelemetry Collector that can receive telemetry data via the OTLP and export it to your third-party system by using a custom exporter. |
| 10 | + |
| 11 | +[WARNING] |
| 12 | +==== |
| 13 | +Red{nbsp}Hat does not support custom deployments. |
| 14 | +==== |
| 15 | + |
| 16 | +.Prerequisites |
| 17 | + |
| 18 | +* You have developed your own unsupported custom exporter that can export telemetry data via the OTLP to your third-party system. |
| 19 | +
|
| 20 | +.Procedure |
| 21 | + |
| 22 | +* Deploy a custom Collector either through the OperatorHub or manually: |
| 23 | +
|
| 24 | +** If your third-party system supports it, deploy the custom Collector by using the OperatorHub. |
| 25 | + |
| 26 | +** Deploy the custom Collector manually by using a config map, deployment, and service. |
| 27 | ++ |
| 28 | +.Example of a custom Collector deployment |
| 29 | +[source,yaml] |
| 30 | +---- |
| 31 | +apiVersion: v1 |
| 32 | +kind: ConfigMap |
| 33 | +metadata: |
| 34 | + name: custom-otel-collector-config |
| 35 | +data: |
| 36 | + otel-collector-config.yaml: | |
| 37 | + receivers: |
| 38 | + otlp: |
| 39 | + protocols: |
| 40 | + grpc: |
| 41 | + exporters: |
| 42 | + debug: {} |
| 43 | + prometheus: |
| 44 | + service: |
| 45 | + pipelines: |
| 46 | + traces: |
| 47 | + receivers: [otlp] |
| 48 | + exporters: [debug] # <1> |
| 49 | +--- |
| 50 | +apiVersion: apps/v1 |
| 51 | +kind: Deployment |
| 52 | +metadata: |
| 53 | + name: custom-otel-collector-deployment |
| 54 | +spec: |
| 55 | + replicas: 1 |
| 56 | + selector: |
| 57 | + matchLabels: |
| 58 | + component: otel-collector |
| 59 | + template: |
| 60 | + metadata: |
| 61 | + labels: |
| 62 | + component: otel-collector |
| 63 | + spec: |
| 64 | + containers: |
| 65 | + - name: opentelemetry-collector |
| 66 | + image: ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:latest # <2> |
| 67 | + command: |
| 68 | + - "/otelcol-contrib" |
| 69 | + - "--config=/conf/otel-collector-config.yaml" |
| 70 | + ports: |
| 71 | + - name: otlp |
| 72 | + containerPort: 4317 |
| 73 | + protocol: TCP |
| 74 | + volumeMounts: |
| 75 | + - name: otel-collector-config-vol |
| 76 | + mountPath: /conf |
| 77 | + readOnly: true |
| 78 | + volumes: |
| 79 | + - name: otel-collector-config-vol |
| 80 | + configMap: |
| 81 | + name: custom-otel-collector-config |
| 82 | +--- |
| 83 | +apiVersion: v1 |
| 84 | +kind: Service |
| 85 | +metadata: |
| 86 | + name: custom-otel-collector-service # <3> |
| 87 | + labels: |
| 88 | + component: otel-collector |
| 89 | +spec: |
| 90 | + type: ClusterIP |
| 91 | + ports: |
| 92 | + - name: otlp-grpc |
| 93 | + port: 4317 |
| 94 | + targetPort: 4317 |
| 95 | + selector: |
| 96 | + component: otel-collector |
| 97 | +---- |
| 98 | +<1> Replace `debug` with the required exporter for your third-party system. |
| 99 | +<2> Replace the image with the required version of the OpenTelemetry Collector that has the required exporter for your third-party system. |
| 100 | +<3> The service name is used in the Red Hat build of OpenTelemetry Collector CR to configure the OTLP exporter. |
0 commit comments