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

Commit a3a14a1

Browse files
committed
final version
1 parent 7459af4 commit a3a14a1

File tree

1 file changed

+21
-22
lines changed

1 file changed

+21
-22
lines changed

gdi/get-data-in/application/otel-dotnet/instrumentation/instrument-dotnet-application.rst

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -436,28 +436,27 @@ To deploy the .NET agent in Kubernetes, follow these steps:
436436
#. Configure the Kubernetes Downward API to expose environment variables to Kubernetes resources. The following example demonstrates how to update a deployment to expose environment variables by adding the agent configuration under the ``.spec.template.spec.containers.env`` section:
437437

438438
.. code-block:: yaml
439-
440-
apiVersion: apps/v1
441-
kind: Deployment
442-
spec:
443-
selector:
444-
matchLabels:
445-
app: your-application
446-
template:
447-
spec:
448-
containers:
449-
- name: myapp
450-
env:
451-
- name: SPLUNK_OTEL_AGENT
452-
valueFrom:
453-
fieldRef:
454-
fieldPath: status.hostIP
455-
- name: OTEL_EXPORTER_OTLP_ENDPOINT
456-
value: "http://$(SPLUNK_OTEL_AGENT):4318"
457-
- name: OTEL_SERVICE_NAME
458-
value: "<serviceName>"
459-
- name: OTEL_RESOURCE_ATTRIBUTES
460-
value: "deployment.environment=<environmentName>"
439+
apiVersion: apps/v1
440+
kind: Deployment
441+
spec:
442+
selector:
443+
matchLabels:
444+
app: your-application
445+
template:
446+
spec:
447+
containers:
448+
- name: myapp
449+
env:
450+
- name: SPLUNK_OTEL_AGENT
451+
valueFrom:
452+
fieldRef:
453+
fieldPath: status.hostIP
454+
- name: OTEL_EXPORTER_OTLP_ENDPOINT
455+
value: "http://$(SPLUNK_OTEL_AGENT):4318"
456+
- name: OTEL_SERVICE_NAME
457+
value: "<serviceName>"
458+
- name: OTEL_RESOURCE_ATTRIBUTES
459+
value: "deployment.environment=<environmentName>"
461460
462461
.. note:: You can also deploy instrumentation using the Kubernetes Operator. See :ref:`k8s-backend-auto-discovery` for more information.
463462
.. _export-directly-to-olly-cloud-dotnet-otel:

0 commit comments

Comments
 (0)