Module sentry::integrations[][src]

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::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 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

anyhowanyhow

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

backtracebacktrace

Backtrace Integration and utilities for sentry.

contextscontexts

Adds Contexts to Sentry Events.

debug_imagesdebug_images

The Sentry Debug Images integration.

loglog

Adds support for automatic Breadcrumb and Event capturing from logs.

panicpanic

The Sentry Panic handler integration.

slogslog

Sentry slog Integration.

tracingtracing

Adds support for automatic Breadcrumb and Event capturing from tracing events, similar to the sentry-log crate.