40 releases (18 breaking)

new 0.22.0 Jan 13, 2021
0.21.0 Nov 12, 2020
0.20.1 Sep 15, 2020
0.19.0 Jun 18, 2020
0.1.1 Mar 25, 2018

#17 in Network programming

Download history 10435/week @ 2020-09-25 9670/week @ 2020-10-02 10823/week @ 2020-10-09 11146/week @ 2020-10-16 10504/week @ 2020-10-23 10725/week @ 2020-10-30 11477/week @ 2020-11-06 14358/week @ 2020-11-13 17186/week @ 2020-11-20 10546/week @ 2020-11-27 11423/week @ 2020-12-04 11513/week @ 2020-12-11 9191/week @ 2020-12-18 5510/week @ 2020-12-25 10103/week @ 2021-01-01 13152/week @ 2021-01-08

48,293 downloads per month
Used in 54 crates (via sentry-core)

Apache-2.0

105KB
2.5K 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

~3–4.5MB
~104K SLoC