Expand description
Sentry and tracing, initialised in the one order that works.
sentry::init binds its hub to the calling thread; threads spawned
afterwards inherit it. #[tokio::main] spawns its workers before running
the body of main, so initialising there never reaches them and every error
raised on a worker is dropped. Hence: initialise on the main thread, then
build the runtime — which is what bootstrap does.
ObservabilityGuard flushes on drop, so it must outlive the server.
Structs§
- Observability
- How this process reports errors and logs.
- Observability
Guard - Keeps error monitoring alive, and flushes it on drop. Bind it to
_guard, never_, which would drop it immediately.
Enums§
- Observability
Error - Why observability could not be configured.
Constants§
- DEFAULT_
LOG_ FILTER - The log filter fallback when
RUST_LOGis unset. - ENV_
SENTRY_ DSN - The environment variable holding the Sentry DSN.
- UNKNOWN_
RELEASE - The release string used when the application does not name itself.