48 releases (23 breaking)

Uses new Rust 2021

0.27.0 Jun 20, 2022
0.25.0 Mar 2, 2022
0.23.0 Jul 8, 2021
0.22.0 Jan 13, 2021
0.1.1 Mar 25, 2018

#22 in Debugging

Download history 40726/week @ 2022-03-15 37815/week @ 2022-03-22 40184/week @ 2022-03-29 49069/week @ 2022-04-05 42481/week @ 2022-04-12 48008/week @ 2022-04-19 42465/week @ 2022-04-26 37077/week @ 2022-05-03 36976/week @ 2022-05-10 37094/week @ 2022-05-17 35013/week @ 2022-05-24 39842/week @ 2022-05-31 44370/week @ 2022-06-07 42087/week @ 2022-06-14 44747/week @ 2022-06-21 40971/week @ 2022-06-28

179,482 downloads per month
Used in 64 crates (via sentry-core)

Apache-2.0

140KB
3K SLoC

Sentry

Sentry Rust SDK: sentry-types

This crate provides common types for working with the Sentry protocol or the Sentry server. It's used by the Sentry Relay infrastructure as well as the rust Sentry client.

Most of the types in this crate are serializable in one form or another. The types in the protocol module are generally really only serializable to JSON as other formats are not supported by Sentry at this date.

Contents

The crate provides a bunch of common types for working with Sentry as such (DSN, ProjectIDs, authentication headers) as well as types for the Sentry event protocol.

Right now only v7 of the protocol is implemented but it's versioned so later versions might be added later.

API Concepts

Most types are directly serializable or deserializable and try to implement the Default type. This means that objects can be created conviently and missing attributes can be filled in:

use sentry_types::protocol::v7;

let event = v7::Event {
    message: Some("Hello World!".to_string()),
    culprit: Some("foo in bar".to_string()),
    level: v7::Level::Info,
    ..Default::default()
};

Resources

License: Apache-2.0

Dependencies

~2.8–4MB
~104K SLoC