#sentry #core #instrumentation

sentry-core

Core sentry library used for instrumentation and integration development

4 releases

new 0.20.1 Sep 15, 2020
0.20.0 Sep 9, 2020
0.19.1 Aug 28, 2020
0.19.0 Jun 18, 2020

#288 in Debugging

Download history 16/week @ 2020-06-12 233/week @ 2020-06-19 498/week @ 2020-06-26 923/week @ 2020-07-03 1101/week @ 2020-07-10 1482/week @ 2020-07-17 1760/week @ 2020-07-24 1808/week @ 2020-07-31 2745/week @ 2020-08-07 3291/week @ 2020-08-14 3703/week @ 2020-08-21 3533/week @ 2020-08-28 3174/week @ 2020-09-04 4503/week @ 2020-09-11

8,836 downloads per month
Used in 15 crates (10 directly)

Apache-2.0

190KB
4K SLoC

Sentry Rust SDK: sentry-core

This crate provides the core of the Sentry SDK, which can be used to log events and errors.

This crate is meant for integration authors and third party library authors that want to instrument their code for sentry.

Regular users who wish to integrate sentry into their applications should rather use the sentry crate, which comes with a default transport, and a large set of integrations for various third-party libraries.

Core Concepts

This crate follows the Unified API guidelines and is centered around the concepts of Client, Hub and Scope, as well as the extension points via the Integration, Transport and TransportFactory traits.

Minimal API

By default, this crate comes with a so-called "minimal" mode. This mode will provide all the APIs needed to instrument code with sentry, and to write sentry integrations, but it will blackhole a lot of operations.

In minimal mode some types are restricted in functionality. For instance the Client is not available and the Hub does not retain all API functionality.

Features

  • feature = "client": Activates the Client type and certain Hub functionality.
  • feature = "test": Activates the test module, which can be used to write integration tests. It comes with a test transport which can capture all sent events for inspection.
  • feature = "debug-logs": Uses the log crate for debug output, instead of printing to stderr. This feature is deprecated and will be replaced by a dedicated log callback in the future.

Resources

License: Apache-2.0

Dependencies

~3.5–4.5MB
~107K SLoC