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 }}
Repository navigation
Commit 02d3b22
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/introduction/configuration.md
+12-2Lines changed: 12 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,13 @@
1
1
# Configuration
2
2
3
+
## Service name and version
4
+
5
+
`service_name` and `service_version` default to `None` since 2.0. Left unset:
6
+
7
+
- OpenTelemetry leaves `service.name` and `service.version` out of the resource, so the SDK takes them from `OTEL_SERVICE_NAME` and `OTEL_RESOURCE_ATTRIBUTES`. With neither set, `service.name` is `unknown_service`.
8
+
- Sentry gets no `release` from lite-bootstrap, and sentry-sdk picks one itself, from `SENTRY_RELEASE`, the git revision or CI variables. A `service_version` you set is passed as `release` and wins over all of those.
9
+
- Everything else that needs a string uses `"micro-service"` and `"1.0.0"`, as before 2.0: the title and version of an app FastAPI builds for you, Litestar's OpenAPI title and version, Litestar's Prometheus `app_name` label, the health-check body, and Pyroscope's application name when `opentelemetry_service_name` is unset too.
10
+
3
11
## Debug mode
4
12
5
13
`service_debug` defaults to `False`. Debug mode puts tracebacks in error responses, so keep it off in production.
@@ -16,6 +24,8 @@ To bootstrap Sentry, you must provide at least:
16
24
17
25
-`sentry_dsn` - tells sentry-sdk where to send the events.
18
26
27
+
`service_version`, when set, is passed as `release`; see [Service name and version](#service-name-and-version).
28
+
19
29
Additional parameters can also be supplied through the settings object:
20
30
21
31
-`sentry_traces_sample_rate` - in the range of 0.0 to 1.0, the percentage chance a given transaction will be sent
The attributes lite-bootstrap sets (`service.name`, `service.namespace`, `service.version`,
297
307
`container.name`, and `deployment.environment.name` from `service_environment`) are merged last and override anything a detector or environment variable supplies.
298
-
`service_name`defaults to `"micro-service"`, so `OTEL_SERVICE_NAME`is overridden unless `service_name`
299
-
is empty: set `opentelemetry_service_name` or `service_name` instead.
308
+
`service_name`and `service_version` default to `None`, and an unset attribute is left out, so
309
+
`OTEL_SERVICE_NAME` and `OTEL_RESOURCE_ATTRIBUTES` can supply it.
0 commit comments