Skip to content

Commit 87f0706

Browse files
committed
docs(readme): update documentation on service name auto-detection
1 parent be71b6c commit 87f0706

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,15 @@ Configuration
1010

1111
### <a id="DASH0_AUTOMATIC_SERVICE_NAME">DASH0_AUTOMATIC_SERVICE_NAME</a>
1212

13-
If no `OTEL_SERVICE_NAME` has been set, a service name is automatically derived by reading the main `package.json` file
14-
(if it is present) as `${packageJson.name}@${packageJson.version}`.
15-
This can be disabled either by setting `OTEL_SERVICE_NAME` or by setting `DASH0_AUTOMATIC_SERVICE_NAME=false`.
13+
If no service name has been set, a service name and a service version are automatically derived by reading the main `package.json` file
14+
(if it is present):
15+
* The `service.name` resource attribute will be set to the value of the `name` attribute found in the `package.json` file.
16+
* The `service.version` resource attribute will be set to the value of the `version` attribute found in the `package.json` file.
17+
18+
This behavior can be disabled either
19+
* by setting an explicit service name using the `OTEL_SERVICE_NAME` environment variable,
20+
* by setting an explicit service name using the `OTEL_RESOURCE_ATTRIBUTES` environment variable (using the `service.name` attribute key), or
21+
* by setting the environment variable `DASH0_AUTOMATIC_SERVICE_NAME=false`.
1622

1723
### <a id="DASH0_BOOTSTRAP_SPAN">DASH0_BOOTSTRAP_SPAN</a>
1824

0 commit comments

Comments
 (0)