Expand description
Sentry telemetry — opt-in error/panic reporting.
Disabled by default. Operators enable it by setting SENTRY_DSN
(and optionally SENTRY_ENVIRONMENT) before launching the worker.
Nothing is hard-coded so the public repo never carries a DSN.
Wiring:
init()reads env vars, constructsSentryConfig, and callssentry::init. The returnedClientInitGuardmust live for the entire program —main.rskeeps it in a binding that drops on shutdown, flushing any in-flight events.tracing_layer()returns asentry-tracinglayer that mapserror-> Sentry event,warn-> breadcrumb, lower -> ignored. Layered into the globaltracing-subscriberregistry inmain.rs.
Panic capture is on by default (the panic feature is part of
sentry’s default feature set).
Structs§
- Sentry
Config - Fully-resolved Sentry client configuration. Built either from the
host environment (
from_env) or — in tests — by passing inputs directly tofrom_env_inner.
Functions§
- build_
client_ options - Build the
sentry::ClientOptionsfor a resolved config. ReturnsNone(and leaves a tracing warning) when the DSN string can’t be parsed — split out frominitso we can exercise both branches without mutating global Sentry state. - init
- Initialise Sentry from the process environment.
- tracing_
layer - Build the
sentry-tracinglayer with our chosen severity mapping.