Skip to content

Sentry

The reporting to Sentry using the sentry-sdk module can be configured with the sentry key. For more information about the below configuration keys, check the official Sentry basic options documentation.

Note

By default there is no dependancy on the sentry-sdk module; you must either install it separately or include the sentry extra while installing ExaCheck. As an example if using PyPi:

python3 -m pip install exacheck[sentry]

Configuration Keys

The following configuration keys are available for Sentry:

Key Type Default
dsn String undef
enabled Bool True
sample_rate Float 1.0
profiles_sample_rate Float 0.0
attach_stacktrace Bool False
include_local_variables Bool True
debug Bool False

DSN

The DSN provided by Sentry for reporting.

Enabled

If Sentry should be sending reports to the specified DSN. You may set this to disabled if you would like to keep the Sentry configuration but temporarily disable it.

Sample Rate

The rate at which events are sampled for Sentry.

Profiles Sample Rate

The rate at which samples are taken for profiling. Defaults to 0.0 (not enabled).

Attach Stacktrace

Set attach_stacktrace to true to attach a stack trace to every event logged to Sentry. By default the stacktrace is only included for exceptions.

Include Local Variables

To include a snapshot of local variables in reports, set include_local_variables to True (the default).

Debug

To enable Sentry debug mode set debug to True (off by default). Sentry should then print helpful messages if there are issues sending events.

Examples

---

# Configure Sentry profiling/error reporting
sentry:

    # The Sentry DSN to send reports to
    dsn: https://example@project.ingest.sentry.io/key

    # The sample rate
    sample_rate: 1.0

# The list of health checks
checks:
    - ...