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

Commit 4d93aed

Browse files
committed
new version of code paste
1 parent d40fd8e commit 4d93aed

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

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

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -436,28 +436,28 @@ 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+
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>"
461461

462462
.. note:: You can also deploy instrumentation using the Kubernetes Operator. See :ref:`k8s-backend-auto-discovery` for more information.
463463
.. _export-directly-to-olly-cloud-dotnet-otel:

0 commit comments

Comments
 (0)