#sentry #protocol

sentry-types

Common reusable types for implementing the sentry.io protocol

38 releases (16 breaking)

0.20.1 Sep 15, 2020
0.19.1 Aug 28, 2020
0.19.0 Jun 18, 2020
0.14.1 Feb 19, 2020
0.1.1 Mar 25, 2018

#16 in Debugging

Download history 5366/week @ 2020-06-01 5496/week @ 2020-06-08 6302/week @ 2020-06-15 5674/week @ 2020-06-22 5421/week @ 2020-06-29 5489/week @ 2020-07-06 5769/week @ 2020-07-13 6207/week @ 2020-07-20 7326/week @ 2020-07-27 6228/week @ 2020-08-03 8323/week @ 2020-08-10 8303/week @ 2020-08-17 9413/week @ 2020-08-24 8273/week @ 2020-08-31 9859/week @ 2020-09-07 9930/week @ 2020-09-14

30,473 downloads per month
Used in 38 crates (via sentry-core)

Apache-2.0

92KB
2K SLoC

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

~4.5MB
~103K SLoC