Module sentry::integrations

source ·
Expand description

Available Sentry Integrations.

Integrations extend the functionality of the SDK for some common frameworks and libraries. There are two different kinds of integrations:

  • Event sources
  • Event processors

Integrations which are event sources such as sentry::integrations::anyhow typically provide one or more functions to create new events. These integrations will have an extension trait which exposes a new method on the Hub.

Integrations which process events in some way usually implement the Integration 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 can be accomplished by using ClientOptions::add_integration().

For example, if one were to disable the default integrations (see below) but still wanted to use sentry::integrations::debug_images:

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

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 all of the default integrations via apply_defaults() before any integrations provided by ClientOptions::integrations are installed. Those interested in a list of default integrations and how they are applied are advised to visit apply_defaults()’s implementation.

Modules§

  • Backtrace Integration and utilities for sentry.
  • Adds Contexts to Sentry Events.
  • The Sentry Debug Images integration.
  • The Sentry Panic handler integration.