You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 2, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: gdi/opentelemetry/automatic-discovery/k8s/k8s-backend.rst
+41-42Lines changed: 41 additions & 42 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -132,7 +132,7 @@ To properly ingest trace telemetry data, the attribute ``deployment.environment`
132
132
* - Through the values.yaml file ``environment`` configuration
133
133
- Applies the attribute to all telemetry data (metrics, logs, traces) exported through the collector.
134
134
- 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
136
136
- Allows you to set ``deployment.environment`` either for all auto-instrumented applications collectively or per auto-instrumentation language.
137
137
- Add the ``OTEL_RESOURCE_ATTRIBUTES`` environment variable, setting its value to ``deployment.environment=prd``.
138
138
* - 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:
173
173
operator:
174
174
enabled: true
175
175
instrumentation:
176
-
spec:
176
+
env:
177
+
- name: OTEL_RESOURCE_ATTRIBUTES
178
+
value: "deployment.environment=prd"
179
+
java:
177
180
env:
178
181
- 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"
184
183
185
184
.. tab:: Deployment YAML
186
185
@@ -191,13 +190,13 @@ The following examples show how to set the attribute using each method:
191
190
apiVersion: apps/v1
192
191
kind: Deployment
193
192
metadata:
194
-
name: my-java-app
193
+
name: my-java-app
195
194
spec:
196
-
template:
197
-
spec:
195
+
template:
196
+
spec:
198
197
containers:
199
198
- name: my-java-app
200
-
image: my-java-app:latest
199
+
image: my-java-app:latest
201
200
env:
202
201
- name: OTEL_RESOURCE_ATTRIBUTES
203
202
value: "deployment.environment=prd"
@@ -289,10 +288,10 @@ The annotation you set depends on the language runtime you're using. You can set
289
288
apiVersion: apps/v1
290
289
kind: Deployment
291
290
metadata:
292
-
name: my-java-app
293
-
namespace: monitoring
291
+
name: my-java-app
292
+
namespace: monitoring
294
293
spec:
295
-
template:
294
+
template:
296
295
spec:
297
296
containers:
298
297
- name: my-java-app
@@ -306,16 +305,16 @@ The annotation you set depends on the language runtime you're using. You can set
@@ -351,13 +350,13 @@ The annotation you set depends on the language runtime you're using. You can set
351
350
apiVersion: apps/v1
352
351
kind: Deployment
353
352
metadata:
354
-
name: my-dotnet-app
355
-
namespace: monitoring
353
+
name: my-dotnet-app
354
+
namespace: monitoring
356
355
spec:
357
-
template:
356
+
template:
358
357
spec:
359
-
containers:
360
-
- name: my-dotnet-app
358
+
containers:
359
+
- name: my-dotnet-app
361
360
image: my-dotnet-app:latest
362
361
363
362
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
0 commit comments