[][src]Module sentry::integrations

Available Sentry Integrations.

Integrations extend the functionality of the SDK for some common frameworks and libraries. Integrations come two primary kinds: as event sources or as event processors.

Integrations which are sources, like e.g. the sentry::integrations::anyhow integration, usually provide one or more functions to create new events. They will usually provide their own extension trait exposing a new method on the Hub.

Integrations which process events in some way usually implement the Itegration trait and need to be installed when sentry is initialised.

Installing Integrations

Processing integrations which implement Integration need to be installed when sentry is initialised. This is done using the ClientOptions::add_integration function, which you can use to add extra integrations.

For example if you disabled the default integrations (see below) but still wanted the sentry::integrations::debug_images integration enabled, you could do this as such:

use sentry::ClientOptions;
use sentry::integrations::debug_images::DebugImagesIntegration;

let options = ClientOptions {
    default_integrations: false,
    ..Default::default()
}.add_integration(DebugImagesIntegration::new());
let _guard = sentry::init(options);

Default Integrations

The ClientOptions::default_integrations option is a boolean field that when enabled will enable a number of default integrations before any integrations provided by ClientOptions::integrations are installed. This is done using the apply_defaults function, which should be consulted for more details and the list of which integrations are enabled by default.

Modules

anyhow

Adds support for capturing Sentry errors from anyhow::Error.

backtrace

Backtrace Integration and utilities for sentry.

contexts

Adds Contexts to Sentry Events

debug_images

The Sentry Debug Images Integration.

log

Adds support for automatic Breadcrumb and Event capturing from logs.

panic

The Sentry Panic handler Integration.

slog

Sentry slog Integration.