Crates.io | sentry-types |
lib.rs | sentry-types |
version | 0.35.0 |
source | src |
created_at | 2018-03-25 22:30:37.109834 |
updated_at | 2024-11-29 09:28:52.962627 |
description | Common reusable types for implementing the sentry.io protocol. |
homepage | https://sentry.io/welcome/ |
repository | https://github.com/getsentry/sentry-rust |
max_upload_size | |
id | 57500 |
size | 231,193 |
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.
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.
Most types are directly serializable or deserializable and try to implement
the Default
type. This means that objects can be created conveniently
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()
};
License: Apache-2.0