Skip to content

Commit e06625e

Browse files
pavolloffaymax-cx
authored andcommitted
TRACING-4635 | document OTEL instrumentation exporter TLS
Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
1 parent 9919a8d commit e06625e

File tree

1 file changed

+103
-0
lines changed

1 file changed

+103
-0
lines changed

modules/otel-config-instrumentation.adoc

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,32 @@ spec:
9898

9999
|===
100100

101+
.Default protocol for auto-instrumentation
102+
[options="header"]
103+
[cols="a, a"]
104+
|===
105+
|Auto-instrumentation | Default protocol
106+
107+
|Java 1.x
108+
|`otlp/grpc`
109+
110+
|Java 2.x
111+
|`otlp/http`
112+
113+
|Python
114+
|`otlp/http`
115+
116+
|+.NET+
117+
|`otlp/http`
118+
119+
|Go
120+
|`otlp/http`
121+
122+
|Apache HTTP Server
123+
|`otlp/grpc`
124+
125+
|===
126+
101127
[id="otel-configuration-of-opentelemetry-sdk-variables_{context}"]
102128
== Configuration of the OpenTelemetry SDK variables
103129

@@ -132,6 +158,83 @@ You can use the `instrumentation.opentelemetry.io/inject-sdk` annotation in the
132158

133159
|===
134160

161+
[id="otel-instrumentation-options_exporter_{context}"]
162+
== Exporter configuration
163+
164+
Although the `Instrumentation` custom resource supports setting up one or more exporters per signal, auto-instrumentation configures only the OTLP Exporter. So you must configure the endpoint to point to the OTLP Receiver on the Collector.
165+
166+
.Sample exporter TLS CA configuration using a config map
167+
[source,yaml]
168+
----
169+
apiVersion: opentelemetry.io/v1alpha1
170+
kind: Instrumentation
171+
# ...
172+
spec
173+
# ...
174+
exporter:
175+
endpoint: https://production-collector.observability.svc.cluster.local:4317 # <1>
176+
tls:
177+
configMapName: ca-bundle # <2>
178+
ca_file: service-ca.crt # <3>
179+
# ...
180+
----
181+
<1> Specifies the OTLP endpoint using the HTTPS scheme and TLS.
182+
<2> Specifies the name of the config map. The config map must already exist in the namespace of the pod injecting the auto-instrumentation.
183+
<3> Points to the CA certificate in the config map or the absolute path to the certificate if the certificate is already present in the workload file system.
184+
185+
.Sample exporter mTLS configuration using a Secret
186+
[source,yaml]
187+
----
188+
apiVersion: opentelemetry.io/v1alpha1
189+
kind: Instrumentation
190+
# ...
191+
spec
192+
# ...
193+
exporter:
194+
endpoint: https://production-collector.observability.svc.cluster.local:4317 # <1>
195+
tls:
196+
secretName: serving-certs # <2>
197+
ca_file: service-ca.crt # <3>
198+
cert_file: tls.crt # <4>
199+
key_file: tls.key # <5>
200+
# ...
201+
----
202+
<1> Specifies the OTLP endpoint using the HTTPS scheme and TLS.
203+
<2> Specifies the name of the Secret for the `ca_file`, `cert_file`, and `key_file` values. The Secret must already exist in the namespace of the pod injecting the auto-instrumentation.
204+
<3> Points to the CA certificate in the Secret or the absolute path to the certificate if the certificate is already present in the workload file system.
205+
<4> Points to the client certificate in the Secret or the absolute path to the certificate if the certificate is already present in the workload file system.
206+
<5> Points to the client key in the Secret or the absolute path to a key if the key is already present in the workload file system.
207+
208+
[NOTE]
209+
====
210+
You can provide the CA certificate in a config map or Secret. If you provide it in both, the config map takes higher precedence than the Secret.
211+
====
212+
213+
.Example configuration for CA bundle injection by using a config map and `Instrumentation` CR
214+
[source,yaml]
215+
----
216+
apiVersion: v1
217+
kind: ConfigMap
218+
metadata:
219+
name: otelcol-cabundle
220+
namespace: tutorial-application
221+
annotations:
222+
service.beta.openshift.io/inject-cabundle: "true"
223+
# ...
224+
---
225+
apiVersion: opentelemetry.io/v1alpha1
226+
kind: Instrumentation
227+
metadata:
228+
name: my-instrumentation
229+
spec:
230+
exporter:
231+
endpoint: https://simplest-collector.tracing-system.svc.cluster.local:4317
232+
tls:
233+
configMapName: otelcol-cabundle
234+
ca: service-ca.crt
235+
# ...
236+
----
237+
135238
[id="otel-configuration-of-apache-http-server-auto-instrumentation_{context}"]
136239
== Configuration of the Apache HTTP Server auto-instrumentation
137240

0 commit comments

Comments
 (0)