Skip to content
This repository was archived by the owner on Sep 2, 2025. It is now read-only.

Commit d81d3d9

Browse files
initial commit
1 parent 43d3fff commit d81d3d9

File tree

1 file changed

+41
-42
lines changed

1 file changed

+41
-42
lines changed

gdi/opentelemetry/automatic-discovery/k8s/k8s-backend.rst

Lines changed: 41 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ To properly ingest trace telemetry data, the attribute ``deployment.environment`
132132
* - Through the values.yaml file ``environment`` configuration
133133
- Applies the attribute to all telemetry data (metrics, logs, traces) exported through the collector.
134134
- The chart will set an attribute processor to add ``deployment.environment=prd`` to all telemetry data processed by the collector.
135-
* - Through the values.yaml file and ``operator.instrumentation.spec.env`` or ``operator.instrumentation.spec.{instrumentation_library}.env`` configuration
135+
* - Through the values.yaml file and ``operator.instrumentation.env`` or ``operator.instrumentation.{instrumentation_library}.env`` configuration
136136
- Allows you to set ``deployment.environment`` either for all auto-instrumented applications collectively or per auto-instrumentation language.
137137
- Add the ``OTEL_RESOURCE_ATTRIBUTES`` environment variable, setting its value to ``deployment.environment=prd``.
138138
* - Through your Kubernetes application deployment, daemonset, or pod specification
@@ -173,14 +173,13 @@ The following examples show how to set the attribute using each method:
173173
operator:
174174
enabled: true
175175
instrumentation:
176-
spec:
176+
env:
177+
- name: OTEL_RESOURCE_ATTRIBUTES
178+
value: "deployment.environment=prd"
179+
java:
177180
env:
178181
- name: OTEL_RESOURCE_ATTRIBUTES
179-
value: "deployment.environment=prd"
180-
java:
181-
env:
182-
- name: OTEL_RESOURCE_ATTRIBUTES
183-
value: "deployment.environment=prd-canary-java"
182+
value: "deployment.environment=prd-canary-java"
184183
185184
.. tab:: Deployment YAML
186185

@@ -191,13 +190,13 @@ The following examples show how to set the attribute using each method:
191190
apiVersion: apps/v1
192191
kind: Deployment
193192
metadata:
194-
name: my-java-app
193+
name: my-java-app
195194
spec:
196-
template:
197-
spec:
195+
template:
196+
spec:
198197
containers:
199198
- name: my-java-app
200-
image: my-java-app:latest
199+
image: my-java-app:latest
201200
env:
202201
- name: OTEL_RESOURCE_ATTRIBUTES
203202
value: "deployment.environment=prd"
@@ -289,10 +288,10 @@ The annotation you set depends on the language runtime you're using. You can set
289288
apiVersion: apps/v1
290289
kind: Deployment
291290
metadata:
292-
name: my-java-app
293-
namespace: monitoring
291+
name: my-java-app
292+
namespace: monitoring
294293
spec:
295-
template:
294+
template:
296295
spec:
297296
containers:
298297
- name: my-java-app
@@ -306,16 +305,16 @@ The annotation you set depends on the language runtime you're using. You can set
306305
apiVersion: apps/v1
307306
kind: Deployment
308307
metadata:
309-
name: my-java-app
310-
namespace: monitoring
308+
name: my-java-app
309+
namespace: monitoring
311310
spec:
312-
template:
311+
template:
313312
metadata:
314-
annotations:
313+
annotations:
315314
instrumentation.opentelemetry.io/inject-java: "true"
316315
spec:
317-
containers:
318-
- name: my-java-app
316+
containers:
317+
- name: my-java-app
319318
image: my-java-app:latest
320319
321320
.. tab:: .NET
@@ -351,13 +350,13 @@ The annotation you set depends on the language runtime you're using. You can set
351350
apiVersion: apps/v1
352351
kind: Deployment
353352
metadata:
354-
name: my-dotnet-app
355-
namespace: monitoring
353+
name: my-dotnet-app
354+
namespace: monitoring
356355
spec:
357-
template:
356+
template:
358357
spec:
359-
containers:
360-
- name: my-dotnet-app
358+
containers:
359+
- name: my-dotnet-app
361360
image: my-dotnet-app:latest
362361
363362
Activate automatic discovery by adding ``instrumentation.opentelemetry.io/otel-dotnet-auto-runtime: "linux-x64"`` and ``instrumentation.opentelemetry.io/inject-dotnet: "monitoring/splunk-otel-collector"`` to the ``spec``:
@@ -368,18 +367,18 @@ The annotation you set depends on the language runtime you're using. You can set
368367
apiVersion: apps/v1
369368
kind: Deployment
370369
metadata:
371-
name: my-dotnet-app
372-
namespace: monitoring
370+
name: my-dotnet-app
371+
namespace: monitoring
373372
spec:
374-
template:
373+
template:
375374
metadata:
376-
annotations:
375+
annotations:
377376
instrumentation.opentelemetry.io/otel-dotnet-auto-runtime: "linux-x64"
378377
instrumentation.opentelemetry.io/inject-dotnet: "monitoring/splunk-otel-collector"
379-
spec:
378+
spec:
380379
containers:
381380
- name: my-dotnet-app
382-
image: my-dotnet-app:latest
381+
image: my-dotnet-app:latest
383382
384383
.. tab:: ``linux-musl-x64``
385384

@@ -431,13 +430,13 @@ The annotation you set depends on the language runtime you're using. You can set
431430
apiVersion: apps/v1
432431
kind: Deployment
433432
metadata:
434-
name: my-nodejs-app
435-
namespace: monitoring
433+
name: my-nodejs-app
434+
namespace: monitoring
436435
spec:
437-
template:
436+
template:
438437
spec:
439-
containers:
440-
- name: my-nodejs-app
438+
containers:
439+
- name: my-nodejs-app
441440
image: my-nodejs-app:latest
442441
443442
Activate automatic discovery by adding ``instrumentation.opentelemetry.io/inject-nodejs: "true"`` to the ``spec``:
@@ -448,16 +447,16 @@ The annotation you set depends on the language runtime you're using. You can set
448447
apiVersion: apps/v1
449448
kind: Deployment
450449
metadata:
451-
name: my-nodejs-app
452-
namespace: monitoring
450+
name: my-nodejs-app
451+
namespace: monitoring
453452
spec:
454-
template:
453+
template:
455454
metadata:
456-
annotations:
455+
annotations:
457456
instrumentation.opentelemetry.io/inject-nodejs: "true"
458457
spec:
459-
containers:
460-
- name: my-nodejs-app
458+
containers:
459+
- name: my-nodejs-app
461460
image: my-nodejs-app:latest
462461
463462
Applying annotations in a different namespace

0 commit comments

Comments
 (0)