@@ -31,15 +31,7 @@ Instrumentation agents:
3131
3232## Activation and Configuration
3333
34- The following methods are supported to manually activate and configure Auto Instrumentation after installation of the
35- ` opentelemetry-injector ` deb/rpm package (requires ` root ` privileges):
36-
37- - [ System-wide] ( #system-wide-or-per-process )
38- - [ ` Systemd ` services only] ( #systemd-services-only )
39-
40- > ** Note** : To prevent conflicts and duplicate traces/metrics, only one method should be activated on the target system.
41-
42- ### System-wide or per process
34+ This method requires ` root ` privileges.
4335
44361 . Add the path of the provided ` /usr/lib/opentelemetry/libotelinject.so ` shared object library to the
4537 [ ` /etc/ld.so.preload ` ] ( https://man7.org/linux/man-pages/man8/ld.so.8.html#FILES ) file to activate Auto
@@ -121,59 +113,6 @@ Check the following for details about the auto-instrumtation agents and further
121113- [ Node.js] ( https://opentelemetry.io/docs/zero-code/js/configuration/ )
122114- [ .NET] ( https://opentelemetry.io/docs/zero-code/dotnet/configuration/ )
123115
124- ### ` Systemd ` services only
125-
126- > ** Note** : The following steps utilize a sample ` systemd ` drop-in file to activate/configure the provided agents for
127- > all ` systemd ` services via default environment variables. ` Systemd ` supports many options, methods, and paths for
128- > configuring environment variables at the system level or for individual services, and are not limited to the steps
129- > below. Before making any changes, it is recommended to consult the documentation specific to your Linux distribution
130- > or service, and check the existing configurations of the system and individual services for potential conflicts or to
131- > override an environment variable for a particular service. For general details about ` systemd ` , see the
132- > [ ` systemd ` man page] ( https://www.freedesktop.org/software/systemd/man/index.html ) .
133-
134- 1 . Copy the provided sample ` systemd ` drop-in file
135- ` /usr/lib/opentelemetry/examples/systemd/00-otelinject-instrumentation.conf ` to the host's ` systemd `
136- [ drop-in configuration directory] ( https://www.freedesktop.org/software/systemd/man/systemd-system.conf.html ) to
137- activate Auto Instrumentation for *** all*** supported applications running as ` systemd ` services. For example:
138- ```
139- mkdir -p /usr/lib/systemd/system.conf.d/ && cp /usr/lib/opentelemetry/examples/systemd/00-otelinject-instrumentation.conf /usr/lib/systemd/system.conf.d/
140- ```
141- This file includes the required environment variables to activate the respective agents with the default options:
142- - Java:
143- ```
144- DefaultEnvironment="JAVA_TOOL_OPTIONS=-javaagent:/usr/lib/opentelemetry/otel-javaagent.jar"
145- ```
146- - Node.js:
147- ```
148- DefaultEnvironment="NODE_OPTIONS=-r /usr/lib/opentelemetry/otel-js/node_modules/@opentelemetry/auto-instrumentations-node/register"
149- ```
150- - .NET
151- ```
152- DefaultEnvironment="CORECLR_ENABLE_PROFILING=1"
153- DefaultEnvironment="CORECLR_PROFILER={918728DD-259F-4A6A-AC2B-B85E1B658318}"
154- DefaultEnvironment="CORECLR_PROFILER_PATH=/usr/lib/opentelemetry/otel-dotnet/linux-x64/OpenTelemetry.AutoInstrumentation.Native.so"
155- DefaultEnvironment="DOTNET_ADDITIONAL_DEPS=/usr/lib/opentelemetry/otel-dotnet/AdditionalDeps"
156- DefaultEnvironment="DOTNET_SHARED_STORE=/usr/lib/opentelemetry/otel-dotnet/store"
157- DefaultEnvironment="DOTNET_STARTUP_HOOKS=/usr/lib/opentelemetry/otel-dotnet/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll"
158- DefaultEnvironment="OTEL_DOTNET_AUTO_HOME=/usr/lib/opentelemetry/otel-dotnet"
159- ```
160- 2. To configure the activated agents, add/update [`DefaultEnvironment`](
161- https://www.freedesktop.org/software/systemd/man/systemd-system.conf.html#DefaultEnvironment=) within the target file
162- from the previous step for the desired environment variables. For example:
163- ```
164- cat <<EOH >> /usr/lib/systemd/system.conf.d/00-otelinject-instrumentation.conf
165- DefaultEnvironment="OTEL_EXPORTER_OTLP_ENDPOINT=http://127.0.0.1:4317 "
166- DefaultEnvironment="OTEL_RESOURCE_ATTRIBUTES=deployment.environment=my_deployment_environment"
167- DefaultEnvironment="OTEL_SERVICE_NAME=my_service_name"
168- EOH
169- ```
170- Check the following for all supported environment variables and default values:
171- - [Java](https://opentelemetry.io/docs/zero-code/java/agent/configuration/)
172- - [Node.js](https://opentelemetry.io/docs/zero-code/js/configuration/)
173- - [.NET](https://opentelemetry.io/docs/zero-code/dotnet/configuration/)
174- 3. Reboot the system, or run `systemctl daemon-reload` and then restart the applicable `systemd` services for any
175- changes to take effect.
176-
177116## Contributing
178117
179118See [ CONTRIBUTING.md] ( CONTRIBUTING.md ) .
0 commit comments