Skip to content

Commit 83ed471

Browse files
pavolloffayeromanova97
authored andcommitted
OBSDOCS-2335: Custom exporters with OpenTelemetry
Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
1 parent 4d545c6 commit 83ed471

File tree

2 files changed

+107
-0
lines changed

2 files changed

+107
-0
lines changed
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
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.

observability/otel/otel-forwarding-telemetry-data.adoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,10 @@ You can use the OpenTelemetry Collector to forward your telemetry data.
1111
include::modules/otel-forwarding-traces.adoc[leveloffset=+1]
1212

1313
include::modules/otel-forwarding-logs-to-tempostack.adoc[leveloffset=+1]
14+
15+
include::modules/otel-forwarding-data-to-third-party-systems.adoc[leveloffset=+1]
16+
17+
[role="_additional-resources"]
18+
[id="additional-resources_{context}"]
19+
== Additional resources
20+
* link:https://opentelemetry.io/docs/specs/otlp/[OpenTelemetry Protocol (OTLP)]

0 commit comments

Comments
 (0)