From 0aa91e431e88582e3ddb36e5ca6b54180789754e Mon Sep 17 00:00:00 2001 From: Pierre Massat Date: Tue, 6 May 2025 10:39:48 -0400 Subject: [PATCH 01/37] feat(eap): Produce logs to the items topic --- Cargo.lock | 83 +++++++++++++++++++++ Cargo.toml | 4 +- relay-server/Cargo.toml | 2 + relay-server/src/services/store.rs | 114 +++++++++++++++++++++++++---- 4 files changed, 189 insertions(+), 14 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1fb6a15f35e..686af438234 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1383,6 +1383,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "fixedbitset" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" + [[package]] name = "flate2" version = "1.0.35" @@ -2574,6 +2580,12 @@ dependencies = [ "version_check", ] +[[package]] +name = "multimap" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "defc4c55412d89136f966bbb339008b474350e5e6e78d2714439c386b3137a03" + [[package]] name = "native-tls" version = "0.2.12" @@ -3027,6 +3039,16 @@ dependencies = [ "sha2", ] +[[package]] +name = "petgraph" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" +dependencies = [ + "fixedbitset", + "indexmap 2.7.0", +] + [[package]] name = "phf_shared" version = "0.10.0" @@ -3222,6 +3244,27 @@ dependencies = [ "prost-derive", ] +[[package]] +name = "prost-build" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c1318b19085f08681016926435853bbf7858f9c082d0999b80550ff5d9abe15" +dependencies = [ + "bytes", + "heck", + "itertools 0.13.0", + "log", + "multimap", + "once_cell", + "petgraph", + "prettyplease", + "prost", + "prost-types", + "regex", + "syn", + "tempfile", +] + [[package]] name = "prost-derive" version = "0.13.3" @@ -3235,6 +3278,15 @@ dependencies = [ "syn", ] +[[package]] +name = "prost-types" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4759aa0d3a6232fb8dbdb97b61de2c20047c68aca932c7ed76da9d788508d670" +dependencies = [ + "prost", +] + [[package]] name = "psl" version = "2.1.65" @@ -4076,6 +4128,7 @@ dependencies = [ "pin-project-lite", "priority-queue", "prost", + "prost-types", "rand 0.8.5", "regex", "relay-auth", @@ -4109,6 +4162,7 @@ dependencies = [ "rmp-serde", "semver", "sentry", + "sentry_protos", "serde", "serde_bytes", "serde_json", @@ -4661,6 +4715,21 @@ dependencies = [ "uuid", ] +[[package]] +name = "sentry_protos" +version = "0.1.74" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0aefff68057c87dc1054563870fc268c04266a9143c51f424a98faf548330d6" +dependencies = [ + "glob", + "prost", + "prost-types", + "regex", + "tokio", + "tonic", + "tonic-build", +] + [[package]] name = "serde" version = "1.0.215" @@ -5561,6 +5630,20 @@ dependencies = [ "tracing", ] +[[package]] +name = "tonic-build" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9557ce109ea773b399c9b9e5dca39294110b74f1f342cb347a80d1fce8c26a11" +dependencies = [ + "prettyplease", + "proc-macro2", + "prost-build", + "prost-types", + "quote", + "syn", +] + [[package]] name = "tower" version = "0.4.13" diff --git a/Cargo.toml b/Cargo.toml index 0de615ca41a..13d9f68cf78 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -163,6 +163,8 @@ sentry-core = "0.36.0" sentry-kafka-schemas = { version = "0.1.129", default-features = false } sentry-release-parser = { version = "1.3.2", default-features = false } sentry-types = "0.36.0" +sentry_protos = "0.1.74" +prost-types = "0.13.3" semver = "1.0.23" serde = { version = "1.0.215", features = ["derive", "rc"] } serde-transcode = "1.1.1" @@ -201,6 +203,6 @@ unescaper = "0.1.5" unicase = "2.8.0" url = "2.5.4" utf16string = "0.2.0" -uuid = { version = "1.11.0", features = ["serde", "v4"] } +uuid = { version = "1.11.0", features = ["serde", "v4", "v7"] } walkdir = "2.5.0" zstd = { version = "0.13.2", features = ["experimental"] } diff --git a/relay-server/Cargo.toml b/relay-server/Cargo.toml index cd6d86c8225..5227774ab5e 100644 --- a/relay-server/Cargo.toml +++ b/relay-server/Cargo.toml @@ -97,6 +97,8 @@ reqwest = { workspace = true, features = [ ] } rmp-serde = { workspace = true } sentry = { workspace = true, features = ["tower-http"] } +sentry_protos = { workspace = true } +prost-types = { workspace = true } serde = { workspace = true } serde_bytes = { workspace = true } serde_json = { workspace = true } diff --git a/relay-server/src/services/store.rs b/relay-server/src/services/store.rs index e37f56924c2..b8781ef6d71 100644 --- a/relay-server/src/services/store.rs +++ b/relay-server/src/services/store.rs @@ -19,6 +19,8 @@ use relay_config::Config; use relay_event_schema::protocol::{EventId, VALID_PLATFORMS}; use crate::envelope::{AttachmentType, Envelope, Item, ItemType}; +use prost::Message as _; +use prost_types::Timestamp; use relay_kafka::{ClientError, KafkaClient, KafkaTopic, Message}; use relay_metrics::{ Bucket, BucketView, BucketViewValue, BucketsView, ByNamespace, FiniteF64, GaugeValue, @@ -28,6 +30,8 @@ use relay_quotas::Scoping; use relay_statsd::metric; use relay_system::{Addr, FromMessage, Interface, NoResponse, Service}; use relay_threading::AsyncPool; +use sentry_protos::snuba::v1::any_value::Value; +use sentry_protos::snuba::v1::{AnyValue, TraceItem, TraceItemType}; use serde::{Deserialize, Serialize}; use serde_json::Deserializer; use serde_json::value::RawValue; @@ -959,7 +963,6 @@ impl StoreService { let payload_len = payload.len(); let d = &mut Deserializer::from_slice(&payload); - let logs: LogKafkaMessages = match serde_path_to_error::deserialize(d) { Ok(logs) => logs, Err(error) => { @@ -989,18 +992,104 @@ impl StoreService { } }; - for mut log in logs.items { - log.organization_id = scoping.organization_id.value(); - log.project_id = scoping.project_id.value(); - log.retention_days = retention_days; - log.received = safe_timestamp(received_at); + for log in logs.items { + let timestamp_seconds = log.timestamp_nanos / 1_000_000_000; + let timestamp_nanos = log.timestamp_nanos % 1_000_000_000; + let item_id = u128::from_be_bytes( + *Uuid::new_v7(uuid::Timestamp::from_unix( + uuid::NoContext, + timestamp_seconds, + timestamp_nanos as u32, + )) + .as_bytes(), + ) + .to_le_bytes() + .to_vec(); + let mut trace_item = TraceItem { + item_type: TraceItemType::Log.into(), + organization_id: scoping.organization_id.value(), + project_id: scoping.project_id.value(), + received: Some(Timestamp { + seconds: safe_timestamp(received_at) as i64, + nanos: 0, + }), + retention_days: retention_days.into(), + timestamp: Some(Timestamp { + seconds: timestamp_seconds as i64, + nanos: timestamp_nanos as i32, + }), + trace_id: log.trace_id.to_string(), + item_id, + attributes: Default::default(), + client_sample_rate: 1.0, + server_sample_rate: 1.0, + }; + + trace_item.attributes.insert( + "sentry.timestamp_precise".to_string(), + AnyValue { + value: Some(Value::IntValue(log.timestamp_nanos as i64)), + }, + ); + trace_item.attributes.insert( + "sentry.severity_text".to_string(), + AnyValue { + value: Some(Value::StringValue( + log.severity_text.unwrap_or_else(|| "INFO".into()).into(), + )), + }, + ); + trace_item.attributes.insert( + "sentry.severity_number".to_string(), + AnyValue { + value: Some(Value::IntValue( + log.severity_number.unwrap_or_default().into(), + )), + }, + ); + trace_item.attributes.insert( + "sentry.body".to_string(), + AnyValue { + value: Some(Value::StringValue(log.body.to_string())), + }, + ); + + for (name, attribute) in log.attributes.unwrap_or_default() { + if let Some(attribute_value) = attribute { + if let Some(v) = attribute_value.value { + let any_value = match v { + LogAttributeValue::String(value) => AnyValue { + value: Some(Value::StringValue(value)), + }, + LogAttributeValue::Int(value) => AnyValue { + value: Some(Value::IntValue(value)), + }, + LogAttributeValue::Bool(value) => AnyValue { + value: Some(Value::BoolValue(value)), + }, + LogAttributeValue::Double(value) => AnyValue { + value: Some(Value::DoubleValue(value)), + }, + LogAttributeValue::Unknown(_) => continue, + }; + + trace_item.attributes.insert(name.into(), any_value); + } + } + } + + let mut message = vec![]; + + if trace_item.encode(&mut message).is_err() { + return Ok(()); + }; let message = KafkaMessage::Log { - headers: BTreeMap::from([( - "project_id".to_string(), - scoping.project_id.to_string(), - )]), - message: log, + headers: BTreeMap::from([ + ("project_id".to_string(), scoping.project_id.to_string()), + ("item_type".to_string(), "3".to_string()), + ]), + message, }; self.produce(KafkaTopic::OurLogs, message)?; @@ -1592,8 +1681,7 @@ enum KafkaMessage<'a> { Log { #[serde(skip)] headers: BTreeMap, - #[serde(flatten)] - message: LogKafkaMessage<'a>, + message: Vec, }, ProfileChunk(ProfileChunkKafkaMessage), } From 3e2b852f543ed29df9c444f8198e9cca6420b067 Mon Sep 17 00:00:00 2001 From: Pierre Massat Date: Tue, 6 May 2025 12:01:29 -0400 Subject: [PATCH 02/37] Vendor sentry_protos --- Cargo.lock | 2 - Cargo.toml | 2 +- sentry_protos/Cargo.toml | 26 + sentry_protos/src/lib.rs | 41 + .../src/sentry_protos.kafka.events.v1.rs | 1187 ++++ sentry_protos/src/sentry_protos.options.v1.rs | 46 + sentry_protos/src/sentry_protos.relay.v1.rs | 6236 +++++++++++++++++ sentry_protos/src/sentry_protos.seer.v1.rs | 309 + sentry_protos/src/sentry_protos.sentry.v1.rs | 521 ++ sentry_protos/src/sentry_protos.snuba.v1.rs | 1822 +++++ .../src/sentry_protos.taskbroker.v1.rs | 495 ++ 11 files changed, 10684 insertions(+), 3 deletions(-) create mode 100644 sentry_protos/Cargo.toml create mode 100644 sentry_protos/src/lib.rs create mode 100644 sentry_protos/src/sentry_protos.kafka.events.v1.rs create mode 100644 sentry_protos/src/sentry_protos.options.v1.rs create mode 100644 sentry_protos/src/sentry_protos.relay.v1.rs create mode 100644 sentry_protos/src/sentry_protos.seer.v1.rs create mode 100644 sentry_protos/src/sentry_protos.sentry.v1.rs create mode 100644 sentry_protos/src/sentry_protos.snuba.v1.rs create mode 100644 sentry_protos/src/sentry_protos.taskbroker.v1.rs diff --git a/Cargo.lock b/Cargo.lock index 686af438234..309a93fca0b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4718,8 +4718,6 @@ dependencies = [ [[package]] name = "sentry_protos" version = "0.1.74" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0aefff68057c87dc1054563870fc268c04266a9143c51f424a98faf548330d6" dependencies = [ "glob", "prost", diff --git a/Cargo.toml b/Cargo.toml index 13d9f68cf78..1babcd1d186 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -67,6 +67,7 @@ relay-ua = { path = "relay-ua" } relay-test = { path = "relay-test" } relay-protocol-derive = { path = "relay-protocol-derive" } relay-event-derive = { path = "relay-event-derive" } +sentry_protos = { path = "sentry_protos" } ahash = "0.8.11" android_trace_log = { version = "0.3.0", features = ["serde"] } @@ -163,7 +164,6 @@ sentry-core = "0.36.0" sentry-kafka-schemas = { version = "0.1.129", default-features = false } sentry-release-parser = { version = "1.3.2", default-features = false } sentry-types = "0.36.0" -sentry_protos = "0.1.74" prost-types = "0.13.3" semver = "1.0.23" serde = { version = "1.0.215", features = ["derive", "rc"] } diff --git a/sentry_protos/Cargo.toml b/sentry_protos/Cargo.toml new file mode 100644 index 00000000000..e3e75aad7a3 --- /dev/null +++ b/sentry_protos/Cargo.toml @@ -0,0 +1,26 @@ +[package] +name = "sentry_protos" +version = "0.1.74" +edition = "2021" +readme = "README.md" +description = "Rust bindings for sentry-protos" +license-file = "LICENSE.md" +authors = ["Sentry "] +repository = "https://github.com/getsentry/sentry-protos" +publish = false + +[build-dependencies] +glob = "0.3.1" +tonic-build = "0.12" +prost = { workspace = true } +prost-types = { workspace = true } +regex = "1.10.5" + +[dependencies] +tonic = "0.12.3" +prost = { workspace = true } +prost-types = { workspace = true } +tokio = { version = "1.0", features = ["macros", "rt-multi-thread"] } + +[lints] +workspace = true diff --git a/sentry_protos/src/lib.rs b/sentry_protos/src/lib.rs new file mode 100644 index 00000000000..6bb25e1a176 --- /dev/null +++ b/sentry_protos/src/lib.rs @@ -0,0 +1,41 @@ +pub mod events { + pub mod v1 { + include!("sentry_protos.kafka.events.v1.rs"); + } +} + +pub mod options { + pub mod v1 { + include!("sentry_protos.options.v1.rs"); + } +} + +pub mod seer { + pub mod v1 { + include!("sentry_protos.seer.v1.rs"); + } +} + +pub mod relay { + pub mod v1 { + include!("sentry_protos.relay.v1.rs"); + } +} + +pub mod sentry { + pub mod v1 { + include!("sentry_protos.sentry.v1.rs"); + } +} + +pub mod taskbroker { + pub mod v1 { + include!("sentry_protos.taskbroker.v1.rs"); + } +} + +pub mod snuba { + pub mod v1 { + include!("sentry_protos.snuba.v1.rs"); + } +} diff --git a/sentry_protos/src/sentry_protos.kafka.events.v1.rs b/sentry_protos/src/sentry_protos.kafka.events.v1.rs new file mode 100644 index 00000000000..bb7ecbdc0ab --- /dev/null +++ b/sentry_protos/src/sentry_protos.kafka.events.v1.rs @@ -0,0 +1,1187 @@ +// This file is @generated by prost-build. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct EventStreamMessage { + #[prost( + oneof = "event_stream_message::Value", + tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14" + )] + pub value: ::core::option::Option, +} +/// Nested message and enum types in `EventStreamMessage`. +pub mod event_stream_message { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Value { + #[prost(message, tag = "1")] + Inserteventmessage(super::Inserteventmessage), + #[prost(message, tag = "2")] + Startdeletegroupsmessage(super::Startdeletegroupsmessage), + #[prost(message, tag = "3")] + Startmergemessage(super::Startmergemessage), + #[prost(message, tag = "4")] + Startunmergemessage(super::Startunmergemessage), + #[prost(message, tag = "5")] + Startunmergehierarchicalmessage(super::Startunmergehierarchicalmessage), + #[prost(message, tag = "6")] + Startdeletetagmessage(super::Startdeletetagmessage), + #[prost(message, tag = "7")] + Enddeletegroupsmessage(super::Enddeletegroupsmessage), + #[prost(message, tag = "8")] + Endmergemessage(super::Endmergemessage), + #[prost(message, tag = "9")] + Endunmergemessage(super::Endunmergemessage), + #[prost(message, tag = "10")] + Endunmergehierarchicalmessage(super::Endunmergehierarchicalmessage), + #[prost(message, tag = "11")] + Enddeletetagmessage(super::Enddeletetagmessage), + #[prost(message, tag = "12")] + Tombstoneeventsmessage(super::Tombstoneeventsmessage), + #[prost(message, tag = "13")] + Replacegroupmessage(super::Replacegroupmessage), + #[prost(message, tag = "14")] + Excludegroupsmessage(super::Excludegroupsmessage), + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Startmergemessage { + #[prost(int64, tag = "1")] + pub a0: i64, + #[prost(string, tag = "2")] + pub a1: ::prost::alloc::string::String, + #[prost(message, optional, tag = "3")] + pub a2: ::core::option::Option, +} +/// Nested message and enum types in `Startmergemessage`. +pub mod startmergemessage { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Startmergemessage2 { + #[prost(string, tag = "1")] + pub transaction_id: ::prost::alloc::string::String, + #[prost(int64, tag = "2")] + pub project_id: i64, + #[prost(int64, repeated, tag = "3")] + pub previous_group_ids: ::prost::alloc::vec::Vec, + #[prost(int64, tag = "4")] + pub new_group_id: i64, + #[prost(string, tag = "5")] + pub datetime: ::prost::alloc::string::String, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Endmergemessage { + #[prost(int64, tag = "1")] + pub a0: i64, + #[prost(string, tag = "2")] + pub a1: ::prost::alloc::string::String, + #[prost(message, optional, tag = "3")] + pub a2: ::core::option::Option, +} +/// Nested message and enum types in `Endmergemessage`. +pub mod endmergemessage { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Endmergemessage2 { + #[prost(string, tag = "1")] + pub transaction_id: ::prost::alloc::string::String, + #[prost(int64, tag = "2")] + pub project_id: i64, + #[prost(int64, repeated, tag = "3")] + pub previous_group_ids: ::prost::alloc::vec::Vec, + #[prost(int64, tag = "4")] + pub new_group_id: i64, + #[prost(string, tag = "5")] + pub datetime: ::prost::alloc::string::String, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Startdeletegroupsmessage { + #[prost(int64, tag = "1")] + pub a0: i64, + #[prost(string, tag = "2")] + pub a1: ::prost::alloc::string::String, + #[prost(message, optional, tag = "3")] + pub a2: ::core::option::Option, +} +/// Nested message and enum types in `Startdeletegroupsmessage`. +pub mod startdeletegroupsmessage { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Startdeletegroupsmessage2 { + #[prost(string, tag = "1")] + pub transaction_id: ::prost::alloc::string::String, + #[prost(int64, tag = "2")] + pub project_id: i64, + #[prost(int64, repeated, tag = "3")] + pub group_ids: ::prost::alloc::vec::Vec, + #[prost(string, tag = "4")] + pub datetime: ::prost::alloc::string::String, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Enddeletegroupsmessage { + #[prost(int64, tag = "1")] + pub a0: i64, + #[prost(string, tag = "2")] + pub a1: ::prost::alloc::string::String, + #[prost(message, optional, tag = "3")] + pub a2: ::core::option::Option, +} +/// Nested message and enum types in `Enddeletegroupsmessage`. +pub mod enddeletegroupsmessage { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Enddeletegroupsmessage2 { + #[prost(string, tag = "1")] + pub transaction_id: ::prost::alloc::string::String, + #[prost(int64, tag = "2")] + pub project_id: i64, + #[prost(int64, repeated, tag = "3")] + pub group_ids: ::prost::alloc::vec::Vec, + #[prost(string, tag = "4")] + pub datetime: ::prost::alloc::string::String, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Startunmergemessage { + #[prost(int64, tag = "1")] + pub a0: i64, + #[prost(string, tag = "2")] + pub a1: ::prost::alloc::string::String, + #[prost(message, optional, tag = "3")] + pub a2: ::core::option::Option, +} +/// Nested message and enum types in `Startunmergemessage`. +pub mod startunmergemessage { + #[derive(Clone, Copy, PartialEq, ::prost::Message)] + pub struct Startunmergemessage2 { + #[prost(int64, tag = "1")] + pub project_id: i64, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Startunmergehierarchicalmessage { + #[prost(int64, tag = "1")] + pub a0: i64, + #[prost(string, tag = "2")] + pub a1: ::prost::alloc::string::String, + #[prost(message, optional, tag = "3")] + pub a2: + ::core::option::Option, +} +/// Nested message and enum types in `Startunmergehierarchicalmessage`. +pub mod startunmergehierarchicalmessage { + #[derive(Clone, Copy, PartialEq, ::prost::Message)] + pub struct Startunmergehierarchicalmessage2 { + #[prost(int64, tag = "1")] + pub project_id: i64, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Startdeletetagmessage { + #[prost(int64, tag = "1")] + pub a0: i64, + #[prost(string, tag = "2")] + pub a1: ::prost::alloc::string::String, + #[prost(message, optional, tag = "3")] + pub a2: ::core::option::Option, +} +/// Nested message and enum types in `Startdeletetagmessage`. +pub mod startdeletetagmessage { + #[derive(Clone, Copy, PartialEq, ::prost::Message)] + pub struct Startdeletetagmessage2 { + #[prost(int64, tag = "1")] + pub project_id: i64, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Endunmergemessage { + #[prost(int64, tag = "1")] + pub a0: i64, + #[prost(string, tag = "2")] + pub a1: ::prost::alloc::string::String, + #[prost(message, optional, tag = "3")] + pub a2: ::core::option::Option, +} +/// Nested message and enum types in `Endunmergemessage`. +pub mod endunmergemessage { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Endunmergemessage2 { + #[prost(string, tag = "1")] + pub transaction_id: ::prost::alloc::string::String, + #[prost(int64, tag = "2")] + pub project_id: i64, + #[prost(int64, tag = "3")] + pub previous_group_id: i64, + #[prost(int64, tag = "4")] + pub new_group_id: i64, + #[prost(string, repeated, tag = "5")] + pub hashes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, tag = "6")] + pub datetime: ::prost::alloc::string::String, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Endunmergehierarchicalmessage { + #[prost(int64, tag = "1")] + pub a0: i64, + #[prost(string, tag = "2")] + pub a1: ::prost::alloc::string::String, + #[prost(message, optional, tag = "3")] + pub a2: ::core::option::Option, +} +/// Nested message and enum types in `Endunmergehierarchicalmessage`. +pub mod endunmergehierarchicalmessage { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Endunmergehierarchicalmessage2 { + #[prost(int64, tag = "1")] + pub project_id: i64, + #[prost(int64, tag = "2")] + pub previous_group_id: i64, + #[prost(int64, tag = "3")] + pub new_group_id: i64, + #[prost(string, tag = "4")] + pub primary_hash: ::prost::alloc::string::String, + #[prost(string, tag = "5")] + pub hierarchical_hash: ::prost::alloc::string::String, + #[prost(string, tag = "6")] + pub datetime: ::prost::alloc::string::String, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Enddeletetagmessage { + #[prost(int64, tag = "1")] + pub a0: i64, + #[prost(string, tag = "2")] + pub a1: ::prost::alloc::string::String, + #[prost(message, optional, tag = "3")] + pub a2: ::core::option::Option, +} +/// Nested message and enum types in `Enddeletetagmessage`. +pub mod enddeletetagmessage { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Enddeletetagmessage2 { + #[prost(string, tag = "1")] + pub tag: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub datetime: ::prost::alloc::string::String, + #[prost(int64, tag = "3")] + pub project_id: i64, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Tombstoneeventsmessage { + #[prost(int64, tag = "1")] + pub a0: i64, + #[prost(string, tag = "2")] + pub a1: ::prost::alloc::string::String, + #[prost(message, optional, tag = "3")] + pub a2: ::core::option::Option, +} +/// Nested message and enum types in `Tombstoneeventsmessage`. +pub mod tombstoneeventsmessage { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Tombstoneeventsmessage2 { + #[prost(int64, tag = "1")] + pub project_id: i64, + #[prost(string, repeated, tag = "2")] + pub event_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, tag = "4")] + pub from_timestamp: ::prost::alloc::string::String, + #[prost(string, tag = "5")] + pub to_timestamp: ::prost::alloc::string::String, + #[prost(string, tag = "6")] + pub datetime: ::prost::alloc::string::String, + #[prost(oneof = "tombstoneeventsmessage2::HasOldPrimaryHash", tags = "3")] + pub has_old_primary_hash: + ::core::option::Option, + } + /// Nested message and enum types in `Tombstoneeventsmessage2`. + pub mod tombstoneeventsmessage2 { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasOldPrimaryHash { + #[prost(string, tag = "3")] + OldPrimaryHash(::prost::alloc::string::String), + } + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Replacegroupmessage { + #[prost(int64, tag = "1")] + pub a0: i64, + #[prost(string, tag = "2")] + pub a1: ::prost::alloc::string::String, + #[prost(message, optional, tag = "3")] + pub a2: ::core::option::Option, +} +/// Nested message and enum types in `Replacegroupmessage`. +pub mod replacegroupmessage { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Replacegroupmessage2 { + #[prost(string, repeated, tag = "1")] + pub event_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(int64, tag = "2")] + pub project_id: i64, + #[prost(string, tag = "3")] + pub from_timestamp: ::prost::alloc::string::String, + #[prost(string, tag = "4")] + pub to_timestamp: ::prost::alloc::string::String, + #[prost(string, tag = "5")] + pub transaction_id: ::prost::alloc::string::String, + #[prost(string, tag = "6")] + pub datetime: ::prost::alloc::string::String, + #[prost(int64, tag = "7")] + pub new_group_id: i64, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Excludegroupsmessage { + #[prost(int64, tag = "1")] + pub a0: i64, + #[prost(string, tag = "2")] + pub a1: ::prost::alloc::string::String, + #[prost(message, optional, tag = "3")] + pub a2: ::core::option::Option, +} +/// Nested message and enum types in `Excludegroupsmessage`. +pub mod excludegroupsmessage { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Excludegroupsmessage2 { + #[prost(int64, tag = "1")] + pub project_id: i64, + #[prost(int64, repeated, tag = "2")] + pub group_ids: ::prost::alloc::vec::Vec, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Contexts { + #[prost(oneof = "contexts::HasReplay", tags = "1")] + pub has_replay: ::core::option::Option, + #[prost(oneof = "contexts::HasTrace", tags = "2")] + pub has_trace: ::core::option::Option, +} +/// Nested message and enum types in `Contexts`. +pub mod contexts { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct ContextsReplay { + #[prost(oneof = "contexts_replay::HasReplayId", tags = "1")] + pub has_replay_id: ::core::option::Option, + } + /// Nested message and enum types in `ContextsReplay`. + pub mod contexts_replay { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasReplayId { + #[prost(string, tag = "1")] + ReplayId(::prost::alloc::string::String), + } + } + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct ContextsTrace { + #[prost(oneof = "contexts_trace::HasSampled", tags = "1")] + pub has_sampled: ::core::option::Option, + #[prost(oneof = "contexts_trace::HasSpanId", tags = "2")] + pub has_span_id: ::core::option::Option, + #[prost(oneof = "contexts_trace::HasTraceId", tags = "3")] + pub has_trace_id: ::core::option::Option, + } + /// Nested message and enum types in `ContextsTrace`. + pub mod contexts_trace { + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasSampled { + #[prost(bool, tag = "1")] + Sampled(bool), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasSpanId { + #[prost(string, tag = "2")] + SpanId(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasTraceId { + #[prost(string, tag = "3")] + TraceId(::prost::alloc::string::String), + } + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasReplay { + #[prost(message, tag = "1")] + Replay(ContextsReplay), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasTrace { + #[prost(message, tag = "2")] + Trace(ContextsTrace), + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Errordata { + #[prost(message, optional, tag = "2")] + pub culprit: ::core::option::Option<::prost_types::Value>, + #[prost(message, repeated, tag = "3")] + pub errors: ::prost::alloc::vec::Vec<::prost_types::Value>, + #[prost(string, repeated, tag = "5")] + pub hierarchical_hashes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(map = "string, string", tag = "7")] + pub modules: + ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + #[prost(double, tag = "8")] + pub received: f64, + #[prost(message, repeated, tag = "11")] + pub tags: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "13")] + pub title: ::core::option::Option<::prost_types::Value>, + #[prost(message, optional, tag = "14")] + pub r#type: ::core::option::Option<::prost_types::Value>, + #[prost(oneof = "errordata::HasContexts", tags = "1")] + pub has_contexts: ::core::option::Option, + #[prost(oneof = "errordata::HasException", tags = "4")] + pub has_exception: ::core::option::Option, + #[prost(oneof = "errordata::HasLocation", tags = "6")] + pub has_location: ::core::option::Option, + #[prost(oneof = "errordata::HasRequest", tags = "9")] + pub has_request: ::core::option::Option, + #[prost(oneof = "errordata::HasSdk", tags = "10")] + pub has_sdk: ::core::option::Option, + #[prost(oneof = "errordata::HasThreads", tags = "12")] + pub has_threads: ::core::option::Option, + #[prost(oneof = "errordata::HasUser", tags = "15")] + pub has_user: ::core::option::Option, + #[prost(oneof = "errordata::HasVersion", tags = "16")] + pub has_version: ::core::option::Option, +} +/// Nested message and enum types in `Errordata`. +pub mod errordata { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct ErrordataContexts { + #[prost(oneof = "errordata_contexts::HasReplay", tags = "1")] + pub has_replay: ::core::option::Option, + #[prost(oneof = "errordata_contexts::HasTrace", tags = "2")] + pub has_trace: ::core::option::Option, + } + /// Nested message and enum types in `ErrordataContexts`. + pub mod errordata_contexts { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct ErrordataContextsReplay { + #[prost(oneof = "errordata_contexts_replay::HasReplayId", tags = "1")] + pub has_replay_id: ::core::option::Option, + } + /// Nested message and enum types in `ErrordataContextsReplay`. + pub mod errordata_contexts_replay { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasReplayId { + #[prost(string, tag = "1")] + ReplayId(::prost::alloc::string::String), + } + } + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct ErrordataContextsTrace { + #[prost(oneof = "errordata_contexts_trace::HasSampled", tags = "1")] + pub has_sampled: ::core::option::Option, + #[prost(oneof = "errordata_contexts_trace::HasSpanId", tags = "2")] + pub has_span_id: ::core::option::Option, + #[prost(oneof = "errordata_contexts_trace::HasTraceId", tags = "3")] + pub has_trace_id: ::core::option::Option, + } + /// Nested message and enum types in `ErrordataContextsTrace`. + pub mod errordata_contexts_trace { + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasSampled { + #[prost(bool, tag = "1")] + Sampled(bool), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasSpanId { + #[prost(string, tag = "2")] + SpanId(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasTraceId { + #[prost(string, tag = "3")] + TraceId(::prost::alloc::string::String), + } + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasReplay { + #[prost(message, tag = "1")] + Replay(ErrordataContextsReplay), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasTrace { + #[prost(message, tag = "2")] + Trace(ErrordataContextsTrace), + } + } + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct ErrordataException { + #[prost(message, repeated, tag = "1")] + pub values: ::prost::alloc::vec::Vec, + } + /// Nested message and enum types in `ErrordataException`. + pub mod errordata_exception { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct ErrordataExceptionValues { + #[prost(message, optional, tag = "4")] + pub r#type: ::core::option::Option<::prost_types::Value>, + #[prost(message, optional, tag = "5")] + pub value: ::core::option::Option<::prost_types::Value>, + #[prost(oneof = "errordata_exception_values::HasMechanism", tags = "1")] + pub has_mechanism: ::core::option::Option, + #[prost(oneof = "errordata_exception_values::HasStacktrace", tags = "2")] + pub has_stacktrace: ::core::option::Option, + #[prost(oneof = "errordata_exception_values::HasThreadId", tags = "3")] + pub has_thread_id: ::core::option::Option, + } + /// Nested message and enum types in `ErrordataExceptionValues`. + pub mod errordata_exception_values { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct ErrordataExceptionValuesMechanism { + #[prost(message, optional, tag = "1")] + pub handled: ::core::option::Option<::prost_types::Value>, + #[prost(message, optional, tag = "2")] + pub r#type: ::core::option::Option<::prost_types::Value>, + } + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct ErrordataExceptionValuesStacktrace { + #[prost(message, repeated, tag = "1")] + pub frames: ::prost::alloc::vec::Vec< + errordata_exception_values_stacktrace::ErrordataExceptionValuesStacktraceFrames, + >, + } + /// Nested message and enum types in `ErrordataExceptionValuesStacktrace`. + pub mod errordata_exception_values_stacktrace { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct ErrordataExceptionValuesStacktraceFrames { + #[prost(message, optional, tag = "1")] + pub abs_path: ::core::option::Option<::prost_types::Value>, + #[prost(message, optional, tag = "3")] + pub filename: ::core::option::Option<::prost_types::Value>, + #[prost(message, optional, tag = "4")] + pub function: ::core::option::Option<::prost_types::Value>, + #[prost(message, optional, tag = "7")] + pub module: ::core::option::Option<::prost_types::Value>, + #[prost(message, optional, tag = "8")] + pub package: ::core::option::Option<::prost_types::Value>, + #[prost( + oneof = "errordata_exception_values_stacktrace_frames::HasColno", + tags = "2" + )] + pub has_colno: ::core::option::Option< + errordata_exception_values_stacktrace_frames::HasColno, + >, + #[prost( + oneof = "errordata_exception_values_stacktrace_frames::HasInApp", + tags = "5" + )] + pub has_in_app: ::core::option::Option< + errordata_exception_values_stacktrace_frames::HasInApp, + >, + #[prost( + oneof = "errordata_exception_values_stacktrace_frames::HasLineno", + tags = "6" + )] + pub has_lineno: ::core::option::Option< + errordata_exception_values_stacktrace_frames::HasLineno, + >, + } + /// Nested message and enum types in `ErrordataExceptionValuesStacktraceFrames`. + pub mod errordata_exception_values_stacktrace_frames { + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasColno { + #[prost(int64, tag = "2")] + Colno(i64), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasInApp { + #[prost(bool, tag = "5")] + InApp(bool), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasLineno { + #[prost(int64, tag = "6")] + Lineno(i64), + } + } + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasMechanism { + #[prost(message, tag = "1")] + Mechanism(ErrordataExceptionValuesMechanism), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasStacktrace { + #[prost(message, tag = "2")] + Stacktrace(ErrordataExceptionValuesStacktrace), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasThreadId { + #[prost(message, tag = "3")] + ThreadId(::prost_types::Value), + } + } + } + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct ErrordataRequest { + #[prost(message, repeated, tag = "1")] + pub headers: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "2")] + pub method: ::core::option::Option<::prost_types::Value>, + } + /// Nested message and enum types in `ErrordataRequest`. + pub mod errordata_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct ErrordataRequestHeaders { + #[prost(string, tag = "1")] + pub a0: ::prost::alloc::string::String, + #[prost(message, optional, tag = "2")] + pub a1: ::core::option::Option<::prost_types::Value>, + } + } + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct ErrordataSdk { + #[prost(message, repeated, tag = "1")] + pub integrations: ::prost::alloc::vec::Vec<::prost_types::Value>, + #[prost(message, optional, tag = "2")] + pub name: ::core::option::Option<::prost_types::Value>, + #[prost(message, optional, tag = "3")] + pub version: ::core::option::Option<::prost_types::Value>, + } + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct ErrordataTags { + #[prost(message, optional, tag = "1")] + pub a0: ::core::option::Option<::prost_types::Value>, + #[prost(message, optional, tag = "2")] + pub a1: ::core::option::Option<::prost_types::Value>, + } + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct ErrordataThreads { + #[prost(message, repeated, tag = "1")] + pub values: ::prost::alloc::vec::Vec, + } + /// Nested message and enum types in `ErrordataThreads`. + pub mod errordata_threads { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct ErrordataThreadsValues { + #[prost(oneof = "errordata_threads_values::HasId", tags = "1")] + pub has_id: ::core::option::Option, + #[prost(oneof = "errordata_threads_values::HasMain", tags = "2")] + pub has_main: ::core::option::Option, + } + /// Nested message and enum types in `ErrordataThreadsValues`. + pub mod errordata_threads_values { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasId { + #[prost(message, tag = "1")] + Id(::prost_types::Value), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasMain { + #[prost(bool, tag = "2")] + Main(bool), + } + } + } + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct ErrordataUser { + #[prost(message, optional, tag = "1")] + pub email: ::core::option::Option<::prost_types::Value>, + #[prost(map = "string, message", tag = "2")] + pub geo: ::std::collections::HashMap<::prost::alloc::string::String, ::prost_types::Value>, + #[prost(message, optional, tag = "3")] + pub id: ::core::option::Option<::prost_types::Value>, + #[prost(message, optional, tag = "5")] + pub username: ::core::option::Option<::prost_types::Value>, + #[prost(oneof = "errordata_user::HasIpAddress", tags = "4")] + pub has_ip_address: ::core::option::Option, + } + /// Nested message and enum types in `ErrordataUser`. + pub mod errordata_user { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasIpAddress { + #[prost(string, tag = "4")] + IpAddress(::prost::alloc::string::String), + } + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasContexts { + #[prost(message, tag = "1")] + Contexts(ErrordataContexts), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasException { + #[prost(message, tag = "4")] + Exception(ErrordataException), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasLocation { + #[prost(string, tag = "6")] + Location(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasRequest { + #[prost(message, tag = "9")] + Request(ErrordataRequest), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasSdk { + #[prost(message, tag = "10")] + Sdk(ErrordataSdk), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasThreads { + #[prost(message, tag = "12")] + Threads(ErrordataThreads), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasUser { + #[prost(message, tag = "15")] + User(ErrordataUser), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasVersion { + #[prost(string, tag = "16")] + Version(::prost::alloc::string::String), + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Errormessage { + #[prost(message, optional, tag = "1")] + pub data: ::core::option::Option, + #[prost(string, tag = "2")] + pub datetime: ::prost::alloc::string::String, + #[prost(string, tag = "3")] + pub event_id: ::prost::alloc::string::String, + #[prost(int64, tag = "4")] + pub group_id: i64, + #[prost(string, tag = "5")] + pub message: ::prost::alloc::string::String, + #[prost(string, tag = "7")] + pub primary_hash: ::prost::alloc::string::String, + #[prost(int64, tag = "8")] + pub project_id: i64, + #[prost(oneof = "errormessage::HasPlatform", tags = "6")] + pub has_platform: ::core::option::Option, + #[prost(oneof = "errormessage::HasRetentionDays", tags = "9")] + pub has_retention_days: ::core::option::Option, +} +/// Nested message and enum types in `Errormessage`. +pub mod errormessage { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasPlatform { + #[prost(string, tag = "6")] + Platform(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasRetentionDays { + #[prost(int64, tag = "9")] + RetentionDays(i64), + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Exception { + #[prost(message, repeated, tag = "1")] + pub values: ::prost::alloc::vec::Vec, +} +/// Nested message and enum types in `Exception`. +pub mod exception { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct ExceptionValues { + #[prost(message, optional, tag = "4")] + pub r#type: ::core::option::Option<::prost_types::Value>, + #[prost(message, optional, tag = "5")] + pub value: ::core::option::Option<::prost_types::Value>, + #[prost(oneof = "exception_values::HasMechanism", tags = "1")] + pub has_mechanism: ::core::option::Option, + #[prost(oneof = "exception_values::HasStacktrace", tags = "2")] + pub has_stacktrace: ::core::option::Option, + #[prost(oneof = "exception_values::HasThreadId", tags = "3")] + pub has_thread_id: ::core::option::Option, + } + /// Nested message and enum types in `ExceptionValues`. + pub mod exception_values { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct ExceptionValuesMechanism { + #[prost(message, optional, tag = "1")] + pub handled: ::core::option::Option<::prost_types::Value>, + #[prost(message, optional, tag = "2")] + pub r#type: ::core::option::Option<::prost_types::Value>, + } + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct ExceptionValuesStacktrace { + #[prost(message, repeated, tag = "1")] + pub frames: ::prost::alloc::vec::Vec< + exception_values_stacktrace::ExceptionValuesStacktraceFrames, + >, + } + /// Nested message and enum types in `ExceptionValuesStacktrace`. + pub mod exception_values_stacktrace { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct ExceptionValuesStacktraceFrames { + #[prost(message, optional, tag = "1")] + pub abs_path: ::core::option::Option<::prost_types::Value>, + #[prost(message, optional, tag = "3")] + pub filename: ::core::option::Option<::prost_types::Value>, + #[prost(message, optional, tag = "4")] + pub function: ::core::option::Option<::prost_types::Value>, + #[prost(message, optional, tag = "7")] + pub module: ::core::option::Option<::prost_types::Value>, + #[prost(message, optional, tag = "8")] + pub package: ::core::option::Option<::prost_types::Value>, + #[prost(oneof = "exception_values_stacktrace_frames::HasColno", tags = "2")] + pub has_colno: ::core::option::Option, + #[prost(oneof = "exception_values_stacktrace_frames::HasInApp", tags = "5")] + pub has_in_app: + ::core::option::Option, + #[prost(oneof = "exception_values_stacktrace_frames::HasLineno", tags = "6")] + pub has_lineno: + ::core::option::Option, + } + /// Nested message and enum types in `ExceptionValuesStacktraceFrames`. + pub mod exception_values_stacktrace_frames { + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasColno { + #[prost(int64, tag = "2")] + Colno(i64), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasInApp { + #[prost(bool, tag = "5")] + InApp(bool), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasLineno { + #[prost(int64, tag = "6")] + Lineno(i64), + } + } + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasMechanism { + #[prost(message, tag = "1")] + Mechanism(ExceptionValuesMechanism), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasStacktrace { + #[prost(message, tag = "2")] + Stacktrace(ExceptionValuesStacktrace), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasThreadId { + #[prost(message, tag = "3")] + ThreadId(::prost_types::Value), + } + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Exceptionmechanism { + #[prost(message, optional, tag = "1")] + pub handled: ::core::option::Option<::prost_types::Value>, + #[prost(message, optional, tag = "2")] + pub r#type: ::core::option::Option<::prost_types::Value>, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Exceptionvalue { + #[prost(message, optional, tag = "4")] + pub r#type: ::core::option::Option<::prost_types::Value>, + #[prost(message, optional, tag = "5")] + pub value: ::core::option::Option<::prost_types::Value>, + #[prost(oneof = "exceptionvalue::HasMechanism", tags = "1")] + pub has_mechanism: ::core::option::Option, + #[prost(oneof = "exceptionvalue::HasStacktrace", tags = "2")] + pub has_stacktrace: ::core::option::Option, + #[prost(oneof = "exceptionvalue::HasThreadId", tags = "3")] + pub has_thread_id: ::core::option::Option, +} +/// Nested message and enum types in `Exceptionvalue`. +pub mod exceptionvalue { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct ExceptionvalueMechanism { + #[prost(message, optional, tag = "1")] + pub handled: ::core::option::Option<::prost_types::Value>, + #[prost(message, optional, tag = "2")] + pub r#type: ::core::option::Option<::prost_types::Value>, + } + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct ExceptionvalueStacktrace { + #[prost(message, repeated, tag = "1")] + pub frames: + ::prost::alloc::vec::Vec, + } + /// Nested message and enum types in `ExceptionvalueStacktrace`. + pub mod exceptionvalue_stacktrace { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct ExceptionvalueStacktraceFrames { + #[prost(message, optional, tag = "1")] + pub abs_path: ::core::option::Option<::prost_types::Value>, + #[prost(message, optional, tag = "3")] + pub filename: ::core::option::Option<::prost_types::Value>, + #[prost(message, optional, tag = "4")] + pub function: ::core::option::Option<::prost_types::Value>, + #[prost(message, optional, tag = "7")] + pub module: ::core::option::Option<::prost_types::Value>, + #[prost(message, optional, tag = "8")] + pub package: ::core::option::Option<::prost_types::Value>, + #[prost(oneof = "exceptionvalue_stacktrace_frames::HasColno", tags = "2")] + pub has_colno: ::core::option::Option, + #[prost(oneof = "exceptionvalue_stacktrace_frames::HasInApp", tags = "5")] + pub has_in_app: ::core::option::Option, + #[prost(oneof = "exceptionvalue_stacktrace_frames::HasLineno", tags = "6")] + pub has_lineno: ::core::option::Option, + } + /// Nested message and enum types in `ExceptionvalueStacktraceFrames`. + pub mod exceptionvalue_stacktrace_frames { + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasColno { + #[prost(int64, tag = "2")] + Colno(i64), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasInApp { + #[prost(bool, tag = "5")] + InApp(bool), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasLineno { + #[prost(int64, tag = "6")] + Lineno(i64), + } + } + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasMechanism { + #[prost(message, tag = "1")] + Mechanism(ExceptionvalueMechanism), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasStacktrace { + #[prost(message, tag = "2")] + Stacktrace(ExceptionvalueStacktrace), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasThreadId { + #[prost(message, tag = "3")] + ThreadId(::prost_types::Value), + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Inserteventmessage { + #[prost(int64, tag = "1")] + pub a0: i64, + #[prost(string, tag = "2")] + pub a1: ::prost::alloc::string::String, + #[prost(message, optional, tag = "3")] + pub a2: ::core::option::Option, + #[prost(message, optional, tag = "4")] + pub a3: ::core::option::Option<::prost_types::Value>, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Replaycontext { + #[prost(oneof = "replaycontext::HasReplayId", tags = "1")] + pub has_replay_id: ::core::option::Option, +} +/// Nested message and enum types in `Replaycontext`. +pub mod replaycontext { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasReplayId { + #[prost(string, tag = "1")] + ReplayId(::prost::alloc::string::String), + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Request { + #[prost(message, repeated, tag = "1")] + pub headers: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "2")] + pub method: ::core::option::Option<::prost_types::Value>, +} +/// Nested message and enum types in `Request`. +pub mod request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct RequestHeaders { + #[prost(string, tag = "1")] + pub a0: ::prost::alloc::string::String, + #[prost(message, optional, tag = "2")] + pub a1: ::core::option::Option<::prost_types::Value>, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Sdk { + #[prost(message, repeated, tag = "1")] + pub integrations: ::prost::alloc::vec::Vec<::prost_types::Value>, + #[prost(message, optional, tag = "2")] + pub name: ::core::option::Option<::prost_types::Value>, + #[prost(message, optional, tag = "3")] + pub version: ::core::option::Option<::prost_types::Value>, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Stackframe { + #[prost(message, optional, tag = "1")] + pub abs_path: ::core::option::Option<::prost_types::Value>, + #[prost(message, optional, tag = "3")] + pub filename: ::core::option::Option<::prost_types::Value>, + #[prost(message, optional, tag = "4")] + pub function: ::core::option::Option<::prost_types::Value>, + #[prost(message, optional, tag = "7")] + pub module: ::core::option::Option<::prost_types::Value>, + #[prost(message, optional, tag = "8")] + pub package: ::core::option::Option<::prost_types::Value>, + #[prost(oneof = "stackframe::HasColno", tags = "2")] + pub has_colno: ::core::option::Option, + #[prost(oneof = "stackframe::HasInApp", tags = "5")] + pub has_in_app: ::core::option::Option, + #[prost(oneof = "stackframe::HasLineno", tags = "6")] + pub has_lineno: ::core::option::Option, +} +/// Nested message and enum types in `Stackframe`. +pub mod stackframe { + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasColno { + #[prost(int64, tag = "2")] + Colno(i64), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasInApp { + #[prost(bool, tag = "5")] + InApp(bool), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasLineno { + #[prost(int64, tag = "6")] + Lineno(i64), + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Stacktrace { + #[prost(message, repeated, tag = "1")] + pub frames: ::prost::alloc::vec::Vec, +} +/// Nested message and enum types in `Stacktrace`. +pub mod stacktrace { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct StacktraceFrames { + #[prost(message, optional, tag = "1")] + pub abs_path: ::core::option::Option<::prost_types::Value>, + #[prost(message, optional, tag = "3")] + pub filename: ::core::option::Option<::prost_types::Value>, + #[prost(message, optional, tag = "4")] + pub function: ::core::option::Option<::prost_types::Value>, + #[prost(message, optional, tag = "7")] + pub module: ::core::option::Option<::prost_types::Value>, + #[prost(message, optional, tag = "8")] + pub package: ::core::option::Option<::prost_types::Value>, + #[prost(oneof = "stacktrace_frames::HasColno", tags = "2")] + pub has_colno: ::core::option::Option, + #[prost(oneof = "stacktrace_frames::HasInApp", tags = "5")] + pub has_in_app: ::core::option::Option, + #[prost(oneof = "stacktrace_frames::HasLineno", tags = "6")] + pub has_lineno: ::core::option::Option, + } + /// Nested message and enum types in `StacktraceFrames`. + pub mod stacktrace_frames { + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasColno { + #[prost(int64, tag = "2")] + Colno(i64), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasInApp { + #[prost(bool, tag = "5")] + InApp(bool), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasLineno { + #[prost(int64, tag = "6")] + Lineno(i64), + } + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Thread { + #[prost(message, repeated, tag = "1")] + pub values: ::prost::alloc::vec::Vec, +} +/// Nested message and enum types in `Thread`. +pub mod thread { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct ThreadValues { + #[prost(oneof = "thread_values::HasId", tags = "1")] + pub has_id: ::core::option::Option, + #[prost(oneof = "thread_values::HasMain", tags = "2")] + pub has_main: ::core::option::Option, + } + /// Nested message and enum types in `ThreadValues`. + pub mod thread_values { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasId { + #[prost(message, tag = "1")] + Id(::prost_types::Value), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasMain { + #[prost(bool, tag = "2")] + Main(bool), + } + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Threadvalue { + #[prost(oneof = "threadvalue::HasId", tags = "1")] + pub has_id: ::core::option::Option, + #[prost(oneof = "threadvalue::HasMain", tags = "2")] + pub has_main: ::core::option::Option, +} +/// Nested message and enum types in `Threadvalue`. +pub mod threadvalue { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasId { + #[prost(message, tag = "1")] + Id(::prost_types::Value), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasMain { + #[prost(bool, tag = "2")] + Main(bool), + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Tracecontext { + #[prost(oneof = "tracecontext::HasSampled", tags = "1")] + pub has_sampled: ::core::option::Option, + #[prost(oneof = "tracecontext::HasSpanId", tags = "2")] + pub has_span_id: ::core::option::Option, + #[prost(oneof = "tracecontext::HasTraceId", tags = "3")] + pub has_trace_id: ::core::option::Option, +} +/// Nested message and enum types in `Tracecontext`. +pub mod tracecontext { + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasSampled { + #[prost(bool, tag = "1")] + Sampled(bool), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasSpanId { + #[prost(string, tag = "2")] + SpanId(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasTraceId { + #[prost(string, tag = "3")] + TraceId(::prost::alloc::string::String), + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct User { + #[prost(message, optional, tag = "1")] + pub email: ::core::option::Option<::prost_types::Value>, + #[prost(map = "string, message", tag = "2")] + pub geo: ::std::collections::HashMap<::prost::alloc::string::String, ::prost_types::Value>, + #[prost(message, optional, tag = "3")] + pub id: ::core::option::Option<::prost_types::Value>, + #[prost(message, optional, tag = "5")] + pub username: ::core::option::Option<::prost_types::Value>, + #[prost(oneof = "user::HasIpAddress", tags = "4")] + pub has_ip_address: ::core::option::Option, +} +/// Nested message and enum types in `User`. +pub mod user { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasIpAddress { + #[prost(string, tag = "4")] + IpAddress(::prost::alloc::string::String), + } +} diff --git a/sentry_protos/src/sentry_protos.options.v1.rs b/sentry_protos/src/sentry_protos.options.v1.rs new file mode 100644 index 00000000000..f215544c24a --- /dev/null +++ b/sentry_protos/src/sentry_protos.options.v1.rs @@ -0,0 +1,46 @@ +// This file is @generated by prost-build. +/// Used to signal that a schema is associated with the output of a kafka topic, including +/// some metadata about that. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TopicConfig { + #[prost(string, tag = "1")] + pub topic: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub description: ::prost::alloc::string::String, + #[prost(message, optional, tag = "3")] + pub services: ::core::option::Option, + #[prost(string, tag = "4")] + pub pipeline: ::prost::alloc::string::String, + #[prost(map = "string, string", tag = "5")] + pub topic_creation_config: + ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + #[prost(oneof = "topic_config::HasEnforcedPartitionCount", tags = "6")] + pub has_enforced_partition_count: + ::core::option::Option, +} +/// Nested message and enum types in `TopicConfig`. +pub mod topic_config { + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasEnforcedPartitionCount { + #[prost(uint64, tag = "6")] + EnforcedPartitionCount(u64), + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ServicesData { + #[prost(string, repeated, tag = "1")] + pub consumers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "2")] + pub producers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +/// Signals that a producer of this data intends a specific value as a potential discriminator. +/// At a protocol level, consts should not be enforced or validated, but they can be used to +/// make decisions. They are a lightweight coordination paradigm with little more guarantee +/// than best-effort. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Const { + #[prost(int64, tag = "1")] + pub int: i64, + #[prost(string, tag = "2")] + pub string: ::prost::alloc::string::String, +} diff --git a/sentry_protos/src/sentry_protos.relay.v1.rs b/sentry_protos/src/sentry_protos.relay.v1.rs new file mode 100644 index 00000000000..1c8bf957c30 --- /dev/null +++ b/sentry_protos/src/sentry_protos.relay.v1.rs @@ -0,0 +1,6236 @@ +// This file is @generated by prost-build. +/// +/// The sentry v7 event structure. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Event { + #[prost(map = "string, message", tag = "2")] + pub contexts: ::std::collections::HashMap<::prost::alloc::string::String, ::prost_types::Value>, + #[prost(message, repeated, tag = "7")] + pub errors: ::prost::alloc::vec::Vec, + #[prost(string, repeated, tag = "11")] + pub fingerprint: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(map = "string, string", tag = "15")] + pub modules: + ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + #[prost(oneof = "event::HasBreadcrumbs", tags = "1")] + pub has_breadcrumbs: ::core::option::Option, + #[prost(oneof = "event::HasCulprit", tags = "3")] + pub has_culprit: ::core::option::Option, + #[prost(oneof = "event::HasDebugMeta", tags = "4")] + pub has_debug_meta: ::core::option::Option, + #[prost(oneof = "event::HasDist", tags = "5")] + pub has_dist: ::core::option::Option, + #[prost(oneof = "event::HasEnvironment", tags = "6")] + pub has_environment: ::core::option::Option, + #[prost(oneof = "event::HasEventId", tags = "8")] + pub has_event_id: ::core::option::Option, + #[prost(oneof = "event::HasException", tags = "9")] + pub has_exception: ::core::option::Option, + #[prost(oneof = "event::HasExtra", tags = "10")] + pub has_extra: ::core::option::Option, + #[prost(oneof = "event::HasLevel", tags = "12")] + pub has_level: ::core::option::Option, + #[prost(oneof = "event::HasLogentry", tags = "13")] + pub has_logentry: ::core::option::Option, + #[prost(oneof = "event::HasLogger", tags = "14")] + pub has_logger: ::core::option::Option, + #[prost(oneof = "event::HasPlatform", tags = "16")] + pub has_platform: ::core::option::Option, + #[prost(oneof = "event::HasReceived", tags = "17")] + pub has_received: ::core::option::Option, + #[prost(oneof = "event::HasRelease", tags = "18")] + pub has_release: ::core::option::Option, + #[prost(oneof = "event::HasRequest", tags = "19")] + pub has_request: ::core::option::Option, + #[prost(oneof = "event::HasSdk", tags = "20")] + pub has_sdk: ::core::option::Option, + #[prost(oneof = "event::HasServerName", tags = "21")] + pub has_server_name: ::core::option::Option, + #[prost(oneof = "event::HasStacktrace", tags = "22")] + pub has_stacktrace: ::core::option::Option, + #[prost(oneof = "event::HasTags", tags = "23")] + pub has_tags: ::core::option::Option, + #[prost(oneof = "event::HasThreads", tags = "24")] + pub has_threads: ::core::option::Option, + #[prost(oneof = "event::HasTimeSpent", tags = "25")] + pub has_time_spent: ::core::option::Option, + #[prost(oneof = "event::HasTimestamp", tags = "26")] + pub has_timestamp: ::core::option::Option, + #[prost(oneof = "event::HasTransaction", tags = "27")] + pub has_transaction: ::core::option::Option, + #[prost(oneof = "event::HasTransactionInfo", tags = "28")] + pub has_transaction_info: ::core::option::Option, + #[prost(oneof = "event::HasType", tags = "29")] + pub has_type: ::core::option::Option, + #[prost(oneof = "event::HasUser", tags = "30")] + pub has_user: ::core::option::Option, + #[prost(oneof = "event::HasVersion", tags = "31")] + pub has_version: ::core::option::Option, +} +/// Nested message and enum types in `Event`. +pub mod event { + /// + /// List of breadcrumbs recorded before this event. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct EventBreadcrumbs { + #[prost(message, repeated, tag = "1")] + pub values: ::prost::alloc::vec::Vec, + } + /// Nested message and enum types in `EventBreadcrumbs`. + pub mod event_breadcrumbs { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct EventBreadcrumbsValues { + #[prost(oneof = "event_breadcrumbs_values::HasCategory", tags = "1")] + pub has_category: ::core::option::Option, + #[prost(oneof = "event_breadcrumbs_values::HasData", tags = "2")] + pub has_data: ::core::option::Option, + #[prost(oneof = "event_breadcrumbs_values::HasEventId", tags = "3")] + pub has_event_id: ::core::option::Option, + #[prost(oneof = "event_breadcrumbs_values::HasLevel", tags = "4")] + pub has_level: ::core::option::Option, + #[prost(oneof = "event_breadcrumbs_values::HasMessage", tags = "5")] + pub has_message: ::core::option::Option, + #[prost(oneof = "event_breadcrumbs_values::HasTimestamp", tags = "6")] + pub has_timestamp: ::core::option::Option, + #[prost(oneof = "event_breadcrumbs_values::HasType", tags = "7")] + pub has_type: ::core::option::Option, + } + /// Nested message and enum types in `EventBreadcrumbsValues`. + pub mod event_breadcrumbs_values { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasCategory { + #[prost(string, tag = "1")] + Category(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasData { + #[prost(message, tag = "2")] + Data(::prost_types::Value), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasEventId { + #[prost(string, tag = "3")] + EventId(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasLevel { + #[prost(string, tag = "4")] + Level(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasMessage { + #[prost(string, tag = "5")] + Message(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasTimestamp { + #[prost(message, tag = "6")] + Timestamp(::prost_types::Value), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasType { + #[prost(string, tag = "7")] + Type(::prost::alloc::string::String), + } + } + } + /// + /// Meta data for event processing and debugging. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct EventDebugMeta { + #[prost(message, repeated, tag = "1")] + pub images: ::prost::alloc::vec::Vec<::prost_types::Value>, + #[prost(oneof = "event_debug_meta::HasSdkInfo", tags = "2")] + pub has_sdk_info: ::core::option::Option, + } + /// Nested message and enum types in `EventDebugMeta`. + pub mod event_debug_meta { + /// + /// Information about the system SDK (e.g. iOS SDK). + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct EventDebugMetaSdkInfo { + #[prost(oneof = "event_debug_meta_sdk_info::HasSdkName", tags = "1")] + pub has_sdk_name: ::core::option::Option, + #[prost(oneof = "event_debug_meta_sdk_info::HasVersionMajor", tags = "2")] + pub has_version_major: + ::core::option::Option, + #[prost(oneof = "event_debug_meta_sdk_info::HasVersionMinor", tags = "3")] + pub has_version_minor: + ::core::option::Option, + #[prost(oneof = "event_debug_meta_sdk_info::HasVersionPatchlevel", tags = "4")] + pub has_version_patchlevel: + ::core::option::Option, + } + /// Nested message and enum types in `EventDebugMetaSdkInfo`. + pub mod event_debug_meta_sdk_info { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasSdkName { + #[prost(string, tag = "1")] + SdkName(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasVersionMajor { + #[prost(uint64, tag = "2")] + VersionMajor(u64), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasVersionMinor { + #[prost(uint64, tag = "3")] + VersionMinor(u64), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasVersionPatchlevel { + #[prost(uint64, tag = "4")] + VersionPatchlevel(u64), + } + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasSdkInfo { + #[prost(message, tag = "2")] + SdkInfo(EventDebugMetaSdkInfo), + } + } + /// + /// Errors encountered during processing. Intended to be phased out in favor of + /// annotation/metadata system. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct EventErrors { + #[prost(string, tag = "2")] + pub r#type: ::prost::alloc::string::String, + #[prost(message, optional, tag = "3")] + pub value: ::core::option::Option<::prost_types::Value>, + #[prost(oneof = "event_errors::HasName", tags = "1")] + pub has_name: ::core::option::Option, + } + /// Nested message and enum types in `EventErrors`. + pub mod event_errors { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasName { + #[prost(string, tag = "1")] + Name(::prost::alloc::string::String), + } + } + /// + /// One or multiple chained (nested) exceptions. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct EventException { + #[prost(message, repeated, tag = "1")] + pub values: ::prost::alloc::vec::Vec, + } + /// Nested message and enum types in `EventException`. + pub mod event_exception { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct EventExceptionValues { + #[prost(oneof = "event_exception_values::HasMechanism", tags = "1")] + pub has_mechanism: ::core::option::Option, + #[prost(oneof = "event_exception_values::HasModule", tags = "2")] + pub has_module: ::core::option::Option, + #[prost(oneof = "event_exception_values::HasStacktrace", tags = "3")] + pub has_stacktrace: ::core::option::Option, + #[prost(oneof = "event_exception_values::HasThreadId", tags = "4")] + pub has_thread_id: ::core::option::Option, + #[prost(oneof = "event_exception_values::HasType", tags = "5")] + pub has_type: ::core::option::Option, + #[prost(oneof = "event_exception_values::HasValue", tags = "6")] + pub has_value: ::core::option::Option, + } + /// Nested message and enum types in `EventExceptionValues`. + pub mod event_exception_values { + /// + /// Mechanism by which this exception was generated and handled. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct EventExceptionValuesMechanism { + #[prost(string, tag = "11")] + pub r#type: ::prost::alloc::string::String, + #[prost(oneof = "event_exception_values_mechanism::HasData", tags = "1")] + pub has_data: ::core::option::Option, + #[prost(oneof = "event_exception_values_mechanism::HasDescription", tags = "2")] + pub has_description: + ::core::option::Option, + #[prost(oneof = "event_exception_values_mechanism::HasExceptionId", tags = "3")] + pub has_exception_id: + ::core::option::Option, + #[prost(oneof = "event_exception_values_mechanism::HasHandled", tags = "4")] + pub has_handled: + ::core::option::Option, + #[prost(oneof = "event_exception_values_mechanism::HasHelpLink", tags = "5")] + pub has_help_link: + ::core::option::Option, + #[prost( + oneof = "event_exception_values_mechanism::HasIsExceptionGroup", + tags = "6" + )] + pub has_is_exception_group: + ::core::option::Option, + #[prost(oneof = "event_exception_values_mechanism::HasMeta", tags = "7")] + pub has_meta: ::core::option::Option, + #[prost(oneof = "event_exception_values_mechanism::HasParentId", tags = "8")] + pub has_parent_id: + ::core::option::Option, + #[prost(oneof = "event_exception_values_mechanism::HasSource", tags = "9")] + pub has_source: ::core::option::Option, + #[prost(oneof = "event_exception_values_mechanism::HasSynthetic", tags = "10")] + pub has_synthetic: + ::core::option::Option, + } + /// Nested message and enum types in `EventExceptionValuesMechanism`. + pub mod event_exception_values_mechanism { + /// + /// Operating system or runtime meta information. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct EventExceptionValuesMechanismMeta { + #[prost(oneof = "event_exception_values_mechanism_meta::HasErrno", tags = "1")] + pub has_errno: + ::core::option::Option, + #[prost( + oneof = "event_exception_values_mechanism_meta::HasMachException", + tags = "2" + )] + pub has_mach_exception: ::core::option::Option< + event_exception_values_mechanism_meta::HasMachException, + >, + #[prost( + oneof = "event_exception_values_mechanism_meta::HasNsError", + tags = "3" + )] + pub has_ns_error: + ::core::option::Option, + #[prost( + oneof = "event_exception_values_mechanism_meta::HasSignal", + tags = "4" + )] + pub has_signal: + ::core::option::Option, + } + /// Nested message and enum types in `EventExceptionValuesMechanismMeta`. + pub mod event_exception_values_mechanism_meta { + /// + /// Optional ISO C standard error code. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct EventExceptionValuesMechanismMetaErrno { + #[prost( + oneof = "event_exception_values_mechanism_meta_errno::HasName", + tags = "1" + )] + pub has_name: ::core::option::Option< + event_exception_values_mechanism_meta_errno::HasName, + >, + #[prost( + oneof = "event_exception_values_mechanism_meta_errno::HasNumber", + tags = "2" + )] + pub has_number: ::core::option::Option< + event_exception_values_mechanism_meta_errno::HasNumber, + >, + } + /// Nested message and enum types in `EventExceptionValuesMechanismMetaErrno`. + pub mod event_exception_values_mechanism_meta_errno { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasName { + #[prost(string, tag = "1")] + Name(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasNumber { + #[prost(int64, tag = "2")] + Number(i64), + } + } + /// + /// A Mach Exception on Apple systems comprising a code triple and optional descriptions. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct EventExceptionValuesMechanismMetaMachException { + #[prost( + oneof = "event_exception_values_mechanism_meta_mach_exception::HasCode", + tags = "1" + )] + pub has_code: ::core::option::Option< + event_exception_values_mechanism_meta_mach_exception::HasCode, + >, + #[prost( + oneof = "event_exception_values_mechanism_meta_mach_exception::HasException", + tags = "2" + )] + pub has_exception: ::core::option::Option< + event_exception_values_mechanism_meta_mach_exception::HasException, + >, + #[prost( + oneof = "event_exception_values_mechanism_meta_mach_exception::HasName", + tags = "3" + )] + pub has_name: ::core::option::Option< + event_exception_values_mechanism_meta_mach_exception::HasName, + >, + #[prost( + oneof = "event_exception_values_mechanism_meta_mach_exception::HasSubcode", + tags = "4" + )] + pub has_subcode: ::core::option::Option< + event_exception_values_mechanism_meta_mach_exception::HasSubcode, + >, + } + /// Nested message and enum types in `EventExceptionValuesMechanismMetaMachException`. + pub mod event_exception_values_mechanism_meta_mach_exception { + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasCode { + #[prost(uint64, tag = "1")] + Code(u64), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasException { + #[prost(int64, tag = "2")] + Exception(i64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasName { + #[prost(string, tag = "3")] + Name(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasSubcode { + #[prost(uint64, tag = "4")] + Subcode(u64), + } + } + /// + /// An NSError on Apple systems comprising code and signal. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct EventExceptionValuesMechanismMetaNsError { + #[prost( + oneof = "event_exception_values_mechanism_meta_ns_error::HasCode", + tags = "1" + )] + pub has_code: ::core::option::Option< + event_exception_values_mechanism_meta_ns_error::HasCode, + >, + #[prost( + oneof = "event_exception_values_mechanism_meta_ns_error::HasDomain", + tags = "2" + )] + pub has_domain: ::core::option::Option< + event_exception_values_mechanism_meta_ns_error::HasDomain, + >, + } + /// Nested message and enum types in `EventExceptionValuesMechanismMetaNsError`. + pub mod event_exception_values_mechanism_meta_ns_error { + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasCode { + #[prost(int64, tag = "1")] + Code(i64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasDomain { + #[prost(string, tag = "2")] + Domain(::prost::alloc::string::String), + } + } + /// + /// Information on the POSIX signal. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct EventExceptionValuesMechanismMetaSignal { + #[prost( + oneof = "event_exception_values_mechanism_meta_signal::HasCode", + tags = "1" + )] + pub has_code: ::core::option::Option< + event_exception_values_mechanism_meta_signal::HasCode, + >, + #[prost( + oneof = "event_exception_values_mechanism_meta_signal::HasCodeName", + tags = "2" + )] + pub has_code_name: ::core::option::Option< + event_exception_values_mechanism_meta_signal::HasCodeName, + >, + #[prost( + oneof = "event_exception_values_mechanism_meta_signal::HasName", + tags = "3" + )] + pub has_name: ::core::option::Option< + event_exception_values_mechanism_meta_signal::HasName, + >, + #[prost( + oneof = "event_exception_values_mechanism_meta_signal::HasNumber", + tags = "4" + )] + pub has_number: ::core::option::Option< + event_exception_values_mechanism_meta_signal::HasNumber, + >, + } + /// Nested message and enum types in `EventExceptionValuesMechanismMetaSignal`. + pub mod event_exception_values_mechanism_meta_signal { + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasCode { + #[prost(int64, tag = "1")] + Code(i64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasCodeName { + #[prost(string, tag = "2")] + CodeName(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasName { + #[prost(string, tag = "3")] + Name(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasNumber { + #[prost(int64, tag = "4")] + Number(i64), + } + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasErrno { + #[prost(message, tag = "1")] + Errno(EventExceptionValuesMechanismMetaErrno), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasMachException { + #[prost(message, tag = "2")] + MachException(EventExceptionValuesMechanismMetaMachException), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasNsError { + #[prost(message, tag = "3")] + NsError(EventExceptionValuesMechanismMetaNsError), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasSignal { + #[prost(message, tag = "4")] + Signal(EventExceptionValuesMechanismMetaSignal), + } + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasData { + #[prost(message, tag = "1")] + Data(::prost_types::Value), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasDescription { + #[prost(string, tag = "2")] + Description(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasExceptionId { + #[prost(uint64, tag = "3")] + ExceptionId(u64), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasHandled { + #[prost(bool, tag = "4")] + Handled(bool), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasHelpLink { + #[prost(string, tag = "5")] + HelpLink(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasIsExceptionGroup { + #[prost(bool, tag = "6")] + IsExceptionGroup(bool), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasMeta { + #[prost(message, tag = "7")] + Meta(EventExceptionValuesMechanismMeta), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasParentId { + #[prost(uint64, tag = "8")] + ParentId(u64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasSource { + #[prost(string, tag = "9")] + Source(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasSynthetic { + #[prost(bool, tag = "10")] + Synthetic(bool), + } + } + /// + /// Stack trace containing frames of this exception. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct EventExceptionValuesStacktrace { + #[prost(message, repeated, tag = "1")] + pub frames: ::prost::alloc::vec::Vec< + event_exception_values_stacktrace::EventExceptionValuesStacktraceFrames, + >, + #[prost(map = "string, string", tag = "4")] + pub registers: ::std::collections::HashMap< + ::prost::alloc::string::String, + ::prost::alloc::string::String, + >, + #[prost( + oneof = "event_exception_values_stacktrace::HasInstructionAddrAdjustment", + tags = "2" + )] + pub has_instruction_addr_adjustment: ::core::option::Option< + event_exception_values_stacktrace::HasInstructionAddrAdjustment, + >, + #[prost(oneof = "event_exception_values_stacktrace::HasLang", tags = "3")] + pub has_lang: ::core::option::Option, + #[prost(oneof = "event_exception_values_stacktrace::HasSnapshot", tags = "5")] + pub has_snapshot: + ::core::option::Option, + } + /// Nested message and enum types in `EventExceptionValuesStacktrace`. + pub mod event_exception_values_stacktrace { + /// + /// Required. A non-empty list of stack frames. The list is ordered from caller to callee, or + /// oldest to youngest. The last frame is the one creating the exception. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct EventExceptionValuesStacktraceFrames { + #[prost(string, repeated, tag = "16")] + pub post_context: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "17")] + pub pre_context: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost( + oneof = "event_exception_values_stacktrace_frames::HasAbsPath", + tags = "1" + )] + pub has_abs_path: ::core::option::Option< + event_exception_values_stacktrace_frames::HasAbsPath, + >, + #[prost( + oneof = "event_exception_values_stacktrace_frames::HasAddrMode", + tags = "2" + )] + pub has_addr_mode: ::core::option::Option< + event_exception_values_stacktrace_frames::HasAddrMode, + >, + #[prost( + oneof = "event_exception_values_stacktrace_frames::HasColno", + tags = "3" + )] + pub has_colno: + ::core::option::Option, + #[prost( + oneof = "event_exception_values_stacktrace_frames::HasContextLine", + tags = "4" + )] + pub has_context_line: ::core::option::Option< + event_exception_values_stacktrace_frames::HasContextLine, + >, + #[prost( + oneof = "event_exception_values_stacktrace_frames::HasFilename", + tags = "5" + )] + pub has_filename: ::core::option::Option< + event_exception_values_stacktrace_frames::HasFilename, + >, + #[prost( + oneof = "event_exception_values_stacktrace_frames::HasFunction", + tags = "6" + )] + pub has_function: ::core::option::Option< + event_exception_values_stacktrace_frames::HasFunction, + >, + #[prost( + oneof = "event_exception_values_stacktrace_frames::HasFunctionId", + tags = "7" + )] + pub has_function_id: ::core::option::Option< + event_exception_values_stacktrace_frames::HasFunctionId, + >, + #[prost( + oneof = "event_exception_values_stacktrace_frames::HasImageAddr", + tags = "8" + )] + pub has_image_addr: ::core::option::Option< + event_exception_values_stacktrace_frames::HasImageAddr, + >, + #[prost( + oneof = "event_exception_values_stacktrace_frames::HasInApp", + tags = "9" + )] + pub has_in_app: + ::core::option::Option, + #[prost( + oneof = "event_exception_values_stacktrace_frames::HasInstructionAddr", + tags = "10" + )] + pub has_instruction_addr: ::core::option::Option< + event_exception_values_stacktrace_frames::HasInstructionAddr, + >, + #[prost( + oneof = "event_exception_values_stacktrace_frames::HasLineno", + tags = "11" + )] + pub has_lineno: + ::core::option::Option, + #[prost( + oneof = "event_exception_values_stacktrace_frames::HasLock", + tags = "12" + )] + pub has_lock: + ::core::option::Option, + #[prost( + oneof = "event_exception_values_stacktrace_frames::HasModule", + tags = "13" + )] + pub has_module: + ::core::option::Option, + #[prost( + oneof = "event_exception_values_stacktrace_frames::HasPackage", + tags = "14" + )] + pub has_package: ::core::option::Option< + event_exception_values_stacktrace_frames::HasPackage, + >, + #[prost( + oneof = "event_exception_values_stacktrace_frames::HasPlatform", + tags = "15" + )] + pub has_platform: ::core::option::Option< + event_exception_values_stacktrace_frames::HasPlatform, + >, + #[prost( + oneof = "event_exception_values_stacktrace_frames::HasRawFunction", + tags = "18" + )] + pub has_raw_function: ::core::option::Option< + event_exception_values_stacktrace_frames::HasRawFunction, + >, + #[prost( + oneof = "event_exception_values_stacktrace_frames::HasStackStart", + tags = "19" + )] + pub has_stack_start: ::core::option::Option< + event_exception_values_stacktrace_frames::HasStackStart, + >, + #[prost( + oneof = "event_exception_values_stacktrace_frames::HasSymbol", + tags = "20" + )] + pub has_symbol: + ::core::option::Option, + #[prost( + oneof = "event_exception_values_stacktrace_frames::HasSymbolAddr", + tags = "21" + )] + pub has_symbol_addr: ::core::option::Option< + event_exception_values_stacktrace_frames::HasSymbolAddr, + >, + #[prost( + oneof = "event_exception_values_stacktrace_frames::HasVars", + tags = "22" + )] + pub has_vars: + ::core::option::Option, + } + /// Nested message and enum types in `EventExceptionValuesStacktraceFrames`. + pub mod event_exception_values_stacktrace_frames { + /// + /// A possible lock (java monitor object) held by this frame. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct EventExceptionValuesStacktraceFramesLock { + #[prost(string, tag = "5")] + pub r#type: ::prost::alloc::string::String, + #[prost( + oneof = "event_exception_values_stacktrace_frames_lock::HasAddress", + tags = "1" + )] + pub has_address: ::core::option::Option< + event_exception_values_stacktrace_frames_lock::HasAddress, + >, + #[prost( + oneof = "event_exception_values_stacktrace_frames_lock::HasClassName", + tags = "2" + )] + pub has_class_name: ::core::option::Option< + event_exception_values_stacktrace_frames_lock::HasClassName, + >, + #[prost( + oneof = "event_exception_values_stacktrace_frames_lock::HasPackageName", + tags = "3" + )] + pub has_package_name: ::core::option::Option< + event_exception_values_stacktrace_frames_lock::HasPackageName, + >, + #[prost( + oneof = "event_exception_values_stacktrace_frames_lock::HasThreadId", + tags = "4" + )] + pub has_thread_id: ::core::option::Option< + event_exception_values_stacktrace_frames_lock::HasThreadId, + >, + } + /// Nested message and enum types in `EventExceptionValuesStacktraceFramesLock`. + pub mod event_exception_values_stacktrace_frames_lock { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasAddress { + #[prost(string, tag = "1")] + Address(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasClassName { + #[prost(string, tag = "2")] + ClassName(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasPackageName { + #[prost(string, tag = "3")] + PackageName(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasThreadId { + #[prost(message, tag = "4")] + ThreadId(::prost_types::Value), + } + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasAbsPath { + #[prost(string, tag = "1")] + AbsPath(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasAddrMode { + #[prost(string, tag = "2")] + AddrMode(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasColno { + #[prost(uint64, tag = "3")] + Colno(u64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasContextLine { + #[prost(string, tag = "4")] + ContextLine(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasFilename { + #[prost(string, tag = "5")] + Filename(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasFunction { + #[prost(string, tag = "6")] + Function(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasFunctionId { + #[prost(string, tag = "7")] + FunctionId(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasImageAddr { + #[prost(string, tag = "8")] + ImageAddr(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasInApp { + #[prost(bool, tag = "9")] + InApp(bool), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasInstructionAddr { + #[prost(string, tag = "10")] + InstructionAddr(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasLineno { + #[prost(uint64, tag = "11")] + Lineno(u64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasLock { + #[prost(message, tag = "12")] + Lock(EventExceptionValuesStacktraceFramesLock), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasModule { + #[prost(string, tag = "13")] + Module(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasPackage { + #[prost(string, tag = "14")] + Package(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasPlatform { + #[prost(string, tag = "15")] + Platform(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasRawFunction { + #[prost(string, tag = "18")] + RawFunction(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasStackStart { + #[prost(bool, tag = "19")] + StackStart(bool), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasSymbol { + #[prost(string, tag = "20")] + Symbol(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasSymbolAddr { + #[prost(string, tag = "21")] + SymbolAddr(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasVars { + #[prost(message, tag = "22")] + Vars(::prost_types::Value), + } + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasInstructionAddrAdjustment { + #[prost(string, tag = "2")] + InstructionAddrAdjustment(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasLang { + #[prost(string, tag = "3")] + Lang(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasSnapshot { + #[prost(bool, tag = "5")] + Snapshot(bool), + } + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasMechanism { + #[prost(message, tag = "1")] + Mechanism(EventExceptionValuesMechanism), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasModule { + #[prost(string, tag = "2")] + Module(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasStacktrace { + #[prost(message, tag = "3")] + Stacktrace(EventExceptionValuesStacktrace), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasThreadId { + #[prost(message, tag = "4")] + ThreadId(::prost_types::Value), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasType { + #[prost(string, tag = "5")] + Type(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasValue { + #[prost(string, tag = "6")] + Value(::prost::alloc::string::String), + } + } + } + /// + /// Custom parameterized message for this event. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct EventLogentry { + #[prost(message, optional, tag = "3")] + pub params: ::core::option::Option<::prost_types::Value>, + #[prost(oneof = "event_logentry::HasFormatted", tags = "1")] + pub has_formatted: ::core::option::Option, + #[prost(oneof = "event_logentry::HasMessage", tags = "2")] + pub has_message: ::core::option::Option, + } + /// Nested message and enum types in `EventLogentry`. + pub mod event_logentry { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasFormatted { + #[prost(string, tag = "1")] + Formatted(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasMessage { + #[prost(string, tag = "2")] + Message(::prost::alloc::string::String), + } + } + /// + /// Information about a web request that occurred during the event. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct EventRequest { + #[prost(message, optional, tag = "4")] + pub data: ::core::option::Option<::prost_types::Value>, + #[prost(oneof = "event_request::HasApiTarget", tags = "1")] + pub has_api_target: ::core::option::Option, + #[prost(oneof = "event_request::HasBodySize", tags = "2")] + pub has_body_size: ::core::option::Option, + #[prost(oneof = "event_request::HasCookies", tags = "3")] + pub has_cookies: ::core::option::Option, + #[prost(oneof = "event_request::HasEnv", tags = "5")] + pub has_env: ::core::option::Option, + #[prost(oneof = "event_request::HasFragment", tags = "6")] + pub has_fragment: ::core::option::Option, + #[prost(oneof = "event_request::HasHeaders", tags = "7")] + pub has_headers: ::core::option::Option, + #[prost(oneof = "event_request::HasInferredContentType", tags = "8")] + pub has_inferred_content_type: + ::core::option::Option, + #[prost(oneof = "event_request::HasMethod", tags = "9")] + pub has_method: ::core::option::Option, + #[prost(oneof = "event_request::HasProtocol", tags = "10")] + pub has_protocol: ::core::option::Option, + #[prost(oneof = "event_request::HasQueryString", tags = "11")] + pub has_query_string: ::core::option::Option, + #[prost(oneof = "event_request::HasUrl", tags = "12")] + pub has_url: ::core::option::Option, + } + /// Nested message and enum types in `EventRequest`. + pub mod event_request { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasApiTarget { + #[prost(string, tag = "1")] + ApiTarget(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasBodySize { + #[prost(uint64, tag = "2")] + BodySize(u64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasCookies { + #[prost(message, tag = "3")] + Cookies(::prost_types::Value), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasEnv { + #[prost(message, tag = "5")] + Env(::prost_types::Value), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasFragment { + #[prost(string, tag = "6")] + Fragment(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasHeaders { + #[prost(message, tag = "7")] + Headers(::prost_types::Value), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasInferredContentType { + #[prost(string, tag = "8")] + InferredContentType(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasMethod { + #[prost(string, tag = "9")] + Method(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasProtocol { + #[prost(string, tag = "10")] + Protocol(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasQueryString { + #[prost(message, tag = "11")] + QueryString(::prost_types::Value), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasUrl { + #[prost(string, tag = "12")] + Url(::prost::alloc::string::String), + } + } + /// + /// Information about the Sentry SDK that generated this event. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct EventSdk { + #[prost(string, repeated, tag = "1")] + pub integrations: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, tag = "2")] + pub name: ::prost::alloc::string::String, + #[prost(message, repeated, tag = "3")] + pub packages: ::prost::alloc::vec::Vec, + #[prost(string, tag = "4")] + pub version: ::prost::alloc::string::String, + } + /// Nested message and enum types in `EventSdk`. + pub mod event_sdk { + /// + /// List of installed and loaded SDK packages. _Optional._ + /// + /// A list of packages that were installed as part of this SDK or the activated integrations. + /// Each package consists of a name in the format `source:identifier` and `version`. If the + /// source is a Git repository, the `source` should be `git`, the identifier should be a + /// checkout link and the version should be a Git reference (branch, tag or SHA). + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct EventSdkPackages { + #[prost(oneof = "event_sdk_packages::HasName", tags = "1")] + pub has_name: ::core::option::Option, + #[prost(oneof = "event_sdk_packages::HasVersion", tags = "2")] + pub has_version: ::core::option::Option, + } + /// Nested message and enum types in `EventSdkPackages`. + pub mod event_sdk_packages { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasName { + #[prost(string, tag = "1")] + Name(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasVersion { + #[prost(string, tag = "2")] + Version(::prost::alloc::string::String), + } + } + } + /// + /// Event stacktrace. + /// + /// DEPRECATED: Prefer `threads` or `exception` depending on which is more appropriate. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct EventStacktrace { + #[prost(message, repeated, tag = "1")] + pub frames: ::prost::alloc::vec::Vec, + #[prost(map = "string, string", tag = "4")] + pub registers: ::std::collections::HashMap< + ::prost::alloc::string::String, + ::prost::alloc::string::String, + >, + #[prost(oneof = "event_stacktrace::HasInstructionAddrAdjustment", tags = "2")] + pub has_instruction_addr_adjustment: + ::core::option::Option, + #[prost(oneof = "event_stacktrace::HasLang", tags = "3")] + pub has_lang: ::core::option::Option, + #[prost(oneof = "event_stacktrace::HasSnapshot", tags = "5")] + pub has_snapshot: ::core::option::Option, + } + /// Nested message and enum types in `EventStacktrace`. + pub mod event_stacktrace { + /// + /// Required. A non-empty list of stack frames. The list is ordered from caller to callee, or + /// oldest to youngest. The last frame is the one creating the exception. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct EventStacktraceFrames { + #[prost(string, repeated, tag = "16")] + pub post_context: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "17")] + pub pre_context: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(oneof = "event_stacktrace_frames::HasAbsPath", tags = "1")] + pub has_abs_path: ::core::option::Option, + #[prost(oneof = "event_stacktrace_frames::HasAddrMode", tags = "2")] + pub has_addr_mode: ::core::option::Option, + #[prost(oneof = "event_stacktrace_frames::HasColno", tags = "3")] + pub has_colno: ::core::option::Option, + #[prost(oneof = "event_stacktrace_frames::HasContextLine", tags = "4")] + pub has_context_line: ::core::option::Option, + #[prost(oneof = "event_stacktrace_frames::HasFilename", tags = "5")] + pub has_filename: ::core::option::Option, + #[prost(oneof = "event_stacktrace_frames::HasFunction", tags = "6")] + pub has_function: ::core::option::Option, + #[prost(oneof = "event_stacktrace_frames::HasFunctionId", tags = "7")] + pub has_function_id: ::core::option::Option, + #[prost(oneof = "event_stacktrace_frames::HasImageAddr", tags = "8")] + pub has_image_addr: ::core::option::Option, + #[prost(oneof = "event_stacktrace_frames::HasInApp", tags = "9")] + pub has_in_app: ::core::option::Option, + #[prost(oneof = "event_stacktrace_frames::HasInstructionAddr", tags = "10")] + pub has_instruction_addr: + ::core::option::Option, + #[prost(oneof = "event_stacktrace_frames::HasLineno", tags = "11")] + pub has_lineno: ::core::option::Option, + #[prost(oneof = "event_stacktrace_frames::HasLock", tags = "12")] + pub has_lock: ::core::option::Option, + #[prost(oneof = "event_stacktrace_frames::HasModule", tags = "13")] + pub has_module: ::core::option::Option, + #[prost(oneof = "event_stacktrace_frames::HasPackage", tags = "14")] + pub has_package: ::core::option::Option, + #[prost(oneof = "event_stacktrace_frames::HasPlatform", tags = "15")] + pub has_platform: ::core::option::Option, + #[prost(oneof = "event_stacktrace_frames::HasRawFunction", tags = "18")] + pub has_raw_function: ::core::option::Option, + #[prost(oneof = "event_stacktrace_frames::HasStackStart", tags = "19")] + pub has_stack_start: ::core::option::Option, + #[prost(oneof = "event_stacktrace_frames::HasSymbol", tags = "20")] + pub has_symbol: ::core::option::Option, + #[prost(oneof = "event_stacktrace_frames::HasSymbolAddr", tags = "21")] + pub has_symbol_addr: ::core::option::Option, + #[prost(oneof = "event_stacktrace_frames::HasVars", tags = "22")] + pub has_vars: ::core::option::Option, + } + /// Nested message and enum types in `EventStacktraceFrames`. + pub mod event_stacktrace_frames { + /// + /// A possible lock (java monitor object) held by this frame. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct EventStacktraceFramesLock { + #[prost(string, tag = "5")] + pub r#type: ::prost::alloc::string::String, + #[prost(oneof = "event_stacktrace_frames_lock::HasAddress", tags = "1")] + pub has_address: ::core::option::Option, + #[prost(oneof = "event_stacktrace_frames_lock::HasClassName", tags = "2")] + pub has_class_name: + ::core::option::Option, + #[prost(oneof = "event_stacktrace_frames_lock::HasPackageName", tags = "3")] + pub has_package_name: + ::core::option::Option, + #[prost(oneof = "event_stacktrace_frames_lock::HasThreadId", tags = "4")] + pub has_thread_id: + ::core::option::Option, + } + /// Nested message and enum types in `EventStacktraceFramesLock`. + pub mod event_stacktrace_frames_lock { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasAddress { + #[prost(string, tag = "1")] + Address(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasClassName { + #[prost(string, tag = "2")] + ClassName(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasPackageName { + #[prost(string, tag = "3")] + PackageName(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasThreadId { + #[prost(message, tag = "4")] + ThreadId(::prost_types::Value), + } + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasAbsPath { + #[prost(string, tag = "1")] + AbsPath(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasAddrMode { + #[prost(string, tag = "2")] + AddrMode(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasColno { + #[prost(uint64, tag = "3")] + Colno(u64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasContextLine { + #[prost(string, tag = "4")] + ContextLine(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasFilename { + #[prost(string, tag = "5")] + Filename(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasFunction { + #[prost(string, tag = "6")] + Function(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasFunctionId { + #[prost(string, tag = "7")] + FunctionId(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasImageAddr { + #[prost(string, tag = "8")] + ImageAddr(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasInApp { + #[prost(bool, tag = "9")] + InApp(bool), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasInstructionAddr { + #[prost(string, tag = "10")] + InstructionAddr(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasLineno { + #[prost(uint64, tag = "11")] + Lineno(u64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasLock { + #[prost(message, tag = "12")] + Lock(EventStacktraceFramesLock), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasModule { + #[prost(string, tag = "13")] + Module(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasPackage { + #[prost(string, tag = "14")] + Package(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasPlatform { + #[prost(string, tag = "15")] + Platform(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasRawFunction { + #[prost(string, tag = "18")] + RawFunction(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasStackStart { + #[prost(bool, tag = "19")] + StackStart(bool), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasSymbol { + #[prost(string, tag = "20")] + Symbol(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasSymbolAddr { + #[prost(string, tag = "21")] + SymbolAddr(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasVars { + #[prost(message, tag = "22")] + Vars(::prost_types::Value), + } + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasInstructionAddrAdjustment { + #[prost(string, tag = "2")] + InstructionAddrAdjustment(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasLang { + #[prost(string, tag = "3")] + Lang(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasSnapshot { + #[prost(bool, tag = "5")] + Snapshot(bool), + } + } + /// + /// Threads that were active when the event occurred. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct EventThreads { + #[prost(message, repeated, tag = "1")] + pub values: ::prost::alloc::vec::Vec, + } + /// Nested message and enum types in `EventThreads`. + pub mod event_threads { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct EventThreadsValues { + #[prost(map = "string, message", tag = "3")] + pub held_locks: ::std::collections::HashMap< + ::prost::alloc::string::String, + event_threads_values::EventThreadsValuesHeldLocks, + >, + #[prost(oneof = "event_threads_values::HasCrashed", tags = "1")] + pub has_crashed: ::core::option::Option, + #[prost(oneof = "event_threads_values::HasCurrent", tags = "2")] + pub has_current: ::core::option::Option, + #[prost(oneof = "event_threads_values::HasId", tags = "4")] + pub has_id: ::core::option::Option, + #[prost(oneof = "event_threads_values::HasMain", tags = "5")] + pub has_main: ::core::option::Option, + #[prost(oneof = "event_threads_values::HasName", tags = "6")] + pub has_name: ::core::option::Option, + #[prost(oneof = "event_threads_values::HasStacktrace", tags = "7")] + pub has_stacktrace: ::core::option::Option, + #[prost(oneof = "event_threads_values::HasState", tags = "8")] + pub has_state: ::core::option::Option, + } + /// Nested message and enum types in `EventThreadsValues`. + pub mod event_threads_values { + /// + /// Represents a collection of locks (java monitor objects) held by a thread. + /// + /// A map of lock object addresses and their respective lock reason/details. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct EventThreadsValuesHeldLocks { + #[prost(string, tag = "5")] + pub r#type: ::prost::alloc::string::String, + #[prost(oneof = "event_threads_values_held_locks::HasAddress", tags = "1")] + pub has_address: + ::core::option::Option, + #[prost(oneof = "event_threads_values_held_locks::HasClassName", tags = "2")] + pub has_class_name: + ::core::option::Option, + #[prost(oneof = "event_threads_values_held_locks::HasPackageName", tags = "3")] + pub has_package_name: + ::core::option::Option, + #[prost(oneof = "event_threads_values_held_locks::HasThreadId", tags = "4")] + pub has_thread_id: + ::core::option::Option, + } + /// Nested message and enum types in `EventThreadsValuesHeldLocks`. + pub mod event_threads_values_held_locks { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasAddress { + #[prost(string, tag = "1")] + Address(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasClassName { + #[prost(string, tag = "2")] + ClassName(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasPackageName { + #[prost(string, tag = "3")] + PackageName(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasThreadId { + #[prost(message, tag = "4")] + ThreadId(::prost_types::Value), + } + } + /// + /// Stack trace containing frames of this exception. + /// + /// The thread that crashed with an exception should not have a stack trace, but instead, the `thread_id` attribute should be set on the exception and Sentry will connect the two. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct EventThreadsValuesStacktrace { + #[prost(message, repeated, tag = "1")] + pub frames: ::prost::alloc::vec::Vec< + event_threads_values_stacktrace::EventThreadsValuesStacktraceFrames, + >, + #[prost(map = "string, string", tag = "4")] + pub registers: ::std::collections::HashMap< + ::prost::alloc::string::String, + ::prost::alloc::string::String, + >, + #[prost( + oneof = "event_threads_values_stacktrace::HasInstructionAddrAdjustment", + tags = "2" + )] + pub has_instruction_addr_adjustment: ::core::option::Option< + event_threads_values_stacktrace::HasInstructionAddrAdjustment, + >, + #[prost(oneof = "event_threads_values_stacktrace::HasLang", tags = "3")] + pub has_lang: ::core::option::Option, + #[prost(oneof = "event_threads_values_stacktrace::HasSnapshot", tags = "5")] + pub has_snapshot: + ::core::option::Option, + } + /// Nested message and enum types in `EventThreadsValuesStacktrace`. + pub mod event_threads_values_stacktrace { + /// + /// Required. A non-empty list of stack frames. The list is ordered from caller to callee, or + /// oldest to youngest. The last frame is the one creating the exception. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct EventThreadsValuesStacktraceFrames { + #[prost(string, repeated, tag = "16")] + pub post_context: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "17")] + pub pre_context: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost( + oneof = "event_threads_values_stacktrace_frames::HasAbsPath", + tags = "1" + )] + pub has_abs_path: + ::core::option::Option, + #[prost( + oneof = "event_threads_values_stacktrace_frames::HasAddrMode", + tags = "2" + )] + pub has_addr_mode: + ::core::option::Option, + #[prost( + oneof = "event_threads_values_stacktrace_frames::HasColno", + tags = "3" + )] + pub has_colno: + ::core::option::Option, + #[prost( + oneof = "event_threads_values_stacktrace_frames::HasContextLine", + tags = "4" + )] + pub has_context_line: ::core::option::Option< + event_threads_values_stacktrace_frames::HasContextLine, + >, + #[prost( + oneof = "event_threads_values_stacktrace_frames::HasFilename", + tags = "5" + )] + pub has_filename: + ::core::option::Option, + #[prost( + oneof = "event_threads_values_stacktrace_frames::HasFunction", + tags = "6" + )] + pub has_function: + ::core::option::Option, + #[prost( + oneof = "event_threads_values_stacktrace_frames::HasFunctionId", + tags = "7" + )] + pub has_function_id: ::core::option::Option< + event_threads_values_stacktrace_frames::HasFunctionId, + >, + #[prost( + oneof = "event_threads_values_stacktrace_frames::HasImageAddr", + tags = "8" + )] + pub has_image_addr: ::core::option::Option< + event_threads_values_stacktrace_frames::HasImageAddr, + >, + #[prost( + oneof = "event_threads_values_stacktrace_frames::HasInApp", + tags = "9" + )] + pub has_in_app: + ::core::option::Option, + #[prost( + oneof = "event_threads_values_stacktrace_frames::HasInstructionAddr", + tags = "10" + )] + pub has_instruction_addr: ::core::option::Option< + event_threads_values_stacktrace_frames::HasInstructionAddr, + >, + #[prost( + oneof = "event_threads_values_stacktrace_frames::HasLineno", + tags = "11" + )] + pub has_lineno: + ::core::option::Option, + #[prost( + oneof = "event_threads_values_stacktrace_frames::HasLock", + tags = "12" + )] + pub has_lock: + ::core::option::Option, + #[prost( + oneof = "event_threads_values_stacktrace_frames::HasModule", + tags = "13" + )] + pub has_module: + ::core::option::Option, + #[prost( + oneof = "event_threads_values_stacktrace_frames::HasPackage", + tags = "14" + )] + pub has_package: + ::core::option::Option, + #[prost( + oneof = "event_threads_values_stacktrace_frames::HasPlatform", + tags = "15" + )] + pub has_platform: + ::core::option::Option, + #[prost( + oneof = "event_threads_values_stacktrace_frames::HasRawFunction", + tags = "18" + )] + pub has_raw_function: ::core::option::Option< + event_threads_values_stacktrace_frames::HasRawFunction, + >, + #[prost( + oneof = "event_threads_values_stacktrace_frames::HasStackStart", + tags = "19" + )] + pub has_stack_start: ::core::option::Option< + event_threads_values_stacktrace_frames::HasStackStart, + >, + #[prost( + oneof = "event_threads_values_stacktrace_frames::HasSymbol", + tags = "20" + )] + pub has_symbol: + ::core::option::Option, + #[prost( + oneof = "event_threads_values_stacktrace_frames::HasSymbolAddr", + tags = "21" + )] + pub has_symbol_addr: ::core::option::Option< + event_threads_values_stacktrace_frames::HasSymbolAddr, + >, + #[prost( + oneof = "event_threads_values_stacktrace_frames::HasVars", + tags = "22" + )] + pub has_vars: + ::core::option::Option, + } + /// Nested message and enum types in `EventThreadsValuesStacktraceFrames`. + pub mod event_threads_values_stacktrace_frames { + /// + /// A possible lock (java monitor object) held by this frame. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct EventThreadsValuesStacktraceFramesLock { + #[prost(string, tag = "5")] + pub r#type: ::prost::alloc::string::String, + #[prost( + oneof = "event_threads_values_stacktrace_frames_lock::HasAddress", + tags = "1" + )] + pub has_address: ::core::option::Option< + event_threads_values_stacktrace_frames_lock::HasAddress, + >, + #[prost( + oneof = "event_threads_values_stacktrace_frames_lock::HasClassName", + tags = "2" + )] + pub has_class_name: ::core::option::Option< + event_threads_values_stacktrace_frames_lock::HasClassName, + >, + #[prost( + oneof = "event_threads_values_stacktrace_frames_lock::HasPackageName", + tags = "3" + )] + pub has_package_name: ::core::option::Option< + event_threads_values_stacktrace_frames_lock::HasPackageName, + >, + #[prost( + oneof = "event_threads_values_stacktrace_frames_lock::HasThreadId", + tags = "4" + )] + pub has_thread_id: ::core::option::Option< + event_threads_values_stacktrace_frames_lock::HasThreadId, + >, + } + /// Nested message and enum types in `EventThreadsValuesStacktraceFramesLock`. + pub mod event_threads_values_stacktrace_frames_lock { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasAddress { + #[prost(string, tag = "1")] + Address(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasClassName { + #[prost(string, tag = "2")] + ClassName(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasPackageName { + #[prost(string, tag = "3")] + PackageName(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasThreadId { + #[prost(message, tag = "4")] + ThreadId(::prost_types::Value), + } + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasAbsPath { + #[prost(string, tag = "1")] + AbsPath(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasAddrMode { + #[prost(string, tag = "2")] + AddrMode(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasColno { + #[prost(uint64, tag = "3")] + Colno(u64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasContextLine { + #[prost(string, tag = "4")] + ContextLine(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasFilename { + #[prost(string, tag = "5")] + Filename(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasFunction { + #[prost(string, tag = "6")] + Function(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasFunctionId { + #[prost(string, tag = "7")] + FunctionId(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasImageAddr { + #[prost(string, tag = "8")] + ImageAddr(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasInApp { + #[prost(bool, tag = "9")] + InApp(bool), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasInstructionAddr { + #[prost(string, tag = "10")] + InstructionAddr(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasLineno { + #[prost(uint64, tag = "11")] + Lineno(u64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasLock { + #[prost(message, tag = "12")] + Lock(EventThreadsValuesStacktraceFramesLock), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasModule { + #[prost(string, tag = "13")] + Module(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasPackage { + #[prost(string, tag = "14")] + Package(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasPlatform { + #[prost(string, tag = "15")] + Platform(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasRawFunction { + #[prost(string, tag = "18")] + RawFunction(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasStackStart { + #[prost(bool, tag = "19")] + StackStart(bool), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasSymbol { + #[prost(string, tag = "20")] + Symbol(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasSymbolAddr { + #[prost(string, tag = "21")] + SymbolAddr(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasVars { + #[prost(message, tag = "22")] + Vars(::prost_types::Value), + } + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasInstructionAddrAdjustment { + #[prost(string, tag = "2")] + InstructionAddrAdjustment(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasLang { + #[prost(string, tag = "3")] + Lang(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasSnapshot { + #[prost(bool, tag = "5")] + Snapshot(bool), + } + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasCrashed { + #[prost(bool, tag = "1")] + Crashed(bool), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasCurrent { + #[prost(bool, tag = "2")] + Current(bool), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasId { + #[prost(message, tag = "4")] + Id(::prost_types::Value), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasMain { + #[prost(bool, tag = "5")] + Main(bool), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasName { + #[prost(string, tag = "6")] + Name(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasStacktrace { + #[prost(message, tag = "7")] + Stacktrace(EventThreadsValuesStacktrace), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasState { + #[prost(string, tag = "8")] + State(::prost::alloc::string::String), + } + } + } + /// + /// Additional information about the name of the transaction. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct EventTransactionInfo { + #[prost(message, repeated, tag = "1")] + pub changes: ::prost::alloc::vec::Vec, + #[prost(oneof = "event_transaction_info::HasOriginal", tags = "2")] + pub has_original: ::core::option::Option, + #[prost(oneof = "event_transaction_info::HasPropagations", tags = "3")] + pub has_propagations: ::core::option::Option, + #[prost(oneof = "event_transaction_info::HasSource", tags = "4")] + pub has_source: ::core::option::Option, + } + /// Nested message and enum types in `EventTransactionInfo`. + pub mod event_transaction_info { + /// + /// A list of changes prior to the final transaction name. + /// + /// This list must be empty if the transaction name is set at the beginning of the transaction + /// and never changed. There is no placeholder entry for the initial transaction name. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct EventTransactionInfoChanges { + #[prost(oneof = "event_transaction_info_changes::HasPropagations", tags = "1")] + pub has_propagations: + ::core::option::Option, + #[prost(oneof = "event_transaction_info_changes::HasSource", tags = "2")] + pub has_source: ::core::option::Option, + #[prost(oneof = "event_transaction_info_changes::HasTimestamp", tags = "3")] + pub has_timestamp: ::core::option::Option, + } + /// Nested message and enum types in `EventTransactionInfoChanges`. + pub mod event_transaction_info_changes { + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasPropagations { + #[prost(uint64, tag = "1")] + Propagations(u64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasSource { + #[prost(string, tag = "2")] + Source(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasTimestamp { + #[prost(message, tag = "3")] + Timestamp(::prost_types::Value), + } + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasOriginal { + #[prost(string, tag = "2")] + Original(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasPropagations { + #[prost(uint64, tag = "3")] + Propagations(u64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasSource { + #[prost(string, tag = "4")] + Source(::prost::alloc::string::String), + } + } + /// + /// Information about the user who triggered this event. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct EventUser { + #[prost(oneof = "event_user::HasData", tags = "1")] + pub has_data: ::core::option::Option, + #[prost(oneof = "event_user::HasEmail", tags = "2")] + pub has_email: ::core::option::Option, + #[prost(oneof = "event_user::HasGeo", tags = "3")] + pub has_geo: ::core::option::Option, + #[prost(oneof = "event_user::HasId", tags = "4")] + pub has_id: ::core::option::Option, + #[prost(oneof = "event_user::HasIpAddress", tags = "5")] + pub has_ip_address: ::core::option::Option, + #[prost(oneof = "event_user::HasName", tags = "6")] + pub has_name: ::core::option::Option, + #[prost(oneof = "event_user::HasSegment", tags = "7")] + pub has_segment: ::core::option::Option, + #[prost(oneof = "event_user::HasSentryUser", tags = "8")] + pub has_sentry_user: ::core::option::Option, + #[prost(oneof = "event_user::HasUsername", tags = "9")] + pub has_username: ::core::option::Option, + } + /// Nested message and enum types in `EventUser`. + pub mod event_user { + /// + /// Approximate geographical location of the end user or device. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct EventUserGeo { + #[prost(oneof = "event_user_geo::HasCity", tags = "1")] + pub has_city: ::core::option::Option, + #[prost(oneof = "event_user_geo::HasCountryCode", tags = "2")] + pub has_country_code: ::core::option::Option, + #[prost(oneof = "event_user_geo::HasRegion", tags = "3")] + pub has_region: ::core::option::Option, + #[prost(oneof = "event_user_geo::HasSubdivision", tags = "4")] + pub has_subdivision: ::core::option::Option, + } + /// Nested message and enum types in `EventUserGeo`. + pub mod event_user_geo { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasCity { + #[prost(string, tag = "1")] + City(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasCountryCode { + #[prost(string, tag = "2")] + CountryCode(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasRegion { + #[prost(string, tag = "3")] + Region(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasSubdivision { + #[prost(string, tag = "4")] + Subdivision(::prost::alloc::string::String), + } + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasData { + #[prost(message, tag = "1")] + Data(::prost_types::Value), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasEmail { + #[prost(string, tag = "2")] + Email(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasGeo { + #[prost(message, tag = "3")] + Geo(EventUserGeo), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasId { + #[prost(string, tag = "4")] + Id(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasIpAddress { + #[prost(string, tag = "5")] + IpAddress(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasName { + #[prost(string, tag = "6")] + Name(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasSegment { + #[prost(string, tag = "7")] + Segment(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasSentryUser { + #[prost(string, tag = "8")] + SentryUser(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasUsername { + #[prost(string, tag = "9")] + Username(::prost::alloc::string::String), + } + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasBreadcrumbs { + #[prost(message, tag = "1")] + Breadcrumbs(EventBreadcrumbs), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasCulprit { + #[prost(string, tag = "3")] + Culprit(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasDebugMeta { + #[prost(message, tag = "4")] + DebugMeta(EventDebugMeta), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasDist { + #[prost(string, tag = "5")] + Dist(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasEnvironment { + #[prost(string, tag = "6")] + Environment(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasEventId { + #[prost(string, tag = "8")] + EventId(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasException { + #[prost(message, tag = "9")] + Exception(EventException), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasExtra { + #[prost(message, tag = "10")] + Extra(::prost_types::Value), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasLevel { + #[prost(string, tag = "12")] + Level(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasLogentry { + #[prost(message, tag = "13")] + Logentry(EventLogentry), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasLogger { + #[prost(string, tag = "14")] + Logger(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasPlatform { + #[prost(string, tag = "16")] + Platform(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasReceived { + #[prost(message, tag = "17")] + Received(::prost_types::Value), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasRelease { + #[prost(string, tag = "18")] + Release(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasRequest { + #[prost(message, tag = "19")] + Request(EventRequest), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasSdk { + #[prost(message, tag = "20")] + Sdk(EventSdk), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasServerName { + #[prost(string, tag = "21")] + ServerName(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasStacktrace { + #[prost(message, tag = "22")] + Stacktrace(EventStacktrace), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasTags { + #[prost(message, tag = "23")] + Tags(::prost_types::Value), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasThreads { + #[prost(message, tag = "24")] + Threads(EventThreads), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasTimeSpent { + #[prost(uint64, tag = "25")] + TimeSpent(u64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasTimestamp { + #[prost(message, tag = "26")] + Timestamp(::prost_types::Value), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasTransaction { + #[prost(string, tag = "27")] + Transaction(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasTransactionInfo { + #[prost(message, tag = "28")] + TransactionInfo(EventTransactionInfo), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasType { + #[prost(string, tag = "29")] + Type(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasUser { + #[prost(message, tag = "30")] + User(EventUser), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasVersion { + #[prost(string, tag = "31")] + Version(::prost::alloc::string::String), + } +} +/// +/// Application information. +/// +/// App context describes the application. As opposed to the runtime, this is the actual +/// application that was running and carries metadata about the current session. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Appcontext { + #[prost(string, repeated, tag = "10")] + pub view_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(oneof = "appcontext::HasAppBuild", tags = "1")] + pub has_app_build: ::core::option::Option, + #[prost(oneof = "appcontext::HasAppIdentifier", tags = "2")] + pub has_app_identifier: ::core::option::Option, + #[prost(oneof = "appcontext::HasAppMemory", tags = "3")] + pub has_app_memory: ::core::option::Option, + #[prost(oneof = "appcontext::HasAppName", tags = "4")] + pub has_app_name: ::core::option::Option, + #[prost(oneof = "appcontext::HasAppStartTime", tags = "5")] + pub has_app_start_time: ::core::option::Option, + #[prost(oneof = "appcontext::HasAppVersion", tags = "6")] + pub has_app_version: ::core::option::Option, + #[prost(oneof = "appcontext::HasBuildType", tags = "7")] + pub has_build_type: ::core::option::Option, + #[prost(oneof = "appcontext::HasDeviceAppHash", tags = "8")] + pub has_device_app_hash: ::core::option::Option, + #[prost(oneof = "appcontext::HasInForeground", tags = "9")] + pub has_in_foreground: ::core::option::Option, +} +/// Nested message and enum types in `Appcontext`. +pub mod appcontext { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasAppBuild { + #[prost(string, tag = "1")] + AppBuild(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasAppIdentifier { + #[prost(string, tag = "2")] + AppIdentifier(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasAppMemory { + #[prost(uint64, tag = "3")] + AppMemory(u64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasAppName { + #[prost(string, tag = "4")] + AppName(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasAppStartTime { + #[prost(string, tag = "5")] + AppStartTime(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasAppVersion { + #[prost(string, tag = "6")] + AppVersion(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasBuildType { + #[prost(string, tag = "7")] + BuildType(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasDeviceAppHash { + #[prost(string, tag = "8")] + DeviceAppHash(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasInForeground { + #[prost(bool, tag = "9")] + InForeground(bool), + } +} +/// +/// Legacy apple debug images (MachO). +/// +/// This was also used for non-apple platforms with similar debug setups. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Appledebugimage { + #[prost(string, tag = "4")] + pub image_addr: ::prost::alloc::string::String, + #[prost(uint64, tag = "5")] + pub image_size: u64, + #[prost(string, tag = "7")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag = "8")] + pub uuid: ::prost::alloc::string::String, + #[prost(oneof = "appledebugimage::HasArch", tags = "1")] + pub has_arch: ::core::option::Option, + #[prost(oneof = "appledebugimage::HasCpuSubtype", tags = "2")] + pub has_cpu_subtype: ::core::option::Option, + #[prost(oneof = "appledebugimage::HasCpuType", tags = "3")] + pub has_cpu_type: ::core::option::Option, + #[prost(oneof = "appledebugimage::HasImageVmaddr", tags = "6")] + pub has_image_vmaddr: ::core::option::Option, +} +/// Nested message and enum types in `Appledebugimage`. +pub mod appledebugimage { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasArch { + #[prost(string, tag = "1")] + Arch(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasCpuSubtype { + #[prost(uint64, tag = "2")] + CpuSubtype(u64), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasCpuType { + #[prost(uint64, tag = "3")] + CpuType(u64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasImageVmaddr { + #[prost(string, tag = "6")] + ImageVmaddr(::prost::alloc::string::String), + } +} +/// +/// The Breadcrumbs Interface specifies a series of application events, or "breadcrumbs", that +/// occurred before an event. +/// +/// An event may contain one or more breadcrumbs in an attribute named `breadcrumbs`. The entries +/// are ordered from oldest to newest. Consequently, the last entry in the list should be the last +/// entry before the event occurred. +/// +/// While breadcrumb attributes are not strictly validated in Sentry, a breadcrumb is most useful +/// when it includes at least a `timestamp` and `type`, `category` or `message`. The rendering of +/// breadcrumbs in Sentry depends on what is provided. +/// +/// The following example illustrates the breadcrumbs part of the event payload and omits other +/// attributes for simplicity. +/// +/// ```json +/// { +/// "breadcrumbs": { +/// "values": [ +/// { +/// "timestamp": "2016-04-20T20:55:53.845Z", +/// "message": "Something happened", +/// "category": "log", +/// "data": { +/// "foo": "bar", +/// "blub": "blah" +/// } +/// }, +/// { +/// "timestamp": "2016-04-20T20:55:53.847Z", +/// "type": "navigation", +/// "data": { +/// "from": "/login", +/// "to": "/dashboard" +/// } +/// } +/// ] +/// } +/// } +/// ``` +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Breadcrumb { + #[prost(oneof = "breadcrumb::HasCategory", tags = "1")] + pub has_category: ::core::option::Option, + #[prost(oneof = "breadcrumb::HasData", tags = "2")] + pub has_data: ::core::option::Option, + #[prost(oneof = "breadcrumb::HasEventId", tags = "3")] + pub has_event_id: ::core::option::Option, + #[prost(oneof = "breadcrumb::HasLevel", tags = "4")] + pub has_level: ::core::option::Option, + #[prost(oneof = "breadcrumb::HasMessage", tags = "5")] + pub has_message: ::core::option::Option, + #[prost(oneof = "breadcrumb::HasTimestamp", tags = "6")] + pub has_timestamp: ::core::option::Option, + #[prost(oneof = "breadcrumb::HasType", tags = "7")] + pub has_type: ::core::option::Option, +} +/// Nested message and enum types in `Breadcrumb`. +pub mod breadcrumb { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasCategory { + #[prost(string, tag = "1")] + Category(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasData { + #[prost(message, tag = "2")] + Data(::prost_types::Value), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasEventId { + #[prost(string, tag = "3")] + EventId(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasLevel { + #[prost(string, tag = "4")] + Level(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasMessage { + #[prost(string, tag = "5")] + Message(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasTimestamp { + #[prost(message, tag = "6")] + Timestamp(::prost_types::Value), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasType { + #[prost(string, tag = "7")] + Type(::prost::alloc::string::String), + } +} +/// +/// Web browser information. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Browsercontext { + #[prost(oneof = "browsercontext::HasName", tags = "1")] + pub has_name: ::core::option::Option, + #[prost(oneof = "browsercontext::HasVersion", tags = "2")] + pub has_version: ::core::option::Option, +} +/// Nested message and enum types in `Browsercontext`. +pub mod browsercontext { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasName { + #[prost(string, tag = "1")] + Name(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasVersion { + #[prost(string, tag = "2")] + Version(::prost::alloc::string::String), + } +} +/// +/// POSIX signal with optional extended data. +/// +/// Error codes set by Linux system calls and some library functions as specified in ISO C99, +/// POSIX.1-2001, and POSIX.1-2008. See +/// [`errno(3)`]() for more information. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Cerror { + #[prost(oneof = "cerror::HasName", tags = "1")] + pub has_name: ::core::option::Option, + #[prost(oneof = "cerror::HasNumber", tags = "2")] + pub has_number: ::core::option::Option, +} +/// Nested message and enum types in `Cerror`. +pub mod cerror { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasName { + #[prost(string, tag = "1")] + Name(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasNumber { + #[prost(int64, tag = "2")] + Number(i64), + } +} +/// +/// The SDK Interface describes the Sentry SDK and its configuration used to capture and transmit an event. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Clientsdkinfo { + #[prost(string, repeated, tag = "1")] + pub integrations: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, tag = "2")] + pub name: ::prost::alloc::string::String, + #[prost(message, repeated, tag = "3")] + pub packages: ::prost::alloc::vec::Vec, + #[prost(string, tag = "4")] + pub version: ::prost::alloc::string::String, +} +/// Nested message and enum types in `Clientsdkinfo`. +pub mod clientsdkinfo { + /// + /// List of installed and loaded SDK packages. _Optional._ + /// + /// A list of packages that were installed as part of this SDK or the activated integrations. + /// Each package consists of a name in the format `source:identifier` and `version`. If the + /// source is a Git repository, the `source` should be `git`, the identifier should be a + /// checkout link and the version should be a Git reference (branch, tag or SHA). + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct ClientsdkinfoPackages { + #[prost(oneof = "clientsdkinfo_packages::HasName", tags = "1")] + pub has_name: ::core::option::Option, + #[prost(oneof = "clientsdkinfo_packages::HasVersion", tags = "2")] + pub has_version: ::core::option::Option, + } + /// Nested message and enum types in `ClientsdkinfoPackages`. + pub mod clientsdkinfo_packages { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasName { + #[prost(string, tag = "1")] + Name(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasVersion { + #[prost(string, tag = "2")] + Version(::prost::alloc::string::String), + } + } +} +/// +/// An installed and loaded package as part of the Sentry SDK. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Clientsdkpackage { + #[prost(oneof = "clientsdkpackage::HasName", tags = "1")] + pub has_name: ::core::option::Option, + #[prost(oneof = "clientsdkpackage::HasVersion", tags = "2")] + pub has_version: ::core::option::Option, +} +/// Nested message and enum types in `Clientsdkpackage`. +pub mod clientsdkpackage { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasName { + #[prost(string, tag = "1")] + Name(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasVersion { + #[prost(string, tag = "2")] + Version(::prost::alloc::string::String), + } +} +/// +/// The arbitrary data on the trace. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Data { + #[prost(oneof = "data::HasPreviousRoute", tags = "1")] + pub has_previous_route: ::core::option::Option, + #[prost(oneof = "data::HasRoute", tags = "2")] + pub has_route: ::core::option::Option, +} +/// Nested message and enum types in `Data`. +pub mod data { + /// + /// The previous route in the application + /// + /// Set by React Native SDK. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct DataPreviousroute { + #[prost(oneof = "data_previousroute::HasName", tags = "1")] + pub has_name: ::core::option::Option, + #[prost(oneof = "data_previousroute::HasParams", tags = "2")] + pub has_params: ::core::option::Option, + } + /// Nested message and enum types in `DataPreviousroute`. + pub mod data_previousroute { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasName { + #[prost(string, tag = "1")] + Name(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasParams { + #[prost(message, tag = "2")] + Params(::prost_types::Value), + } + } + /// + /// The current route in the application. + /// + /// Set by React Native SDK. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct DataRoute { + #[prost(oneof = "data_route::HasName", tags = "1")] + pub has_name: ::core::option::Option, + #[prost(oneof = "data_route::HasParams", tags = "2")] + pub has_params: ::core::option::Option, + } + /// Nested message and enum types in `DataRoute`. + pub mod data_route { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasName { + #[prost(string, tag = "1")] + Name(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasParams { + #[prost(message, tag = "2")] + Params(::prost_types::Value), + } + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasPreviousRoute { + #[prost(message, tag = "1")] + PreviousRoute(DataPreviousroute), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasRoute { + #[prost(message, tag = "2")] + Route(DataRoute), + } +} +/// +/// Debugging and processing meta information. +/// +/// The debug meta interface carries debug information for processing errors and crash reports. +/// Sentry amends the information in this interface. +/// +/// Example (look at field types to see more detail): +/// +/// ```json +/// { +/// "debug_meta": { +/// "images": \[\], +/// "sdk_info": { +/// "sdk_name": "iOS", +/// "version_major": 10, +/// "version_minor": 3, +/// "version_patchlevel": 0 +/// } +/// } +/// } +/// ``` +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Debugmeta { + #[prost(message, repeated, tag = "1")] + pub images: ::prost::alloc::vec::Vec<::prost_types::Value>, + #[prost(oneof = "debugmeta::HasSdkInfo", tags = "2")] + pub has_sdk_info: ::core::option::Option, +} +/// Nested message and enum types in `Debugmeta`. +pub mod debugmeta { + /// + /// Information about the system SDK (e.g. iOS SDK). + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct DebugmetaSdkInfo { + #[prost(oneof = "debugmeta_sdk_info::HasSdkName", tags = "1")] + pub has_sdk_name: ::core::option::Option, + #[prost(oneof = "debugmeta_sdk_info::HasVersionMajor", tags = "2")] + pub has_version_major: ::core::option::Option, + #[prost(oneof = "debugmeta_sdk_info::HasVersionMinor", tags = "3")] + pub has_version_minor: ::core::option::Option, + #[prost(oneof = "debugmeta_sdk_info::HasVersionPatchlevel", tags = "4")] + pub has_version_patchlevel: + ::core::option::Option, + } + /// Nested message and enum types in `DebugmetaSdkInfo`. + pub mod debugmeta_sdk_info { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasSdkName { + #[prost(string, tag = "1")] + SdkName(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasVersionMajor { + #[prost(uint64, tag = "2")] + VersionMajor(u64), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasVersionMinor { + #[prost(uint64, tag = "3")] + VersionMinor(u64), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasVersionPatchlevel { + #[prost(uint64, tag = "4")] + VersionPatchlevel(u64), + } + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasSdkInfo { + #[prost(message, tag = "2")] + SdkInfo(DebugmetaSdkInfo), + } +} +/// +/// Device information. +/// +/// Device context describes the device that caused the event. This is most appropriate for mobile +/// applications. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Devicecontext { + #[prost(oneof = "devicecontext::HasArch", tags = "1")] + pub has_arch: ::core::option::Option, + #[prost(oneof = "devicecontext::HasBatteryLevel", tags = "2")] + pub has_battery_level: ::core::option::Option, + #[prost(oneof = "devicecontext::HasBatteryStatus", tags = "3")] + pub has_battery_status: ::core::option::Option, + #[prost(oneof = "devicecontext::HasBootTime", tags = "4")] + pub has_boot_time: ::core::option::Option, + #[prost(oneof = "devicecontext::HasBrand", tags = "5")] + pub has_brand: ::core::option::Option, + #[prost(oneof = "devicecontext::HasCharging", tags = "6")] + pub has_charging: ::core::option::Option, + #[prost(oneof = "devicecontext::HasCpuDescription", tags = "7")] + pub has_cpu_description: ::core::option::Option, + #[prost(oneof = "devicecontext::HasDeviceType", tags = "8")] + pub has_device_type: ::core::option::Option, + #[prost(oneof = "devicecontext::HasDeviceUniqueIdentifier", tags = "9")] + pub has_device_unique_identifier: + ::core::option::Option, + #[prost(oneof = "devicecontext::HasExternalFreeStorage", tags = "10")] + pub has_external_free_storage: ::core::option::Option, + #[prost(oneof = "devicecontext::HasExternalStorageSize", tags = "11")] + pub has_external_storage_size: ::core::option::Option, + #[prost(oneof = "devicecontext::HasFamily", tags = "12")] + pub has_family: ::core::option::Option, + #[prost(oneof = "devicecontext::HasFreeMemory", tags = "13")] + pub has_free_memory: ::core::option::Option, + #[prost(oneof = "devicecontext::HasFreeStorage", tags = "14")] + pub has_free_storage: ::core::option::Option, + #[prost(oneof = "devicecontext::HasLocale", tags = "15")] + pub has_locale: ::core::option::Option, + #[prost(oneof = "devicecontext::HasLowMemory", tags = "16")] + pub has_low_memory: ::core::option::Option, + #[prost(oneof = "devicecontext::HasManufacturer", tags = "17")] + pub has_manufacturer: ::core::option::Option, + #[prost(oneof = "devicecontext::HasMemorySize", tags = "18")] + pub has_memory_size: ::core::option::Option, + #[prost(oneof = "devicecontext::HasModel", tags = "19")] + pub has_model: ::core::option::Option, + #[prost(oneof = "devicecontext::HasModelId", tags = "20")] + pub has_model_id: ::core::option::Option, + #[prost(oneof = "devicecontext::HasName", tags = "21")] + pub has_name: ::core::option::Option, + #[prost(oneof = "devicecontext::HasOnline", tags = "22")] + pub has_online: ::core::option::Option, + #[prost(oneof = "devicecontext::HasOrientation", tags = "23")] + pub has_orientation: ::core::option::Option, + #[prost(oneof = "devicecontext::HasProcessorCount", tags = "24")] + pub has_processor_count: ::core::option::Option, + #[prost(oneof = "devicecontext::HasProcessorFrequency", tags = "25")] + pub has_processor_frequency: ::core::option::Option, + #[prost(oneof = "devicecontext::HasScreenDensity", tags = "26")] + pub has_screen_density: ::core::option::Option, + #[prost(oneof = "devicecontext::HasScreenDpi", tags = "27")] + pub has_screen_dpi: ::core::option::Option, + #[prost(oneof = "devicecontext::HasScreenHeightPixels", tags = "28")] + pub has_screen_height_pixels: ::core::option::Option, + #[prost(oneof = "devicecontext::HasScreenResolution", tags = "29")] + pub has_screen_resolution: ::core::option::Option, + #[prost(oneof = "devicecontext::HasScreenWidthPixels", tags = "30")] + pub has_screen_width_pixels: ::core::option::Option, + #[prost(oneof = "devicecontext::HasSimulator", tags = "31")] + pub has_simulator: ::core::option::Option, + #[prost(oneof = "devicecontext::HasStorageSize", tags = "32")] + pub has_storage_size: ::core::option::Option, + #[prost(oneof = "devicecontext::HasSupportsAccelerometer", tags = "33")] + pub has_supports_accelerometer: ::core::option::Option, + #[prost(oneof = "devicecontext::HasSupportsAudio", tags = "34")] + pub has_supports_audio: ::core::option::Option, + #[prost(oneof = "devicecontext::HasSupportsGyroscope", tags = "35")] + pub has_supports_gyroscope: ::core::option::Option, + #[prost(oneof = "devicecontext::HasSupportsLocationService", tags = "36")] + pub has_supports_location_service: + ::core::option::Option, + #[prost(oneof = "devicecontext::HasSupportsVibration", tags = "37")] + pub has_supports_vibration: ::core::option::Option, + #[prost(oneof = "devicecontext::HasTimezone", tags = "38")] + pub has_timezone: ::core::option::Option, + #[prost(oneof = "devicecontext::HasUsableMemory", tags = "39")] + pub has_usable_memory: ::core::option::Option, + #[prost(oneof = "devicecontext::HasUuid", tags = "40")] + pub has_uuid: ::core::option::Option, +} +/// Nested message and enum types in `Devicecontext`. +pub mod devicecontext { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasArch { + #[prost(string, tag = "1")] + Arch(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasBatteryLevel { + #[prost(double, tag = "2")] + BatteryLevel(f64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasBatteryStatus { + #[prost(string, tag = "3")] + BatteryStatus(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasBootTime { + #[prost(string, tag = "4")] + BootTime(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasBrand { + #[prost(string, tag = "5")] + Brand(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasCharging { + #[prost(bool, tag = "6")] + Charging(bool), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasCpuDescription { + #[prost(string, tag = "7")] + CpuDescription(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasDeviceType { + #[prost(string, tag = "8")] + DeviceType(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasDeviceUniqueIdentifier { + #[prost(string, tag = "9")] + DeviceUniqueIdentifier(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasExternalFreeStorage { + #[prost(uint64, tag = "10")] + ExternalFreeStorage(u64), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasExternalStorageSize { + #[prost(uint64, tag = "11")] + ExternalStorageSize(u64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasFamily { + #[prost(string, tag = "12")] + Family(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasFreeMemory { + #[prost(uint64, tag = "13")] + FreeMemory(u64), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasFreeStorage { + #[prost(uint64, tag = "14")] + FreeStorage(u64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasLocale { + #[prost(string, tag = "15")] + Locale(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasLowMemory { + #[prost(bool, tag = "16")] + LowMemory(bool), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasManufacturer { + #[prost(string, tag = "17")] + Manufacturer(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasMemorySize { + #[prost(uint64, tag = "18")] + MemorySize(u64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasModel { + #[prost(string, tag = "19")] + Model(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasModelId { + #[prost(string, tag = "20")] + ModelId(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasName { + #[prost(string, tag = "21")] + Name(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasOnline { + #[prost(bool, tag = "22")] + Online(bool), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasOrientation { + #[prost(string, tag = "23")] + Orientation(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasProcessorCount { + #[prost(uint64, tag = "24")] + ProcessorCount(u64), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasProcessorFrequency { + #[prost(uint64, tag = "25")] + ProcessorFrequency(u64), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasScreenDensity { + #[prost(double, tag = "26")] + ScreenDensity(f64), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasScreenDpi { + #[prost(uint64, tag = "27")] + ScreenDpi(u64), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasScreenHeightPixels { + #[prost(uint64, tag = "28")] + ScreenHeightPixels(u64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasScreenResolution { + #[prost(string, tag = "29")] + ScreenResolution(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasScreenWidthPixels { + #[prost(uint64, tag = "30")] + ScreenWidthPixels(u64), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasSimulator { + #[prost(bool, tag = "31")] + Simulator(bool), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasStorageSize { + #[prost(uint64, tag = "32")] + StorageSize(u64), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasSupportsAccelerometer { + #[prost(bool, tag = "33")] + SupportsAccelerometer(bool), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasSupportsAudio { + #[prost(bool, tag = "34")] + SupportsAudio(bool), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasSupportsGyroscope { + #[prost(bool, tag = "35")] + SupportsGyroscope(bool), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasSupportsLocationService { + #[prost(bool, tag = "36")] + SupportsLocationService(bool), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasSupportsVibration { + #[prost(bool, tag = "37")] + SupportsVibration(bool), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasTimezone { + #[prost(string, tag = "38")] + Timezone(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasUsableMemory { + #[prost(uint64, tag = "39")] + UsableMemory(u64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasUuid { + #[prost(string, tag = "40")] + Uuid(::prost::alloc::string::String), + } +} +/// +/// An event processing error. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Eventprocessingerror { + #[prost(string, tag = "2")] + pub r#type: ::prost::alloc::string::String, + #[prost(message, optional, tag = "3")] + pub value: ::core::option::Option<::prost_types::Value>, + #[prost(oneof = "eventprocessingerror::HasName", tags = "1")] + pub has_name: ::core::option::Option, +} +/// Nested message and enum types in `Eventprocessingerror`. +pub mod eventprocessingerror { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasName { + #[prost(string, tag = "1")] + Name(::prost::alloc::string::String), + } +} +/// +/// A single exception. +/// +/// Multiple values inside of an [event](#typedef-Event) represent chained exceptions and should be sorted oldest to newest. For example, consider this Python code snippet: +/// +/// ```python +/// try: +/// raise Exception("random boring invariant was not met!") +/// except Exception as e: +/// raise ValueError("something went wrong, help!") from e +/// ``` +/// +/// `Exception` would be described first in the values list, followed by a description of `ValueError`: +/// +/// ```json +/// { +/// "exception": { +/// "values": [ +/// {"type": "Exception": "value": "random boring invariant was not met!"}, +/// {"type": "ValueError", "value": "something went wrong, help!"}, +/// ] +/// } +/// } +/// ``` +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Exception { + #[prost(oneof = "exception::HasMechanism", tags = "1")] + pub has_mechanism: ::core::option::Option, + #[prost(oneof = "exception::HasModule", tags = "2")] + pub has_module: ::core::option::Option, + #[prost(oneof = "exception::HasStacktrace", tags = "3")] + pub has_stacktrace: ::core::option::Option, + #[prost(oneof = "exception::HasThreadId", tags = "4")] + pub has_thread_id: ::core::option::Option, + #[prost(oneof = "exception::HasType", tags = "5")] + pub has_type: ::core::option::Option, + #[prost(oneof = "exception::HasValue", tags = "6")] + pub has_value: ::core::option::Option, +} +/// Nested message and enum types in `Exception`. +pub mod exception { + /// + /// Mechanism by which this exception was generated and handled. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct ExceptionMechanism { + #[prost(string, tag = "11")] + pub r#type: ::prost::alloc::string::String, + #[prost(oneof = "exception_mechanism::HasData", tags = "1")] + pub has_data: ::core::option::Option, + #[prost(oneof = "exception_mechanism::HasDescription", tags = "2")] + pub has_description: ::core::option::Option, + #[prost(oneof = "exception_mechanism::HasExceptionId", tags = "3")] + pub has_exception_id: ::core::option::Option, + #[prost(oneof = "exception_mechanism::HasHandled", tags = "4")] + pub has_handled: ::core::option::Option, + #[prost(oneof = "exception_mechanism::HasHelpLink", tags = "5")] + pub has_help_link: ::core::option::Option, + #[prost(oneof = "exception_mechanism::HasIsExceptionGroup", tags = "6")] + pub has_is_exception_group: + ::core::option::Option, + #[prost(oneof = "exception_mechanism::HasMeta", tags = "7")] + pub has_meta: ::core::option::Option, + #[prost(oneof = "exception_mechanism::HasParentId", tags = "8")] + pub has_parent_id: ::core::option::Option, + #[prost(oneof = "exception_mechanism::HasSource", tags = "9")] + pub has_source: ::core::option::Option, + #[prost(oneof = "exception_mechanism::HasSynthetic", tags = "10")] + pub has_synthetic: ::core::option::Option, + } + /// Nested message and enum types in `ExceptionMechanism`. + pub mod exception_mechanism { + /// + /// Operating system or runtime meta information. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct ExceptionMechanismMeta { + #[prost(oneof = "exception_mechanism_meta::HasErrno", tags = "1")] + pub has_errno: ::core::option::Option, + #[prost(oneof = "exception_mechanism_meta::HasMachException", tags = "2")] + pub has_mach_exception: + ::core::option::Option, + #[prost(oneof = "exception_mechanism_meta::HasNsError", tags = "3")] + pub has_ns_error: ::core::option::Option, + #[prost(oneof = "exception_mechanism_meta::HasSignal", tags = "4")] + pub has_signal: ::core::option::Option, + } + /// Nested message and enum types in `ExceptionMechanismMeta`. + pub mod exception_mechanism_meta { + /// + /// Optional ISO C standard error code. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct ExceptionMechanismMetaErrno { + #[prost(oneof = "exception_mechanism_meta_errno::HasName", tags = "1")] + pub has_name: ::core::option::Option, + #[prost(oneof = "exception_mechanism_meta_errno::HasNumber", tags = "2")] + pub has_number: ::core::option::Option, + } + /// Nested message and enum types in `ExceptionMechanismMetaErrno`. + pub mod exception_mechanism_meta_errno { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasName { + #[prost(string, tag = "1")] + Name(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasNumber { + #[prost(int64, tag = "2")] + Number(i64), + } + } + /// + /// A Mach Exception on Apple systems comprising a code triple and optional descriptions. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct ExceptionMechanismMetaMachException { + #[prost(oneof = "exception_mechanism_meta_mach_exception::HasCode", tags = "1")] + pub has_code: + ::core::option::Option, + #[prost( + oneof = "exception_mechanism_meta_mach_exception::HasException", + tags = "2" + )] + pub has_exception: + ::core::option::Option, + #[prost(oneof = "exception_mechanism_meta_mach_exception::HasName", tags = "3")] + pub has_name: + ::core::option::Option, + #[prost( + oneof = "exception_mechanism_meta_mach_exception::HasSubcode", + tags = "4" + )] + pub has_subcode: + ::core::option::Option, + } + /// Nested message and enum types in `ExceptionMechanismMetaMachException`. + pub mod exception_mechanism_meta_mach_exception { + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasCode { + #[prost(uint64, tag = "1")] + Code(u64), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasException { + #[prost(int64, tag = "2")] + Exception(i64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasName { + #[prost(string, tag = "3")] + Name(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasSubcode { + #[prost(uint64, tag = "4")] + Subcode(u64), + } + } + /// + /// An NSError on Apple systems comprising code and signal. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct ExceptionMechanismMetaNsError { + #[prost(oneof = "exception_mechanism_meta_ns_error::HasCode", tags = "1")] + pub has_code: ::core::option::Option, + #[prost(oneof = "exception_mechanism_meta_ns_error::HasDomain", tags = "2")] + pub has_domain: + ::core::option::Option, + } + /// Nested message and enum types in `ExceptionMechanismMetaNsError`. + pub mod exception_mechanism_meta_ns_error { + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasCode { + #[prost(int64, tag = "1")] + Code(i64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasDomain { + #[prost(string, tag = "2")] + Domain(::prost::alloc::string::String), + } + } + /// + /// Information on the POSIX signal. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct ExceptionMechanismMetaSignal { + #[prost(oneof = "exception_mechanism_meta_signal::HasCode", tags = "1")] + pub has_code: ::core::option::Option, + #[prost(oneof = "exception_mechanism_meta_signal::HasCodeName", tags = "2")] + pub has_code_name: + ::core::option::Option, + #[prost(oneof = "exception_mechanism_meta_signal::HasName", tags = "3")] + pub has_name: ::core::option::Option, + #[prost(oneof = "exception_mechanism_meta_signal::HasNumber", tags = "4")] + pub has_number: ::core::option::Option, + } + /// Nested message and enum types in `ExceptionMechanismMetaSignal`. + pub mod exception_mechanism_meta_signal { + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasCode { + #[prost(int64, tag = "1")] + Code(i64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasCodeName { + #[prost(string, tag = "2")] + CodeName(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasName { + #[prost(string, tag = "3")] + Name(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasNumber { + #[prost(int64, tag = "4")] + Number(i64), + } + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasErrno { + #[prost(message, tag = "1")] + Errno(ExceptionMechanismMetaErrno), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasMachException { + #[prost(message, tag = "2")] + MachException(ExceptionMechanismMetaMachException), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasNsError { + #[prost(message, tag = "3")] + NsError(ExceptionMechanismMetaNsError), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasSignal { + #[prost(message, tag = "4")] + Signal(ExceptionMechanismMetaSignal), + } + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasData { + #[prost(message, tag = "1")] + Data(::prost_types::Value), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasDescription { + #[prost(string, tag = "2")] + Description(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasExceptionId { + #[prost(uint64, tag = "3")] + ExceptionId(u64), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasHandled { + #[prost(bool, tag = "4")] + Handled(bool), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasHelpLink { + #[prost(string, tag = "5")] + HelpLink(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasIsExceptionGroup { + #[prost(bool, tag = "6")] + IsExceptionGroup(bool), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasMeta { + #[prost(message, tag = "7")] + Meta(ExceptionMechanismMeta), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasParentId { + #[prost(uint64, tag = "8")] + ParentId(u64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasSource { + #[prost(string, tag = "9")] + Source(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasSynthetic { + #[prost(bool, tag = "10")] + Synthetic(bool), + } + } + /// + /// Stack trace containing frames of this exception. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct ExceptionStacktrace { + #[prost(message, repeated, tag = "1")] + pub frames: ::prost::alloc::vec::Vec, + #[prost(map = "string, string", tag = "4")] + pub registers: ::std::collections::HashMap< + ::prost::alloc::string::String, + ::prost::alloc::string::String, + >, + #[prost( + oneof = "exception_stacktrace::HasInstructionAddrAdjustment", + tags = "2" + )] + pub has_instruction_addr_adjustment: + ::core::option::Option, + #[prost(oneof = "exception_stacktrace::HasLang", tags = "3")] + pub has_lang: ::core::option::Option, + #[prost(oneof = "exception_stacktrace::HasSnapshot", tags = "5")] + pub has_snapshot: ::core::option::Option, + } + /// Nested message and enum types in `ExceptionStacktrace`. + pub mod exception_stacktrace { + /// + /// Required. A non-empty list of stack frames. The list is ordered from caller to callee, or + /// oldest to youngest. The last frame is the one creating the exception. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct ExceptionStacktraceFrames { + #[prost(string, repeated, tag = "16")] + pub post_context: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "17")] + pub pre_context: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(oneof = "exception_stacktrace_frames::HasAbsPath", tags = "1")] + pub has_abs_path: ::core::option::Option, + #[prost(oneof = "exception_stacktrace_frames::HasAddrMode", tags = "2")] + pub has_addr_mode: ::core::option::Option, + #[prost(oneof = "exception_stacktrace_frames::HasColno", tags = "3")] + pub has_colno: ::core::option::Option, + #[prost(oneof = "exception_stacktrace_frames::HasContextLine", tags = "4")] + pub has_context_line: + ::core::option::Option, + #[prost(oneof = "exception_stacktrace_frames::HasFilename", tags = "5")] + pub has_filename: ::core::option::Option, + #[prost(oneof = "exception_stacktrace_frames::HasFunction", tags = "6")] + pub has_function: ::core::option::Option, + #[prost(oneof = "exception_stacktrace_frames::HasFunctionId", tags = "7")] + pub has_function_id: ::core::option::Option, + #[prost(oneof = "exception_stacktrace_frames::HasImageAddr", tags = "8")] + pub has_image_addr: ::core::option::Option, + #[prost(oneof = "exception_stacktrace_frames::HasInApp", tags = "9")] + pub has_in_app: ::core::option::Option, + #[prost(oneof = "exception_stacktrace_frames::HasInstructionAddr", tags = "10")] + pub has_instruction_addr: + ::core::option::Option, + #[prost(oneof = "exception_stacktrace_frames::HasLineno", tags = "11")] + pub has_lineno: ::core::option::Option, + #[prost(oneof = "exception_stacktrace_frames::HasLock", tags = "12")] + pub has_lock: ::core::option::Option, + #[prost(oneof = "exception_stacktrace_frames::HasModule", tags = "13")] + pub has_module: ::core::option::Option, + #[prost(oneof = "exception_stacktrace_frames::HasPackage", tags = "14")] + pub has_package: ::core::option::Option, + #[prost(oneof = "exception_stacktrace_frames::HasPlatform", tags = "15")] + pub has_platform: ::core::option::Option, + #[prost(oneof = "exception_stacktrace_frames::HasRawFunction", tags = "18")] + pub has_raw_function: + ::core::option::Option, + #[prost(oneof = "exception_stacktrace_frames::HasStackStart", tags = "19")] + pub has_stack_start: ::core::option::Option, + #[prost(oneof = "exception_stacktrace_frames::HasSymbol", tags = "20")] + pub has_symbol: ::core::option::Option, + #[prost(oneof = "exception_stacktrace_frames::HasSymbolAddr", tags = "21")] + pub has_symbol_addr: ::core::option::Option, + #[prost(oneof = "exception_stacktrace_frames::HasVars", tags = "22")] + pub has_vars: ::core::option::Option, + } + /// Nested message and enum types in `ExceptionStacktraceFrames`. + pub mod exception_stacktrace_frames { + /// + /// A possible lock (java monitor object) held by this frame. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct ExceptionStacktraceFramesLock { + #[prost(string, tag = "5")] + pub r#type: ::prost::alloc::string::String, + #[prost(oneof = "exception_stacktrace_frames_lock::HasAddress", tags = "1")] + pub has_address: + ::core::option::Option, + #[prost(oneof = "exception_stacktrace_frames_lock::HasClassName", tags = "2")] + pub has_class_name: + ::core::option::Option, + #[prost(oneof = "exception_stacktrace_frames_lock::HasPackageName", tags = "3")] + pub has_package_name: + ::core::option::Option, + #[prost(oneof = "exception_stacktrace_frames_lock::HasThreadId", tags = "4")] + pub has_thread_id: + ::core::option::Option, + } + /// Nested message and enum types in `ExceptionStacktraceFramesLock`. + pub mod exception_stacktrace_frames_lock { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasAddress { + #[prost(string, tag = "1")] + Address(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasClassName { + #[prost(string, tag = "2")] + ClassName(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasPackageName { + #[prost(string, tag = "3")] + PackageName(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasThreadId { + #[prost(message, tag = "4")] + ThreadId(::prost_types::Value), + } + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasAbsPath { + #[prost(string, tag = "1")] + AbsPath(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasAddrMode { + #[prost(string, tag = "2")] + AddrMode(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasColno { + #[prost(uint64, tag = "3")] + Colno(u64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasContextLine { + #[prost(string, tag = "4")] + ContextLine(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasFilename { + #[prost(string, tag = "5")] + Filename(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasFunction { + #[prost(string, tag = "6")] + Function(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasFunctionId { + #[prost(string, tag = "7")] + FunctionId(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasImageAddr { + #[prost(string, tag = "8")] + ImageAddr(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasInApp { + #[prost(bool, tag = "9")] + InApp(bool), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasInstructionAddr { + #[prost(string, tag = "10")] + InstructionAddr(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasLineno { + #[prost(uint64, tag = "11")] + Lineno(u64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasLock { + #[prost(message, tag = "12")] + Lock(ExceptionStacktraceFramesLock), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasModule { + #[prost(string, tag = "13")] + Module(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasPackage { + #[prost(string, tag = "14")] + Package(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasPlatform { + #[prost(string, tag = "15")] + Platform(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasRawFunction { + #[prost(string, tag = "18")] + RawFunction(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasStackStart { + #[prost(bool, tag = "19")] + StackStart(bool), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasSymbol { + #[prost(string, tag = "20")] + Symbol(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasSymbolAddr { + #[prost(string, tag = "21")] + SymbolAddr(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasVars { + #[prost(message, tag = "22")] + Vars(::prost_types::Value), + } + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasInstructionAddrAdjustment { + #[prost(string, tag = "2")] + InstructionAddrAdjustment(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasLang { + #[prost(string, tag = "3")] + Lang(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasSnapshot { + #[prost(bool, tag = "5")] + Snapshot(bool), + } + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasMechanism { + #[prost(message, tag = "1")] + Mechanism(ExceptionMechanism), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasModule { + #[prost(string, tag = "2")] + Module(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasStacktrace { + #[prost(message, tag = "3")] + Stacktrace(ExceptionStacktrace), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasThreadId { + #[prost(message, tag = "4")] + ThreadId(::prost_types::Value), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasType { + #[prost(string, tag = "5")] + Type(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasValue { + #[prost(string, tag = "6")] + Value(::prost::alloc::string::String), + } +} +/// +/// Holds information about a single stacktrace frame. +/// +/// Each object should contain **at least** a `filename`, `function` or `instruction_addr` +/// attribute. All values are optional, but recommended. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Frame { + #[prost(string, repeated, tag = "16")] + pub post_context: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "17")] + pub pre_context: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(oneof = "frame::HasAbsPath", tags = "1")] + pub has_abs_path: ::core::option::Option, + #[prost(oneof = "frame::HasAddrMode", tags = "2")] + pub has_addr_mode: ::core::option::Option, + #[prost(oneof = "frame::HasColno", tags = "3")] + pub has_colno: ::core::option::Option, + #[prost(oneof = "frame::HasContextLine", tags = "4")] + pub has_context_line: ::core::option::Option, + #[prost(oneof = "frame::HasFilename", tags = "5")] + pub has_filename: ::core::option::Option, + #[prost(oneof = "frame::HasFunction", tags = "6")] + pub has_function: ::core::option::Option, + #[prost(oneof = "frame::HasFunctionId", tags = "7")] + pub has_function_id: ::core::option::Option, + #[prost(oneof = "frame::HasImageAddr", tags = "8")] + pub has_image_addr: ::core::option::Option, + #[prost(oneof = "frame::HasInApp", tags = "9")] + pub has_in_app: ::core::option::Option, + #[prost(oneof = "frame::HasInstructionAddr", tags = "10")] + pub has_instruction_addr: ::core::option::Option, + #[prost(oneof = "frame::HasLineno", tags = "11")] + pub has_lineno: ::core::option::Option, + #[prost(oneof = "frame::HasLock", tags = "12")] + pub has_lock: ::core::option::Option, + #[prost(oneof = "frame::HasModule", tags = "13")] + pub has_module: ::core::option::Option, + #[prost(oneof = "frame::HasPackage", tags = "14")] + pub has_package: ::core::option::Option, + #[prost(oneof = "frame::HasPlatform", tags = "15")] + pub has_platform: ::core::option::Option, + #[prost(oneof = "frame::HasRawFunction", tags = "18")] + pub has_raw_function: ::core::option::Option, + #[prost(oneof = "frame::HasStackStart", tags = "19")] + pub has_stack_start: ::core::option::Option, + #[prost(oneof = "frame::HasSymbol", tags = "20")] + pub has_symbol: ::core::option::Option, + #[prost(oneof = "frame::HasSymbolAddr", tags = "21")] + pub has_symbol_addr: ::core::option::Option, + #[prost(oneof = "frame::HasVars", tags = "22")] + pub has_vars: ::core::option::Option, +} +/// Nested message and enum types in `Frame`. +pub mod frame { + /// + /// A possible lock (java monitor object) held by this frame. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct FrameLock { + #[prost(string, tag = "5")] + pub r#type: ::prost::alloc::string::String, + #[prost(oneof = "frame_lock::HasAddress", tags = "1")] + pub has_address: ::core::option::Option, + #[prost(oneof = "frame_lock::HasClassName", tags = "2")] + pub has_class_name: ::core::option::Option, + #[prost(oneof = "frame_lock::HasPackageName", tags = "3")] + pub has_package_name: ::core::option::Option, + #[prost(oneof = "frame_lock::HasThreadId", tags = "4")] + pub has_thread_id: ::core::option::Option, + } + /// Nested message and enum types in `FrameLock`. + pub mod frame_lock { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasAddress { + #[prost(string, tag = "1")] + Address(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasClassName { + #[prost(string, tag = "2")] + ClassName(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasPackageName { + #[prost(string, tag = "3")] + PackageName(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasThreadId { + #[prost(message, tag = "4")] + ThreadId(::prost_types::Value), + } + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasAbsPath { + #[prost(string, tag = "1")] + AbsPath(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasAddrMode { + #[prost(string, tag = "2")] + AddrMode(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasColno { + #[prost(uint64, tag = "3")] + Colno(u64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasContextLine { + #[prost(string, tag = "4")] + ContextLine(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasFilename { + #[prost(string, tag = "5")] + Filename(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasFunction { + #[prost(string, tag = "6")] + Function(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasFunctionId { + #[prost(string, tag = "7")] + FunctionId(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasImageAddr { + #[prost(string, tag = "8")] + ImageAddr(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasInApp { + #[prost(bool, tag = "9")] + InApp(bool), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasInstructionAddr { + #[prost(string, tag = "10")] + InstructionAddr(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasLineno { + #[prost(uint64, tag = "11")] + Lineno(u64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasLock { + #[prost(message, tag = "12")] + Lock(FrameLock), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasModule { + #[prost(string, tag = "13")] + Module(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasPackage { + #[prost(string, tag = "14")] + Package(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasPlatform { + #[prost(string, tag = "15")] + Platform(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasRawFunction { + #[prost(string, tag = "18")] + RawFunction(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasStackStart { + #[prost(bool, tag = "19")] + StackStart(bool), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasSymbol { + #[prost(string, tag = "20")] + Symbol(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasSymbolAddr { + #[prost(string, tag = "21")] + SymbolAddr(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasVars { + #[prost(message, tag = "22")] + Vars(::prost_types::Value), + } +} +/// +/// Geographical location of the end user or device. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Geo { + #[prost(oneof = "geo::HasCity", tags = "1")] + pub has_city: ::core::option::Option, + #[prost(oneof = "geo::HasCountryCode", tags = "2")] + pub has_country_code: ::core::option::Option, + #[prost(oneof = "geo::HasRegion", tags = "3")] + pub has_region: ::core::option::Option, + #[prost(oneof = "geo::HasSubdivision", tags = "4")] + pub has_subdivision: ::core::option::Option, +} +/// Nested message and enum types in `Geo`. +pub mod geo { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasCity { + #[prost(string, tag = "1")] + City(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasCountryCode { + #[prost(string, tag = "2")] + CountryCode(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasRegion { + #[prost(string, tag = "3")] + Region(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasSubdivision { + #[prost(string, tag = "4")] + Subdivision(::prost::alloc::string::String), + } +} +/// +/// GPU information. +/// +/// Example: +/// +/// ```json +/// "gpu": { +/// "name": "AMD Radeon Pro 560", +/// "vendor_name": "Apple", +/// "memory_size": 4096, +/// "api_type": "Metal", +/// "multi_threaded_rendering": true, +/// "version": "Metal", +/// "npot_support": "Full" +/// } +/// ``` +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Gpucontext { + #[prost(message, optional, tag = "3")] + pub id: ::core::option::Option<::prost_types::Value>, + #[prost(oneof = "gpucontext::HasApiType", tags = "1")] + pub has_api_type: ::core::option::Option, + #[prost(oneof = "gpucontext::HasGraphicsShaderLevel", tags = "2")] + pub has_graphics_shader_level: ::core::option::Option, + #[prost(oneof = "gpucontext::HasMaxTextureSize", tags = "4")] + pub has_max_texture_size: ::core::option::Option, + #[prost(oneof = "gpucontext::HasMemorySize", tags = "5")] + pub has_memory_size: ::core::option::Option, + #[prost(oneof = "gpucontext::HasMultiThreadedRendering", tags = "6")] + pub has_multi_threaded_rendering: ::core::option::Option, + #[prost(oneof = "gpucontext::HasName", tags = "7")] + pub has_name: ::core::option::Option, + #[prost(oneof = "gpucontext::HasNpotSupport", tags = "8")] + pub has_npot_support: ::core::option::Option, + #[prost(oneof = "gpucontext::HasSupportsComputeShaders", tags = "9")] + pub has_supports_compute_shaders: ::core::option::Option, + #[prost(oneof = "gpucontext::HasSupportsDrawCallInstancing", tags = "10")] + pub has_supports_draw_call_instancing: + ::core::option::Option, + #[prost(oneof = "gpucontext::HasSupportsGeometryShaders", tags = "11")] + pub has_supports_geometry_shaders: + ::core::option::Option, + #[prost(oneof = "gpucontext::HasSupportsRayTracing", tags = "12")] + pub has_supports_ray_tracing: ::core::option::Option, + #[prost(oneof = "gpucontext::HasVendorId", tags = "13")] + pub has_vendor_id: ::core::option::Option, + #[prost(oneof = "gpucontext::HasVendorName", tags = "14")] + pub has_vendor_name: ::core::option::Option, + #[prost(oneof = "gpucontext::HasVersion", tags = "15")] + pub has_version: ::core::option::Option, +} +/// Nested message and enum types in `Gpucontext`. +pub mod gpucontext { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasApiType { + #[prost(string, tag = "1")] + ApiType(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasGraphicsShaderLevel { + #[prost(string, tag = "2")] + GraphicsShaderLevel(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasMaxTextureSize { + #[prost(uint64, tag = "4")] + MaxTextureSize(u64), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasMemorySize { + #[prost(uint64, tag = "5")] + MemorySize(u64), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasMultiThreadedRendering { + #[prost(bool, tag = "6")] + MultiThreadedRendering(bool), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasName { + #[prost(string, tag = "7")] + Name(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasNpotSupport { + #[prost(string, tag = "8")] + NpotSupport(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasSupportsComputeShaders { + #[prost(bool, tag = "9")] + SupportsComputeShaders(bool), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasSupportsDrawCallInstancing { + #[prost(bool, tag = "10")] + SupportsDrawCallInstancing(bool), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasSupportsGeometryShaders { + #[prost(bool, tag = "11")] + SupportsGeometryShaders(bool), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasSupportsRayTracing { + #[prost(bool, tag = "12")] + SupportsRayTracing(bool), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasVendorId { + #[prost(string, tag = "13")] + VendorId(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasVendorName { + #[prost(string, tag = "14")] + VendorName(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasVersion { + #[prost(string, tag = "15")] + Version(::prost::alloc::string::String), + } +} +/// +/// A debug image consisting of source files for a JVM based language. +/// +/// Examples: +/// +/// ```json +/// { +/// "type": "jvm", +/// "debug_id": "395835f4-03e0-4436-80d3-136f0749a893" +/// } +/// ``` +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Jvmdebugimage { + #[prost(string, tag = "1")] + pub debug_id: ::prost::alloc::string::String, +} +/// +/// Represents an instance of a held lock (java monitor object) in a thread. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Lockreason { + #[prost(string, tag = "5")] + pub r#type: ::prost::alloc::string::String, + #[prost(oneof = "lockreason::HasAddress", tags = "1")] + pub has_address: ::core::option::Option, + #[prost(oneof = "lockreason::HasClassName", tags = "2")] + pub has_class_name: ::core::option::Option, + #[prost(oneof = "lockreason::HasPackageName", tags = "3")] + pub has_package_name: ::core::option::Option, + #[prost(oneof = "lockreason::HasThreadId", tags = "4")] + pub has_thread_id: ::core::option::Option, +} +/// Nested message and enum types in `Lockreason`. +pub mod lockreason { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasAddress { + #[prost(string, tag = "1")] + Address(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasClassName { + #[prost(string, tag = "2")] + ClassName(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasPackageName { + #[prost(string, tag = "3")] + PackageName(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasThreadId { + #[prost(message, tag = "4")] + ThreadId(::prost_types::Value), + } +} +/// +/// A log entry message. +/// +/// A log message is similar to the `message` attribute on the event itself but +/// can additionally hold optional parameters. +/// +/// ```json +/// { +/// "message": { +/// "message": "My raw message with interpreted strings like %s", +/// "params": \["this"\] +/// } +/// } +/// ``` +/// +/// ```json +/// { +/// "message": { +/// "message": "My raw message with interpreted strings like {foo}", +/// "params": {"foo": "this"} +/// } +/// } +/// ``` +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Logentry { + #[prost(message, optional, tag = "3")] + pub params: ::core::option::Option<::prost_types::Value>, + #[prost(oneof = "logentry::HasFormatted", tags = "1")] + pub has_formatted: ::core::option::Option, + #[prost(oneof = "logentry::HasMessage", tags = "2")] + pub has_message: ::core::option::Option, +} +/// Nested message and enum types in `Logentry`. +pub mod logentry { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasFormatted { + #[prost(string, tag = "1")] + Formatted(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasMessage { + #[prost(string, tag = "2")] + Message(::prost::alloc::string::String), + } +} +/// +/// Mach exception information. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Machexception { + #[prost(oneof = "machexception::HasCode", tags = "1")] + pub has_code: ::core::option::Option, + #[prost(oneof = "machexception::HasException", tags = "2")] + pub has_exception: ::core::option::Option, + #[prost(oneof = "machexception::HasName", tags = "3")] + pub has_name: ::core::option::Option, + #[prost(oneof = "machexception::HasSubcode", tags = "4")] + pub has_subcode: ::core::option::Option, +} +/// Nested message and enum types in `Machexception`. +pub mod machexception { + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasCode { + #[prost(uint64, tag = "1")] + Code(u64), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasException { + #[prost(int64, tag = "2")] + Exception(i64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasName { + #[prost(string, tag = "3")] + Name(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasSubcode { + #[prost(uint64, tag = "4")] + Subcode(u64), + } +} +/// +/// The mechanism by which an exception was generated and handled. +/// +/// The exception mechanism is an optional field residing in the [exception](#typedef-Exception). +/// It carries additional information about the way the exception was created on the target system. +/// This includes general exception values obtained from the operating system or runtime APIs, as +/// well as mechanism-specific values. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Mechanism { + #[prost(string, tag = "11")] + pub r#type: ::prost::alloc::string::String, + #[prost(oneof = "mechanism::HasData", tags = "1")] + pub has_data: ::core::option::Option, + #[prost(oneof = "mechanism::HasDescription", tags = "2")] + pub has_description: ::core::option::Option, + #[prost(oneof = "mechanism::HasExceptionId", tags = "3")] + pub has_exception_id: ::core::option::Option, + #[prost(oneof = "mechanism::HasHandled", tags = "4")] + pub has_handled: ::core::option::Option, + #[prost(oneof = "mechanism::HasHelpLink", tags = "5")] + pub has_help_link: ::core::option::Option, + #[prost(oneof = "mechanism::HasIsExceptionGroup", tags = "6")] + pub has_is_exception_group: ::core::option::Option, + #[prost(oneof = "mechanism::HasMeta", tags = "7")] + pub has_meta: ::core::option::Option, + #[prost(oneof = "mechanism::HasParentId", tags = "8")] + pub has_parent_id: ::core::option::Option, + #[prost(oneof = "mechanism::HasSource", tags = "9")] + pub has_source: ::core::option::Option, + #[prost(oneof = "mechanism::HasSynthetic", tags = "10")] + pub has_synthetic: ::core::option::Option, +} +/// Nested message and enum types in `Mechanism`. +pub mod mechanism { + /// + /// Operating system or runtime meta information. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct MechanismMeta { + #[prost(oneof = "mechanism_meta::HasErrno", tags = "1")] + pub has_errno: ::core::option::Option, + #[prost(oneof = "mechanism_meta::HasMachException", tags = "2")] + pub has_mach_exception: ::core::option::Option, + #[prost(oneof = "mechanism_meta::HasNsError", tags = "3")] + pub has_ns_error: ::core::option::Option, + #[prost(oneof = "mechanism_meta::HasSignal", tags = "4")] + pub has_signal: ::core::option::Option, + } + /// Nested message and enum types in `MechanismMeta`. + pub mod mechanism_meta { + /// + /// Optional ISO C standard error code. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct MechanismMetaErrno { + #[prost(oneof = "mechanism_meta_errno::HasName", tags = "1")] + pub has_name: ::core::option::Option, + #[prost(oneof = "mechanism_meta_errno::HasNumber", tags = "2")] + pub has_number: ::core::option::Option, + } + /// Nested message and enum types in `MechanismMetaErrno`. + pub mod mechanism_meta_errno { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasName { + #[prost(string, tag = "1")] + Name(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasNumber { + #[prost(int64, tag = "2")] + Number(i64), + } + } + /// + /// A Mach Exception on Apple systems comprising a code triple and optional descriptions. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct MechanismMetaMachException { + #[prost(oneof = "mechanism_meta_mach_exception::HasCode", tags = "1")] + pub has_code: ::core::option::Option, + #[prost(oneof = "mechanism_meta_mach_exception::HasException", tags = "2")] + pub has_exception: ::core::option::Option, + #[prost(oneof = "mechanism_meta_mach_exception::HasName", tags = "3")] + pub has_name: ::core::option::Option, + #[prost(oneof = "mechanism_meta_mach_exception::HasSubcode", tags = "4")] + pub has_subcode: ::core::option::Option, + } + /// Nested message and enum types in `MechanismMetaMachException`. + pub mod mechanism_meta_mach_exception { + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasCode { + #[prost(uint64, tag = "1")] + Code(u64), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasException { + #[prost(int64, tag = "2")] + Exception(i64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasName { + #[prost(string, tag = "3")] + Name(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasSubcode { + #[prost(uint64, tag = "4")] + Subcode(u64), + } + } + /// + /// An NSError on Apple systems comprising code and signal. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct MechanismMetaNsError { + #[prost(oneof = "mechanism_meta_ns_error::HasCode", tags = "1")] + pub has_code: ::core::option::Option, + #[prost(oneof = "mechanism_meta_ns_error::HasDomain", tags = "2")] + pub has_domain: ::core::option::Option, + } + /// Nested message and enum types in `MechanismMetaNsError`. + pub mod mechanism_meta_ns_error { + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasCode { + #[prost(int64, tag = "1")] + Code(i64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasDomain { + #[prost(string, tag = "2")] + Domain(::prost::alloc::string::String), + } + } + /// + /// Information on the POSIX signal. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct MechanismMetaSignal { + #[prost(oneof = "mechanism_meta_signal::HasCode", tags = "1")] + pub has_code: ::core::option::Option, + #[prost(oneof = "mechanism_meta_signal::HasCodeName", tags = "2")] + pub has_code_name: ::core::option::Option, + #[prost(oneof = "mechanism_meta_signal::HasName", tags = "3")] + pub has_name: ::core::option::Option, + #[prost(oneof = "mechanism_meta_signal::HasNumber", tags = "4")] + pub has_number: ::core::option::Option, + } + /// Nested message and enum types in `MechanismMetaSignal`. + pub mod mechanism_meta_signal { + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasCode { + #[prost(int64, tag = "1")] + Code(i64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasCodeName { + #[prost(string, tag = "2")] + CodeName(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasName { + #[prost(string, tag = "3")] + Name(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasNumber { + #[prost(int64, tag = "4")] + Number(i64), + } + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasErrno { + #[prost(message, tag = "1")] + Errno(MechanismMetaErrno), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasMachException { + #[prost(message, tag = "2")] + MachException(MechanismMetaMachException), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasNsError { + #[prost(message, tag = "3")] + NsError(MechanismMetaNsError), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasSignal { + #[prost(message, tag = "4")] + Signal(MechanismMetaSignal), + } + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasData { + #[prost(message, tag = "1")] + Data(::prost_types::Value), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasDescription { + #[prost(string, tag = "2")] + Description(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasExceptionId { + #[prost(uint64, tag = "3")] + ExceptionId(u64), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasHandled { + #[prost(bool, tag = "4")] + Handled(bool), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasHelpLink { + #[prost(string, tag = "5")] + HelpLink(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasIsExceptionGroup { + #[prost(bool, tag = "6")] + IsExceptionGroup(bool), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasMeta { + #[prost(message, tag = "7")] + Meta(MechanismMeta), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasParentId { + #[prost(uint64, tag = "8")] + ParentId(u64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasSource { + #[prost(string, tag = "9")] + Source(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasSynthetic { + #[prost(bool, tag = "10")] + Synthetic(bool), + } +} +/// +/// Operating system or runtime meta information to an exception mechanism. +/// +/// The mechanism metadata usually carries error codes reported by the runtime or operating system, +/// along with a platform-dependent interpretation of these codes. SDKs can safely omit code names +/// and descriptions for well-known error codes, as it will be filled out by Sentry. For +/// proprietary or vendor-specific error codes, adding these values will give additional +/// information to the user. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Mechanismmeta { + #[prost(oneof = "mechanismmeta::HasErrno", tags = "1")] + pub has_errno: ::core::option::Option, + #[prost(oneof = "mechanismmeta::HasMachException", tags = "2")] + pub has_mach_exception: ::core::option::Option, + #[prost(oneof = "mechanismmeta::HasNsError", tags = "3")] + pub has_ns_error: ::core::option::Option, + #[prost(oneof = "mechanismmeta::HasSignal", tags = "4")] + pub has_signal: ::core::option::Option, +} +/// Nested message and enum types in `Mechanismmeta`. +pub mod mechanismmeta { + /// + /// Optional ISO C standard error code. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct MechanismmetaErrno { + #[prost(oneof = "mechanismmeta_errno::HasName", tags = "1")] + pub has_name: ::core::option::Option, + #[prost(oneof = "mechanismmeta_errno::HasNumber", tags = "2")] + pub has_number: ::core::option::Option, + } + /// Nested message and enum types in `MechanismmetaErrno`. + pub mod mechanismmeta_errno { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasName { + #[prost(string, tag = "1")] + Name(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasNumber { + #[prost(int64, tag = "2")] + Number(i64), + } + } + /// + /// A Mach Exception on Apple systems comprising a code triple and optional descriptions. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct MechanismmetaMachException { + #[prost(oneof = "mechanismmeta_mach_exception::HasCode", tags = "1")] + pub has_code: ::core::option::Option, + #[prost(oneof = "mechanismmeta_mach_exception::HasException", tags = "2")] + pub has_exception: ::core::option::Option, + #[prost(oneof = "mechanismmeta_mach_exception::HasName", tags = "3")] + pub has_name: ::core::option::Option, + #[prost(oneof = "mechanismmeta_mach_exception::HasSubcode", tags = "4")] + pub has_subcode: ::core::option::Option, + } + /// Nested message and enum types in `MechanismmetaMachException`. + pub mod mechanismmeta_mach_exception { + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasCode { + #[prost(uint64, tag = "1")] + Code(u64), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasException { + #[prost(int64, tag = "2")] + Exception(i64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasName { + #[prost(string, tag = "3")] + Name(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasSubcode { + #[prost(uint64, tag = "4")] + Subcode(u64), + } + } + /// + /// An NSError on Apple systems comprising code and signal. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct MechanismmetaNsError { + #[prost(oneof = "mechanismmeta_ns_error::HasCode", tags = "1")] + pub has_code: ::core::option::Option, + #[prost(oneof = "mechanismmeta_ns_error::HasDomain", tags = "2")] + pub has_domain: ::core::option::Option, + } + /// Nested message and enum types in `MechanismmetaNsError`. + pub mod mechanismmeta_ns_error { + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasCode { + #[prost(int64, tag = "1")] + Code(i64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasDomain { + #[prost(string, tag = "2")] + Domain(::prost::alloc::string::String), + } + } + /// + /// Information on the POSIX signal. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct MechanismmetaSignal { + #[prost(oneof = "mechanismmeta_signal::HasCode", tags = "1")] + pub has_code: ::core::option::Option, + #[prost(oneof = "mechanismmeta_signal::HasCodeName", tags = "2")] + pub has_code_name: ::core::option::Option, + #[prost(oneof = "mechanismmeta_signal::HasName", tags = "3")] + pub has_name: ::core::option::Option, + #[prost(oneof = "mechanismmeta_signal::HasNumber", tags = "4")] + pub has_number: ::core::option::Option, + } + /// Nested message and enum types in `MechanismmetaSignal`. + pub mod mechanismmeta_signal { + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasCode { + #[prost(int64, tag = "1")] + Code(i64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasCodeName { + #[prost(string, tag = "2")] + CodeName(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasName { + #[prost(string, tag = "3")] + Name(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasNumber { + #[prost(int64, tag = "4")] + Number(i64), + } + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasErrno { + #[prost(message, tag = "1")] + Errno(MechanismmetaErrno), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasMachException { + #[prost(message, tag = "2")] + MachException(MechanismmetaMachException), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasNsError { + #[prost(message, tag = "3")] + NsError(MechanismmetaNsError), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasSignal { + #[prost(message, tag = "4")] + Signal(MechanismmetaSignal), + } +} +/// +/// A generic (new-style) native platform debug information file. +/// +/// The `type` key must be one of: +/// +/// - `macho` +/// - `elf`: ELF images are used on Linux platforms. Their structure is identical to other native images. +/// - `pe` +/// +/// Examples: +/// +/// ```json +/// { +/// "type": "elf", +/// "code_id": "68220ae2c65d65c1b6aaa12fa6765a6ec2f5f434", +/// "code_file": "/lib/x86_64-linux-gnu/libgcc_s.so.1", +/// "debug_id": "e20a2268-5dc6-c165-b6aa-a12fa6765a6e", +/// "image_addr": "0x7f5140527000", +/// "image_size": 90112, +/// "image_vmaddr": "0x40000", +/// "arch": "x86_64" +/// } +/// ``` +/// +/// ```json +/// { +/// "type": "pe", +/// "code_id": "57898e12145000", +/// "code_file": "C:\\Windows\\System32\\dbghelp.dll", +/// "debug_id": "9c2a902b-6fdf-40ad-8308-588a41d572a0-1", +/// "debug_file": "dbghelp.pdb", +/// "image_addr": "0x70850000", +/// "image_size": "1331200", +/// "image_vmaddr": "0x40000", +/// "arch": "x86" +/// } +/// ``` +/// +/// ```json +/// { +/// "type": "macho", +/// "debug_id": "84a04d24-0e60-3810-a8c0-90a65e2df61a", +/// "debug_file": "libDiagnosticMessagesClient.dylib", +/// "code_file": "/usr/lib/libDiagnosticMessagesClient.dylib", +/// "image_addr": "0x7fffe668e000", +/// "image_size": 8192, +/// "image_vmaddr": "0x40000", +/// "arch": "x86_64", +/// } +/// ``` +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Nativedebugimage { + #[prost(string, tag = "2")] + pub code_file: ::prost::alloc::string::String, + #[prost(string, tag = "6")] + pub debug_id: ::prost::alloc::string::String, + #[prost(oneof = "nativedebugimage::HasArch", tags = "1")] + pub has_arch: ::core::option::Option, + #[prost(oneof = "nativedebugimage::HasCodeId", tags = "3")] + pub has_code_id: ::core::option::Option, + #[prost(oneof = "nativedebugimage::HasDebugChecksum", tags = "4")] + pub has_debug_checksum: ::core::option::Option, + #[prost(oneof = "nativedebugimage::HasDebugFile", tags = "5")] + pub has_debug_file: ::core::option::Option, + #[prost(oneof = "nativedebugimage::HasImageAddr", tags = "7")] + pub has_image_addr: ::core::option::Option, + #[prost(oneof = "nativedebugimage::HasImageSize", tags = "8")] + pub has_image_size: ::core::option::Option, + #[prost(oneof = "nativedebugimage::HasImageVmaddr", tags = "9")] + pub has_image_vmaddr: ::core::option::Option, +} +/// Nested message and enum types in `Nativedebugimage`. +pub mod nativedebugimage { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasArch { + #[prost(string, tag = "1")] + Arch(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasCodeId { + #[prost(string, tag = "3")] + CodeId(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasDebugChecksum { + #[prost(string, tag = "4")] + DebugChecksum(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasDebugFile { + #[prost(string, tag = "5")] + DebugFile(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasImageAddr { + #[prost(string, tag = "7")] + ImageAddr(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasImageSize { + #[prost(uint64, tag = "8")] + ImageSize(u64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasImageVmaddr { + #[prost(string, tag = "9")] + ImageVmaddr(::prost::alloc::string::String), + } +} +/// +/// Contains NEL report information. +/// +/// Network Error Logging (NEL) is a browser feature that allows reporting of failed network +/// requests from the client side. See the following resources for more information: +/// +/// - [W3C Editor's Draft]() +/// - [MDN]() +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Nelcontext { + #[prost(oneof = "nelcontext::HasElapsedTime", tags = "1")] + pub has_elapsed_time: ::core::option::Option, + #[prost(oneof = "nelcontext::HasErrorType", tags = "2")] + pub has_error_type: ::core::option::Option, + #[prost(oneof = "nelcontext::HasPhase", tags = "3")] + pub has_phase: ::core::option::Option, + #[prost(oneof = "nelcontext::HasSamplingFraction", tags = "4")] + pub has_sampling_fraction: ::core::option::Option, + #[prost(oneof = "nelcontext::HasServerIp", tags = "5")] + pub has_server_ip: ::core::option::Option, +} +/// Nested message and enum types in `Nelcontext`. +pub mod nelcontext { + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasElapsedTime { + #[prost(uint64, tag = "1")] + ElapsedTime(u64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasErrorType { + #[prost(string, tag = "2")] + ErrorType(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasPhase { + #[prost(message, tag = "3")] + Phase(::prost_types::Value), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasSamplingFraction { + #[prost(double, tag = "4")] + SamplingFraction(f64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasServerIp { + #[prost(string, tag = "5")] + ServerIp(::prost::alloc::string::String), + } +} +/// +/// NSError informaiton. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Nserror { + #[prost(oneof = "nserror::HasCode", tags = "1")] + pub has_code: ::core::option::Option, + #[prost(oneof = "nserror::HasDomain", tags = "2")] + pub has_domain: ::core::option::Option, +} +/// Nested message and enum types in `Nserror`. +pub mod nserror { + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasCode { + #[prost(int64, tag = "1")] + Code(i64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasDomain { + #[prost(string, tag = "2")] + Domain(::prost::alloc::string::String), + } +} +/// +/// Operating system information. +/// +/// OS context describes the operating system on which the event was created. In web contexts, this +/// is the operating system of the browser (generally pulled from the User-Agent string). +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Oscontext { + #[prost(oneof = "oscontext::HasBuild", tags = "1")] + pub has_build: ::core::option::Option, + #[prost(oneof = "oscontext::HasKernelVersion", tags = "2")] + pub has_kernel_version: ::core::option::Option, + #[prost(oneof = "oscontext::HasName", tags = "3")] + pub has_name: ::core::option::Option, + #[prost(oneof = "oscontext::HasRawDescription", tags = "4")] + pub has_raw_description: ::core::option::Option, + #[prost(oneof = "oscontext::HasRooted", tags = "5")] + pub has_rooted: ::core::option::Option, + #[prost(oneof = "oscontext::HasVersion", tags = "6")] + pub has_version: ::core::option::Option, +} +/// Nested message and enum types in `Oscontext`. +pub mod oscontext { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasBuild { + #[prost(string, tag = "1")] + Build(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasKernelVersion { + #[prost(string, tag = "2")] + KernelVersion(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasName { + #[prost(string, tag = "3")] + Name(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasRawDescription { + #[prost(string, tag = "4")] + RawDescription(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasRooted { + #[prost(bool, tag = "5")] + Rooted(bool), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasVersion { + #[prost(string, tag = "6")] + Version(::prost::alloc::string::String), + } +} +/// +/// OpenTelemetry Context +/// +/// If an event has this context, it was generated from an OpenTelemetry signal (trace, metric, log). +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Otelcontext { + #[prost(oneof = "otelcontext::HasAttributes", tags = "1")] + pub has_attributes: ::core::option::Option, + #[prost(oneof = "otelcontext::HasResource", tags = "2")] + pub has_resource: ::core::option::Option, +} +/// Nested message and enum types in `Otelcontext`. +pub mod otelcontext { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasAttributes { + #[prost(message, tag = "1")] + Attributes(::prost_types::Value), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasResource { + #[prost(message, tag = "2")] + Resource(::prost_types::Value), + } +} +/// +/// POSIX signal with optional extended data. +/// +/// On Apple systems, signals also carry a code in addition to the signal number describing the +/// signal in more detail. On Linux, this code does not exist. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Posixsignal { + #[prost(oneof = "posixsignal::HasCode", tags = "1")] + pub has_code: ::core::option::Option, + #[prost(oneof = "posixsignal::HasCodeName", tags = "2")] + pub has_code_name: ::core::option::Option, + #[prost(oneof = "posixsignal::HasName", tags = "3")] + pub has_name: ::core::option::Option, + #[prost(oneof = "posixsignal::HasNumber", tags = "4")] + pub has_number: ::core::option::Option, +} +/// Nested message and enum types in `Posixsignal`. +pub mod posixsignal { + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasCode { + #[prost(int64, tag = "1")] + Code(i64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasCodeName { + #[prost(string, tag = "2")] + CodeName(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasName { + #[prost(string, tag = "3")] + Name(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasNumber { + #[prost(int64, tag = "4")] + Number(i64), + } +} +/// +/// Profile context +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Profilecontext { + #[prost(string, tag = "1")] + pub profile_id: ::prost::alloc::string::String, +} +/// +/// Proguard mapping file. +/// +/// Proguard images refer to `mapping.txt` files generated when Proguard obfuscates function names. The Java SDK integrations assign this file a unique identifier, which has to be included in the list of images. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Proguarddebugimage { + #[prost(string, tag = "1")] + pub uuid: ::prost::alloc::string::String, +} +/// +/// A stack trace of a single thread. +/// +/// A stack trace contains a list of frames, each with various bits (most optional) describing the +/// context of that frame. Frames should be sorted from oldest to newest. +/// +/// For the given example program written in Python: +/// +/// ```python +/// def foo(): +/// my_var = 'foo' +/// raise ValueError() +/// +/// def main(): +/// foo() +/// ``` +/// +/// A minimalistic stack trace for the above program in the correct order: +/// +/// ```json +/// { +/// "frames": [ +/// {"function": "main"}, +/// {"function": "foo"} +/// ] +/// } +/// ``` +/// +/// The top frame fully symbolicated with five lines of source context: +/// +/// ```json +/// { +/// "frames": [{ +/// "in_app": true, +/// "function": "myfunction", +/// "abs_path": "/real/file/name.py", +/// "filename": "file/name.py", +/// "lineno": 3, +/// "vars": { +/// "my_var": "'value'" +/// }, +/// "pre_context": [ +/// "def foo():", +/// " my_var = 'foo'", +/// ], +/// "context_line": " raise ValueError()", +/// "post_context": [ +/// "", +/// "def main():" +/// ], +/// }] +/// } +/// ``` +/// +/// A minimal native stack trace with register values. Note that the `package` event attribute must +/// be "native" for these frames to be symbolicated. +/// +/// ```json +/// { +/// "frames": [ +/// {"instruction_addr": "0x7fff5bf3456c"}, +/// {"instruction_addr": "0x7fff5bf346c0"}, +/// ], +/// "registers": { +/// "rip": "0x00007ff6eef54be2", +/// "rsp": "0x0000003b710cd9e0" +/// } +/// } +/// ``` +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Rawstacktrace { + #[prost(message, repeated, tag = "1")] + pub frames: ::prost::alloc::vec::Vec, + #[prost(map = "string, string", tag = "4")] + pub registers: + ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + #[prost(oneof = "rawstacktrace::HasInstructionAddrAdjustment", tags = "2")] + pub has_instruction_addr_adjustment: + ::core::option::Option, + #[prost(oneof = "rawstacktrace::HasLang", tags = "3")] + pub has_lang: ::core::option::Option, + #[prost(oneof = "rawstacktrace::HasSnapshot", tags = "5")] + pub has_snapshot: ::core::option::Option, +} +/// Nested message and enum types in `Rawstacktrace`. +pub mod rawstacktrace { + /// + /// Required. A non-empty list of stack frames. The list is ordered from caller to callee, or + /// oldest to youngest. The last frame is the one creating the exception. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct RawstacktraceFrames { + #[prost(string, repeated, tag = "16")] + pub post_context: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "17")] + pub pre_context: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(oneof = "rawstacktrace_frames::HasAbsPath", tags = "1")] + pub has_abs_path: ::core::option::Option, + #[prost(oneof = "rawstacktrace_frames::HasAddrMode", tags = "2")] + pub has_addr_mode: ::core::option::Option, + #[prost(oneof = "rawstacktrace_frames::HasColno", tags = "3")] + pub has_colno: ::core::option::Option, + #[prost(oneof = "rawstacktrace_frames::HasContextLine", tags = "4")] + pub has_context_line: ::core::option::Option, + #[prost(oneof = "rawstacktrace_frames::HasFilename", tags = "5")] + pub has_filename: ::core::option::Option, + #[prost(oneof = "rawstacktrace_frames::HasFunction", tags = "6")] + pub has_function: ::core::option::Option, + #[prost(oneof = "rawstacktrace_frames::HasFunctionId", tags = "7")] + pub has_function_id: ::core::option::Option, + #[prost(oneof = "rawstacktrace_frames::HasImageAddr", tags = "8")] + pub has_image_addr: ::core::option::Option, + #[prost(oneof = "rawstacktrace_frames::HasInApp", tags = "9")] + pub has_in_app: ::core::option::Option, + #[prost(oneof = "rawstacktrace_frames::HasInstructionAddr", tags = "10")] + pub has_instruction_addr: ::core::option::Option, + #[prost(oneof = "rawstacktrace_frames::HasLineno", tags = "11")] + pub has_lineno: ::core::option::Option, + #[prost(oneof = "rawstacktrace_frames::HasLock", tags = "12")] + pub has_lock: ::core::option::Option, + #[prost(oneof = "rawstacktrace_frames::HasModule", tags = "13")] + pub has_module: ::core::option::Option, + #[prost(oneof = "rawstacktrace_frames::HasPackage", tags = "14")] + pub has_package: ::core::option::Option, + #[prost(oneof = "rawstacktrace_frames::HasPlatform", tags = "15")] + pub has_platform: ::core::option::Option, + #[prost(oneof = "rawstacktrace_frames::HasRawFunction", tags = "18")] + pub has_raw_function: ::core::option::Option, + #[prost(oneof = "rawstacktrace_frames::HasStackStart", tags = "19")] + pub has_stack_start: ::core::option::Option, + #[prost(oneof = "rawstacktrace_frames::HasSymbol", tags = "20")] + pub has_symbol: ::core::option::Option, + #[prost(oneof = "rawstacktrace_frames::HasSymbolAddr", tags = "21")] + pub has_symbol_addr: ::core::option::Option, + #[prost(oneof = "rawstacktrace_frames::HasVars", tags = "22")] + pub has_vars: ::core::option::Option, + } + /// Nested message and enum types in `RawstacktraceFrames`. + pub mod rawstacktrace_frames { + /// + /// A possible lock (java monitor object) held by this frame. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct RawstacktraceFramesLock { + #[prost(string, tag = "5")] + pub r#type: ::prost::alloc::string::String, + #[prost(oneof = "rawstacktrace_frames_lock::HasAddress", tags = "1")] + pub has_address: ::core::option::Option, + #[prost(oneof = "rawstacktrace_frames_lock::HasClassName", tags = "2")] + pub has_class_name: ::core::option::Option, + #[prost(oneof = "rawstacktrace_frames_lock::HasPackageName", tags = "3")] + pub has_package_name: ::core::option::Option, + #[prost(oneof = "rawstacktrace_frames_lock::HasThreadId", tags = "4")] + pub has_thread_id: ::core::option::Option, + } + /// Nested message and enum types in `RawstacktraceFramesLock`. + pub mod rawstacktrace_frames_lock { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasAddress { + #[prost(string, tag = "1")] + Address(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasClassName { + #[prost(string, tag = "2")] + ClassName(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasPackageName { + #[prost(string, tag = "3")] + PackageName(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasThreadId { + #[prost(message, tag = "4")] + ThreadId(::prost_types::Value), + } + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasAbsPath { + #[prost(string, tag = "1")] + AbsPath(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasAddrMode { + #[prost(string, tag = "2")] + AddrMode(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasColno { + #[prost(uint64, tag = "3")] + Colno(u64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasContextLine { + #[prost(string, tag = "4")] + ContextLine(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasFilename { + #[prost(string, tag = "5")] + Filename(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasFunction { + #[prost(string, tag = "6")] + Function(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasFunctionId { + #[prost(string, tag = "7")] + FunctionId(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasImageAddr { + #[prost(string, tag = "8")] + ImageAddr(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasInApp { + #[prost(bool, tag = "9")] + InApp(bool), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasInstructionAddr { + #[prost(string, tag = "10")] + InstructionAddr(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasLineno { + #[prost(uint64, tag = "11")] + Lineno(u64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasLock { + #[prost(message, tag = "12")] + Lock(RawstacktraceFramesLock), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasModule { + #[prost(string, tag = "13")] + Module(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasPackage { + #[prost(string, tag = "14")] + Package(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasPlatform { + #[prost(string, tag = "15")] + Platform(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasRawFunction { + #[prost(string, tag = "18")] + RawFunction(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasStackStart { + #[prost(bool, tag = "19")] + StackStart(bool), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasSymbol { + #[prost(string, tag = "20")] + Symbol(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasSymbolAddr { + #[prost(string, tag = "21")] + SymbolAddr(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasVars { + #[prost(message, tag = "22")] + Vars(::prost_types::Value), + } + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasInstructionAddrAdjustment { + #[prost(string, tag = "2")] + InstructionAddrAdjustment(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasLang { + #[prost(string, tag = "3")] + Lang(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasSnapshot { + #[prost(bool, tag = "5")] + Snapshot(bool), + } +} +/// +/// Replay context. +/// +/// The replay context contains the replay_id of the session replay if the event +/// occurred during a replay. The replay_id is added onto the dynamic sampling context +/// on the javascript SDK which propagates it through the trace. In relay, we take +/// this value from the DSC and create a context which contains only the replay_id +/// This context is never set on the client for events, only on relay. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Replaycontext { + #[prost(oneof = "replaycontext::HasReplayId", tags = "1")] + pub has_replay_id: ::core::option::Option, +} +/// Nested message and enum types in `Replaycontext`. +pub mod replaycontext { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasReplayId { + #[prost(string, tag = "1")] + ReplayId(::prost::alloc::string::String), + } +} +/// +/// Http request information. +/// +/// The Request interface contains information on a HTTP request related to the event. In client +/// SDKs, this can be an outgoing request, or the request that rendered the current web page. On +/// server SDKs, this could be the incoming web request that is being handled. +/// +/// The data variable should only contain the request body (not the query string). It can either be +/// a dictionary (for standard HTTP requests) or a raw request body. +/// +/// ### Ordered Maps +/// +/// In the Request interface, several attributes can either be declared as string, object, or list +/// of tuples. Sentry attempts to parse structured information from the string representation in +/// such cases. +/// +/// Sometimes, keys can be declared multiple times, or the order of elements matters. In such +/// cases, use the tuple representation over a plain object. +/// +/// Example of request headers as object: +/// +/// ```json +/// { +/// "content-type": "application/json", +/// "accept": "application/json, application/xml" +/// } +/// ``` +/// +/// Example of the same headers as list of tuples: +/// +/// ```json +/// [ +/// \["content-type", "application/json"\], +/// \["accept", "application/json"\], +/// \["accept", "application/xml"\] +/// ] +/// ``` +/// +/// Example of a fully populated request object: +/// +/// ```json +/// { +/// "request": { +/// "method": "POST", +/// "url": " +/// "query_string": "query=foobar&page=2", +/// "data": { +/// "foo": "bar" +/// }, +/// "cookies": "PHPSESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;", +/// "headers": { +/// "content-type": "text/html" +/// }, +/// "env": { +/// "REMOTE_ADDR": "192.168.0.1" +/// } +/// } +/// } +/// ``` +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Request { + #[prost(message, optional, tag = "4")] + pub data: ::core::option::Option<::prost_types::Value>, + #[prost(oneof = "request::HasApiTarget", tags = "1")] + pub has_api_target: ::core::option::Option, + #[prost(oneof = "request::HasBodySize", tags = "2")] + pub has_body_size: ::core::option::Option, + #[prost(oneof = "request::HasCookies", tags = "3")] + pub has_cookies: ::core::option::Option, + #[prost(oneof = "request::HasEnv", tags = "5")] + pub has_env: ::core::option::Option, + #[prost(oneof = "request::HasFragment", tags = "6")] + pub has_fragment: ::core::option::Option, + #[prost(oneof = "request::HasHeaders", tags = "7")] + pub has_headers: ::core::option::Option, + #[prost(oneof = "request::HasInferredContentType", tags = "8")] + pub has_inferred_content_type: ::core::option::Option, + #[prost(oneof = "request::HasMethod", tags = "9")] + pub has_method: ::core::option::Option, + #[prost(oneof = "request::HasProtocol", tags = "10")] + pub has_protocol: ::core::option::Option, + #[prost(oneof = "request::HasQueryString", tags = "11")] + pub has_query_string: ::core::option::Option, + #[prost(oneof = "request::HasUrl", tags = "12")] + pub has_url: ::core::option::Option, +} +/// Nested message and enum types in `Request`. +pub mod request { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasApiTarget { + #[prost(string, tag = "1")] + ApiTarget(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasBodySize { + #[prost(uint64, tag = "2")] + BodySize(u64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasCookies { + #[prost(message, tag = "3")] + Cookies(::prost_types::Value), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasEnv { + #[prost(message, tag = "5")] + Env(::prost_types::Value), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasFragment { + #[prost(string, tag = "6")] + Fragment(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasHeaders { + #[prost(message, tag = "7")] + Headers(::prost_types::Value), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasInferredContentType { + #[prost(string, tag = "8")] + InferredContentType(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasMethod { + #[prost(string, tag = "9")] + Method(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasProtocol { + #[prost(string, tag = "10")] + Protocol(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasQueryString { + #[prost(message, tag = "11")] + QueryString(::prost_types::Value), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasUrl { + #[prost(string, tag = "12")] + Url(::prost::alloc::string::String), + } +} +/// +/// Response interface that contains information on a HTTP response related to the event. +/// +/// The data variable should only contain the response body. It can either be +/// a dictionary (for standard HTTP responses) or a raw response body. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Responsecontext { + #[prost(message, optional, tag = "3")] + pub data: ::core::option::Option<::prost_types::Value>, + #[prost(oneof = "responsecontext::HasBodySize", tags = "1")] + pub has_body_size: ::core::option::Option, + #[prost(oneof = "responsecontext::HasCookies", tags = "2")] + pub has_cookies: ::core::option::Option, + #[prost(oneof = "responsecontext::HasHeaders", tags = "4")] + pub has_headers: ::core::option::Option, + #[prost(oneof = "responsecontext::HasInferredContentType", tags = "5")] + pub has_inferred_content_type: ::core::option::Option, + #[prost(oneof = "responsecontext::HasStatusCode", tags = "6")] + pub has_status_code: ::core::option::Option, +} +/// Nested message and enum types in `Responsecontext`. +pub mod responsecontext { + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasBodySize { + #[prost(uint64, tag = "1")] + BodySize(u64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasCookies { + #[prost(message, tag = "2")] + Cookies(::prost_types::Value), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasHeaders { + #[prost(message, tag = "4")] + Headers(::prost_types::Value), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasInferredContentType { + #[prost(string, tag = "5")] + InferredContentType(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasStatusCode { + #[prost(uint64, tag = "6")] + StatusCode(u64), + } +} +/// +/// The route in the application, set by React Native SDK. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Route { + #[prost(oneof = "route::HasName", tags = "1")] + pub has_name: ::core::option::Option, + #[prost(oneof = "route::HasParams", tags = "2")] + pub has_params: ::core::option::Option, +} +/// Nested message and enum types in `Route`. +pub mod route { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasName { + #[prost(string, tag = "1")] + Name(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasParams { + #[prost(message, tag = "2")] + Params(::prost_types::Value), + } +} +/// +/// Runtime information. +/// +/// Runtime context describes a runtime in more detail. Typically, this context is present in +/// `contexts` multiple times if multiple runtimes are involved (for instance, if you have a +/// JavaScript application running on top of JVM). +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Runtimecontext { + #[prost(oneof = "runtimecontext::HasBuild", tags = "1")] + pub has_build: ::core::option::Option, + #[prost(oneof = "runtimecontext::HasName", tags = "2")] + pub has_name: ::core::option::Option, + #[prost(oneof = "runtimecontext::HasRawDescription", tags = "3")] + pub has_raw_description: ::core::option::Option, + #[prost(oneof = "runtimecontext::HasVersion", tags = "4")] + pub has_version: ::core::option::Option, +} +/// Nested message and enum types in `Runtimecontext`. +pub mod runtimecontext { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasBuild { + #[prost(string, tag = "1")] + Build(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasName { + #[prost(string, tag = "2")] + Name(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasRawDescription { + #[prost(string, tag = "3")] + RawDescription(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasVersion { + #[prost(string, tag = "4")] + Version(::prost::alloc::string::String), + } +} +/// +/// A debug image pointing to a source map. +/// +/// Examples: +/// +/// ```json +/// { +/// "type": "sourcemap", +/// "code_file": " +/// "debug_id": "395835f4-03e0-4436-80d3-136f0749a893" +/// } +/// ``` +/// +/// *Note:** Stack frames and the correlating entries in the debug image here +/// for `code_file`/`abs_path` are not PII stripped as they need to line up +/// perfectly for source map processing. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Sourcemapdebugimage { + #[prost(string, tag = "1")] + pub code_file: ::prost::alloc::string::String, + #[prost(string, tag = "3")] + pub debug_id: ::prost::alloc::string::String, + #[prost(oneof = "sourcemapdebugimage::HasDebugFile", tags = "2")] + pub has_debug_file: ::core::option::Option, +} +/// Nested message and enum types in `Sourcemapdebugimage`. +pub mod sourcemapdebugimage { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasDebugFile { + #[prost(string, tag = "2")] + DebugFile(::prost::alloc::string::String), + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Stacktrace { + #[prost(message, repeated, tag = "1")] + pub frames: ::prost::alloc::vec::Vec, + #[prost(map = "string, string", tag = "4")] + pub registers: + ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + #[prost(oneof = "stacktrace::HasInstructionAddrAdjustment", tags = "2")] + pub has_instruction_addr_adjustment: + ::core::option::Option, + #[prost(oneof = "stacktrace::HasLang", tags = "3")] + pub has_lang: ::core::option::Option, + #[prost(oneof = "stacktrace::HasSnapshot", tags = "5")] + pub has_snapshot: ::core::option::Option, +} +/// Nested message and enum types in `Stacktrace`. +pub mod stacktrace { + /// + /// Required. A non-empty list of stack frames. The list is ordered from caller to callee, or + /// oldest to youngest. The last frame is the one creating the exception. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct StacktraceFrames { + #[prost(string, repeated, tag = "16")] + pub post_context: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "17")] + pub pre_context: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(oneof = "stacktrace_frames::HasAbsPath", tags = "1")] + pub has_abs_path: ::core::option::Option, + #[prost(oneof = "stacktrace_frames::HasAddrMode", tags = "2")] + pub has_addr_mode: ::core::option::Option, + #[prost(oneof = "stacktrace_frames::HasColno", tags = "3")] + pub has_colno: ::core::option::Option, + #[prost(oneof = "stacktrace_frames::HasContextLine", tags = "4")] + pub has_context_line: ::core::option::Option, + #[prost(oneof = "stacktrace_frames::HasFilename", tags = "5")] + pub has_filename: ::core::option::Option, + #[prost(oneof = "stacktrace_frames::HasFunction", tags = "6")] + pub has_function: ::core::option::Option, + #[prost(oneof = "stacktrace_frames::HasFunctionId", tags = "7")] + pub has_function_id: ::core::option::Option, + #[prost(oneof = "stacktrace_frames::HasImageAddr", tags = "8")] + pub has_image_addr: ::core::option::Option, + #[prost(oneof = "stacktrace_frames::HasInApp", tags = "9")] + pub has_in_app: ::core::option::Option, + #[prost(oneof = "stacktrace_frames::HasInstructionAddr", tags = "10")] + pub has_instruction_addr: ::core::option::Option, + #[prost(oneof = "stacktrace_frames::HasLineno", tags = "11")] + pub has_lineno: ::core::option::Option, + #[prost(oneof = "stacktrace_frames::HasLock", tags = "12")] + pub has_lock: ::core::option::Option, + #[prost(oneof = "stacktrace_frames::HasModule", tags = "13")] + pub has_module: ::core::option::Option, + #[prost(oneof = "stacktrace_frames::HasPackage", tags = "14")] + pub has_package: ::core::option::Option, + #[prost(oneof = "stacktrace_frames::HasPlatform", tags = "15")] + pub has_platform: ::core::option::Option, + #[prost(oneof = "stacktrace_frames::HasRawFunction", tags = "18")] + pub has_raw_function: ::core::option::Option, + #[prost(oneof = "stacktrace_frames::HasStackStart", tags = "19")] + pub has_stack_start: ::core::option::Option, + #[prost(oneof = "stacktrace_frames::HasSymbol", tags = "20")] + pub has_symbol: ::core::option::Option, + #[prost(oneof = "stacktrace_frames::HasSymbolAddr", tags = "21")] + pub has_symbol_addr: ::core::option::Option, + #[prost(oneof = "stacktrace_frames::HasVars", tags = "22")] + pub has_vars: ::core::option::Option, + } + /// Nested message and enum types in `StacktraceFrames`. + pub mod stacktrace_frames { + /// + /// A possible lock (java monitor object) held by this frame. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct StacktraceFramesLock { + #[prost(string, tag = "5")] + pub r#type: ::prost::alloc::string::String, + #[prost(oneof = "stacktrace_frames_lock::HasAddress", tags = "1")] + pub has_address: ::core::option::Option, + #[prost(oneof = "stacktrace_frames_lock::HasClassName", tags = "2")] + pub has_class_name: ::core::option::Option, + #[prost(oneof = "stacktrace_frames_lock::HasPackageName", tags = "3")] + pub has_package_name: ::core::option::Option, + #[prost(oneof = "stacktrace_frames_lock::HasThreadId", tags = "4")] + pub has_thread_id: ::core::option::Option, + } + /// Nested message and enum types in `StacktraceFramesLock`. + pub mod stacktrace_frames_lock { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasAddress { + #[prost(string, tag = "1")] + Address(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasClassName { + #[prost(string, tag = "2")] + ClassName(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasPackageName { + #[prost(string, tag = "3")] + PackageName(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasThreadId { + #[prost(message, tag = "4")] + ThreadId(::prost_types::Value), + } + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasAbsPath { + #[prost(string, tag = "1")] + AbsPath(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasAddrMode { + #[prost(string, tag = "2")] + AddrMode(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasColno { + #[prost(uint64, tag = "3")] + Colno(u64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasContextLine { + #[prost(string, tag = "4")] + ContextLine(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasFilename { + #[prost(string, tag = "5")] + Filename(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasFunction { + #[prost(string, tag = "6")] + Function(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasFunctionId { + #[prost(string, tag = "7")] + FunctionId(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasImageAddr { + #[prost(string, tag = "8")] + ImageAddr(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasInApp { + #[prost(bool, tag = "9")] + InApp(bool), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasInstructionAddr { + #[prost(string, tag = "10")] + InstructionAddr(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasLineno { + #[prost(uint64, tag = "11")] + Lineno(u64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasLock { + #[prost(message, tag = "12")] + Lock(StacktraceFramesLock), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasModule { + #[prost(string, tag = "13")] + Module(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasPackage { + #[prost(string, tag = "14")] + Package(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasPlatform { + #[prost(string, tag = "15")] + Platform(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasRawFunction { + #[prost(string, tag = "18")] + RawFunction(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasStackStart { + #[prost(bool, tag = "19")] + StackStart(bool), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasSymbol { + #[prost(string, tag = "20")] + Symbol(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasSymbolAddr { + #[prost(string, tag = "21")] + SymbolAddr(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasVars { + #[prost(message, tag = "22")] + Vars(::prost_types::Value), + } + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasInstructionAddrAdjustment { + #[prost(string, tag = "2")] + InstructionAddrAdjustment(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasLang { + #[prost(string, tag = "3")] + Lang(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasSnapshot { + #[prost(bool, tag = "5")] + Snapshot(bool), + } +} +/// +/// Holds information about the system SDK. +/// +/// This is relevant for iOS and other platforms that have a system +/// SDK. Not to be confused with the client SDK. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Systemsdkinfo { + #[prost(oneof = "systemsdkinfo::HasSdkName", tags = "1")] + pub has_sdk_name: ::core::option::Option, + #[prost(oneof = "systemsdkinfo::HasVersionMajor", tags = "2")] + pub has_version_major: ::core::option::Option, + #[prost(oneof = "systemsdkinfo::HasVersionMinor", tags = "3")] + pub has_version_minor: ::core::option::Option, + #[prost(oneof = "systemsdkinfo::HasVersionPatchlevel", tags = "4")] + pub has_version_patchlevel: ::core::option::Option, +} +/// Nested message and enum types in `Systemsdkinfo`. +pub mod systemsdkinfo { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasSdkName { + #[prost(string, tag = "1")] + SdkName(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasVersionMajor { + #[prost(uint64, tag = "2")] + VersionMajor(u64), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasVersionMinor { + #[prost(uint64, tag = "3")] + VersionMinor(u64), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasVersionPatchlevel { + #[prost(uint64, tag = "4")] + VersionPatchlevel(u64), + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Tagentry { + #[prost(oneof = "tagentry::HasA0", tags = "1")] + pub has_a0: ::core::option::Option, + #[prost(oneof = "tagentry::HasA1", tags = "2")] + pub has_a1: ::core::option::Option, +} +/// Nested message and enum types in `Tagentry`. +pub mod tagentry { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasA0 { + #[prost(string, tag = "1")] + A0(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasA1 { + #[prost(string, tag = "2")] + A1(::prost::alloc::string::String), + } +} +/// +/// A process thread of an event. +/// +/// The Threads Interface specifies threads that were running at the time an event happened. These threads can also contain stack traces. +/// +/// An event may contain one or more threads in an attribute named `threads`. +/// +/// The following example illustrates the threads part of the event payload and omits other attributes for simplicity. +/// +/// ```json +/// { +/// "threads": { +/// "values": [ +/// { +/// "id": "0", +/// "name": "main", +/// "crashed": true, +/// "stacktrace": {} +/// } +/// ] +/// } +/// } +/// ``` +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Thread { + #[prost(map = "string, message", tag = "3")] + pub held_locks: + ::std::collections::HashMap<::prost::alloc::string::String, thread::ThreadHeldLocks>, + #[prost(oneof = "thread::HasCrashed", tags = "1")] + pub has_crashed: ::core::option::Option, + #[prost(oneof = "thread::HasCurrent", tags = "2")] + pub has_current: ::core::option::Option, + #[prost(oneof = "thread::HasId", tags = "4")] + pub has_id: ::core::option::Option, + #[prost(oneof = "thread::HasMain", tags = "5")] + pub has_main: ::core::option::Option, + #[prost(oneof = "thread::HasName", tags = "6")] + pub has_name: ::core::option::Option, + #[prost(oneof = "thread::HasStacktrace", tags = "7")] + pub has_stacktrace: ::core::option::Option, + #[prost(oneof = "thread::HasState", tags = "8")] + pub has_state: ::core::option::Option, +} +/// Nested message and enum types in `Thread`. +pub mod thread { + /// + /// Represents a collection of locks (java monitor objects) held by a thread. + /// + /// A map of lock object addresses and their respective lock reason/details. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct ThreadHeldLocks { + #[prost(string, tag = "5")] + pub r#type: ::prost::alloc::string::String, + #[prost(oneof = "thread_held_locks::HasAddress", tags = "1")] + pub has_address: ::core::option::Option, + #[prost(oneof = "thread_held_locks::HasClassName", tags = "2")] + pub has_class_name: ::core::option::Option, + #[prost(oneof = "thread_held_locks::HasPackageName", tags = "3")] + pub has_package_name: ::core::option::Option, + #[prost(oneof = "thread_held_locks::HasThreadId", tags = "4")] + pub has_thread_id: ::core::option::Option, + } + /// Nested message and enum types in `ThreadHeldLocks`. + pub mod thread_held_locks { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasAddress { + #[prost(string, tag = "1")] + Address(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasClassName { + #[prost(string, tag = "2")] + ClassName(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasPackageName { + #[prost(string, tag = "3")] + PackageName(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasThreadId { + #[prost(message, tag = "4")] + ThreadId(::prost_types::Value), + } + } + /// + /// Stack trace containing frames of this exception. + /// + /// The thread that crashed with an exception should not have a stack trace, but instead, the `thread_id` attribute should be set on the exception and Sentry will connect the two. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct ThreadStacktrace { + #[prost(message, repeated, tag = "1")] + pub frames: ::prost::alloc::vec::Vec, + #[prost(map = "string, string", tag = "4")] + pub registers: ::std::collections::HashMap< + ::prost::alloc::string::String, + ::prost::alloc::string::String, + >, + #[prost(oneof = "thread_stacktrace::HasInstructionAddrAdjustment", tags = "2")] + pub has_instruction_addr_adjustment: + ::core::option::Option, + #[prost(oneof = "thread_stacktrace::HasLang", tags = "3")] + pub has_lang: ::core::option::Option, + #[prost(oneof = "thread_stacktrace::HasSnapshot", tags = "5")] + pub has_snapshot: ::core::option::Option, + } + /// Nested message and enum types in `ThreadStacktrace`. + pub mod thread_stacktrace { + /// + /// Required. A non-empty list of stack frames. The list is ordered from caller to callee, or + /// oldest to youngest. The last frame is the one creating the exception. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct ThreadStacktraceFrames { + #[prost(string, repeated, tag = "16")] + pub post_context: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "17")] + pub pre_context: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(oneof = "thread_stacktrace_frames::HasAbsPath", tags = "1")] + pub has_abs_path: ::core::option::Option, + #[prost(oneof = "thread_stacktrace_frames::HasAddrMode", tags = "2")] + pub has_addr_mode: ::core::option::Option, + #[prost(oneof = "thread_stacktrace_frames::HasColno", tags = "3")] + pub has_colno: ::core::option::Option, + #[prost(oneof = "thread_stacktrace_frames::HasContextLine", tags = "4")] + pub has_context_line: ::core::option::Option, + #[prost(oneof = "thread_stacktrace_frames::HasFilename", tags = "5")] + pub has_filename: ::core::option::Option, + #[prost(oneof = "thread_stacktrace_frames::HasFunction", tags = "6")] + pub has_function: ::core::option::Option, + #[prost(oneof = "thread_stacktrace_frames::HasFunctionId", tags = "7")] + pub has_function_id: ::core::option::Option, + #[prost(oneof = "thread_stacktrace_frames::HasImageAddr", tags = "8")] + pub has_image_addr: ::core::option::Option, + #[prost(oneof = "thread_stacktrace_frames::HasInApp", tags = "9")] + pub has_in_app: ::core::option::Option, + #[prost(oneof = "thread_stacktrace_frames::HasInstructionAddr", tags = "10")] + pub has_instruction_addr: + ::core::option::Option, + #[prost(oneof = "thread_stacktrace_frames::HasLineno", tags = "11")] + pub has_lineno: ::core::option::Option, + #[prost(oneof = "thread_stacktrace_frames::HasLock", tags = "12")] + pub has_lock: ::core::option::Option, + #[prost(oneof = "thread_stacktrace_frames::HasModule", tags = "13")] + pub has_module: ::core::option::Option, + #[prost(oneof = "thread_stacktrace_frames::HasPackage", tags = "14")] + pub has_package: ::core::option::Option, + #[prost(oneof = "thread_stacktrace_frames::HasPlatform", tags = "15")] + pub has_platform: ::core::option::Option, + #[prost(oneof = "thread_stacktrace_frames::HasRawFunction", tags = "18")] + pub has_raw_function: ::core::option::Option, + #[prost(oneof = "thread_stacktrace_frames::HasStackStart", tags = "19")] + pub has_stack_start: ::core::option::Option, + #[prost(oneof = "thread_stacktrace_frames::HasSymbol", tags = "20")] + pub has_symbol: ::core::option::Option, + #[prost(oneof = "thread_stacktrace_frames::HasSymbolAddr", tags = "21")] + pub has_symbol_addr: ::core::option::Option, + #[prost(oneof = "thread_stacktrace_frames::HasVars", tags = "22")] + pub has_vars: ::core::option::Option, + } + /// Nested message and enum types in `ThreadStacktraceFrames`. + pub mod thread_stacktrace_frames { + /// + /// A possible lock (java monitor object) held by this frame. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct ThreadStacktraceFramesLock { + #[prost(string, tag = "5")] + pub r#type: ::prost::alloc::string::String, + #[prost(oneof = "thread_stacktrace_frames_lock::HasAddress", tags = "1")] + pub has_address: ::core::option::Option, + #[prost(oneof = "thread_stacktrace_frames_lock::HasClassName", tags = "2")] + pub has_class_name: + ::core::option::Option, + #[prost(oneof = "thread_stacktrace_frames_lock::HasPackageName", tags = "3")] + pub has_package_name: + ::core::option::Option, + #[prost(oneof = "thread_stacktrace_frames_lock::HasThreadId", tags = "4")] + pub has_thread_id: + ::core::option::Option, + } + /// Nested message and enum types in `ThreadStacktraceFramesLock`. + pub mod thread_stacktrace_frames_lock { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasAddress { + #[prost(string, tag = "1")] + Address(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasClassName { + #[prost(string, tag = "2")] + ClassName(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasPackageName { + #[prost(string, tag = "3")] + PackageName(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasThreadId { + #[prost(message, tag = "4")] + ThreadId(::prost_types::Value), + } + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasAbsPath { + #[prost(string, tag = "1")] + AbsPath(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasAddrMode { + #[prost(string, tag = "2")] + AddrMode(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasColno { + #[prost(uint64, tag = "3")] + Colno(u64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasContextLine { + #[prost(string, tag = "4")] + ContextLine(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasFilename { + #[prost(string, tag = "5")] + Filename(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasFunction { + #[prost(string, tag = "6")] + Function(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasFunctionId { + #[prost(string, tag = "7")] + FunctionId(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasImageAddr { + #[prost(string, tag = "8")] + ImageAddr(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasInApp { + #[prost(bool, tag = "9")] + InApp(bool), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasInstructionAddr { + #[prost(string, tag = "10")] + InstructionAddr(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasLineno { + #[prost(uint64, tag = "11")] + Lineno(u64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasLock { + #[prost(message, tag = "12")] + Lock(ThreadStacktraceFramesLock), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasModule { + #[prost(string, tag = "13")] + Module(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasPackage { + #[prost(string, tag = "14")] + Package(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasPlatform { + #[prost(string, tag = "15")] + Platform(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasRawFunction { + #[prost(string, tag = "18")] + RawFunction(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasStackStart { + #[prost(bool, tag = "19")] + StackStart(bool), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasSymbol { + #[prost(string, tag = "20")] + Symbol(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasSymbolAddr { + #[prost(string, tag = "21")] + SymbolAddr(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasVars { + #[prost(message, tag = "22")] + Vars(::prost_types::Value), + } + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasInstructionAddrAdjustment { + #[prost(string, tag = "2")] + InstructionAddrAdjustment(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasLang { + #[prost(string, tag = "3")] + Lang(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasSnapshot { + #[prost(bool, tag = "5")] + Snapshot(bool), + } + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasCrashed { + #[prost(bool, tag = "1")] + Crashed(bool), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasCurrent { + #[prost(bool, tag = "2")] + Current(bool), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasId { + #[prost(message, tag = "4")] + Id(::prost_types::Value), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasMain { + #[prost(bool, tag = "5")] + Main(bool), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasName { + #[prost(string, tag = "6")] + Name(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasStacktrace { + #[prost(message, tag = "7")] + Stacktrace(ThreadStacktrace), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasState { + #[prost(string, tag = "8")] + State(::prost::alloc::string::String), + } +} +/// +/// Trace context +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Tracecontext { + #[prost(string, tag = "8")] + pub span_id: ::prost::alloc::string::String, + #[prost(string, tag = "10")] + pub trace_id: ::prost::alloc::string::String, + #[prost(oneof = "tracecontext::HasClientSampleRate", tags = "1")] + pub has_client_sample_rate: ::core::option::Option, + #[prost(oneof = "tracecontext::HasData", tags = "2")] + pub has_data: ::core::option::Option, + #[prost(oneof = "tracecontext::HasExclusiveTime", tags = "3")] + pub has_exclusive_time: ::core::option::Option, + #[prost(oneof = "tracecontext::HasOp", tags = "4")] + pub has_op: ::core::option::Option, + #[prost(oneof = "tracecontext::HasOrigin", tags = "5")] + pub has_origin: ::core::option::Option, + #[prost(oneof = "tracecontext::HasParentSpanId", tags = "6")] + pub has_parent_span_id: ::core::option::Option, + #[prost(oneof = "tracecontext::HasSampled", tags = "7")] + pub has_sampled: ::core::option::Option, + #[prost(oneof = "tracecontext::HasStatus", tags = "9")] + pub has_status: ::core::option::Option, +} +/// Nested message and enum types in `Tracecontext`. +pub mod tracecontext { + /// + /// Arbitrary additional data on a trace. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct TracecontextData { + #[prost(oneof = "tracecontext_data::HasPreviousRoute", tags = "1")] + pub has_previous_route: ::core::option::Option, + #[prost(oneof = "tracecontext_data::HasRoute", tags = "2")] + pub has_route: ::core::option::Option, + } + /// Nested message and enum types in `TracecontextData`. + pub mod tracecontext_data { + /// + /// The previous route in the application + /// + /// Set by React Native SDK. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct TracecontextDataPreviousroute { + #[prost(oneof = "tracecontext_data_previousroute::HasName", tags = "1")] + pub has_name: ::core::option::Option, + #[prost(oneof = "tracecontext_data_previousroute::HasParams", tags = "2")] + pub has_params: ::core::option::Option, + } + /// Nested message and enum types in `TracecontextDataPreviousroute`. + pub mod tracecontext_data_previousroute { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasName { + #[prost(string, tag = "1")] + Name(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasParams { + #[prost(message, tag = "2")] + Params(::prost_types::Value), + } + } + /// + /// The current route in the application. + /// + /// Set by React Native SDK. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct TracecontextDataRoute { + #[prost(oneof = "tracecontext_data_route::HasName", tags = "1")] + pub has_name: ::core::option::Option, + #[prost(oneof = "tracecontext_data_route::HasParams", tags = "2")] + pub has_params: ::core::option::Option, + } + /// Nested message and enum types in `TracecontextDataRoute`. + pub mod tracecontext_data_route { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasName { + #[prost(string, tag = "1")] + Name(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasParams { + #[prost(message, tag = "2")] + Params(::prost_types::Value), + } + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasPreviousRoute { + #[prost(message, tag = "1")] + PreviousRoute(TracecontextDataPreviousroute), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasRoute { + #[prost(message, tag = "2")] + Route(TracecontextDataRoute), + } + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasClientSampleRate { + #[prost(double, tag = "1")] + ClientSampleRate(f64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasData { + #[prost(message, tag = "2")] + Data(TracecontextData), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasExclusiveTime { + #[prost(double, tag = "3")] + ExclusiveTime(f64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasOp { + #[prost(string, tag = "4")] + Op(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasOrigin { + #[prost(string, tag = "5")] + Origin(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasParentSpanId { + #[prost(string, tag = "6")] + ParentSpanId(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasSampled { + #[prost(bool, tag = "7")] + Sampled(bool), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasStatus { + #[prost(string, tag = "9")] + Status(::prost::alloc::string::String), + } +} +/// +/// Additional information about the name of the transaction. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Transactioninfo { + #[prost(message, repeated, tag = "1")] + pub changes: ::prost::alloc::vec::Vec, + #[prost(oneof = "transactioninfo::HasOriginal", tags = "2")] + pub has_original: ::core::option::Option, + #[prost(oneof = "transactioninfo::HasPropagations", tags = "3")] + pub has_propagations: ::core::option::Option, + #[prost(oneof = "transactioninfo::HasSource", tags = "4")] + pub has_source: ::core::option::Option, +} +/// Nested message and enum types in `Transactioninfo`. +pub mod transactioninfo { + /// + /// A list of changes prior to the final transaction name. + /// + /// This list must be empty if the transaction name is set at the beginning of the transaction + /// and never changed. There is no placeholder entry for the initial transaction name. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct TransactioninfoChanges { + #[prost(oneof = "transactioninfo_changes::HasPropagations", tags = "1")] + pub has_propagations: ::core::option::Option, + #[prost(oneof = "transactioninfo_changes::HasSource", tags = "2")] + pub has_source: ::core::option::Option, + #[prost(oneof = "transactioninfo_changes::HasTimestamp", tags = "3")] + pub has_timestamp: ::core::option::Option, + } + /// Nested message and enum types in `TransactioninfoChanges`. + pub mod transactioninfo_changes { + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasPropagations { + #[prost(uint64, tag = "1")] + Propagations(u64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasSource { + #[prost(string, tag = "2")] + Source(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasTimestamp { + #[prost(message, tag = "3")] + Timestamp(::prost_types::Value), + } + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasOriginal { + #[prost(string, tag = "2")] + Original(::prost::alloc::string::String), + } + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasPropagations { + #[prost(uint64, tag = "3")] + Propagations(u64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasSource { + #[prost(string, tag = "4")] + Source(::prost::alloc::string::String), + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Transactionnamechange { + #[prost(oneof = "transactionnamechange::HasPropagations", tags = "1")] + pub has_propagations: ::core::option::Option, + #[prost(oneof = "transactionnamechange::HasSource", tags = "2")] + pub has_source: ::core::option::Option, + #[prost(oneof = "transactionnamechange::HasTimestamp", tags = "3")] + pub has_timestamp: ::core::option::Option, +} +/// Nested message and enum types in `Transactionnamechange`. +pub mod transactionnamechange { + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum HasPropagations { + #[prost(uint64, tag = "1")] + Propagations(u64), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasSource { + #[prost(string, tag = "2")] + Source(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasTimestamp { + #[prost(message, tag = "3")] + Timestamp(::prost_types::Value), + } +} +/// +/// Information about the user who triggered an event. +/// +/// ```json +/// { +/// "user": { +/// "id": "unique_id", +/// "username": "my_user", +/// "email": "foo@example.com", +/// "ip_address": "127.0.0.1", +/// "subscription": "basic" +/// } +/// } +/// ``` +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct User { + #[prost(oneof = "user::HasData", tags = "1")] + pub has_data: ::core::option::Option, + #[prost(oneof = "user::HasEmail", tags = "2")] + pub has_email: ::core::option::Option, + #[prost(oneof = "user::HasGeo", tags = "3")] + pub has_geo: ::core::option::Option, + #[prost(oneof = "user::HasId", tags = "4")] + pub has_id: ::core::option::Option, + #[prost(oneof = "user::HasIpAddress", tags = "5")] + pub has_ip_address: ::core::option::Option, + #[prost(oneof = "user::HasName", tags = "6")] + pub has_name: ::core::option::Option, + #[prost(oneof = "user::HasSegment", tags = "7")] + pub has_segment: ::core::option::Option, + #[prost(oneof = "user::HasSentryUser", tags = "8")] + pub has_sentry_user: ::core::option::Option, + #[prost(oneof = "user::HasUsername", tags = "9")] + pub has_username: ::core::option::Option, +} +/// Nested message and enum types in `User`. +pub mod user { + /// + /// Approximate geographical location of the end user or device. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct UserGeo { + #[prost(oneof = "user_geo::HasCity", tags = "1")] + pub has_city: ::core::option::Option, + #[prost(oneof = "user_geo::HasCountryCode", tags = "2")] + pub has_country_code: ::core::option::Option, + #[prost(oneof = "user_geo::HasRegion", tags = "3")] + pub has_region: ::core::option::Option, + #[prost(oneof = "user_geo::HasSubdivision", tags = "4")] + pub has_subdivision: ::core::option::Option, + } + /// Nested message and enum types in `UserGeo`. + pub mod user_geo { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasCity { + #[prost(string, tag = "1")] + City(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasCountryCode { + #[prost(string, tag = "2")] + CountryCode(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasRegion { + #[prost(string, tag = "3")] + Region(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasSubdivision { + #[prost(string, tag = "4")] + Subdivision(::prost::alloc::string::String), + } + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasData { + #[prost(message, tag = "1")] + Data(::prost_types::Value), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasEmail { + #[prost(string, tag = "2")] + Email(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasGeo { + #[prost(message, tag = "3")] + Geo(UserGeo), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasId { + #[prost(string, tag = "4")] + Id(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasIpAddress { + #[prost(string, tag = "5")] + IpAddress(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasName { + #[prost(string, tag = "6")] + Name(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasSegment { + #[prost(string, tag = "7")] + Segment(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasSentryUser { + #[prost(string, tag = "8")] + SentryUser(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasUsername { + #[prost(string, tag = "9")] + Username(::prost::alloc::string::String), + } +} +/// +/// Feedback context. +/// +/// This contexts contains user feedback specific attributes. +/// We don't PII scrub contact_email as that is provided by the user. +/// TODO(jferg): rename to FeedbackContext once old UserReport logic is deprecated. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Userreportv2Context { + #[prost(oneof = "userreportv2_context::HasContactEmail", tags = "1")] + pub has_contact_email: ::core::option::Option, + #[prost(oneof = "userreportv2_context::HasMessage", tags = "2")] + pub has_message: ::core::option::Option, +} +/// Nested message and enum types in `Userreportv2Context`. +pub mod userreportv2_context { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasContactEmail { + #[prost(string, tag = "1")] + ContactEmail(::prost::alloc::string::String), + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum HasMessage { + #[prost(string, tag = "2")] + Message(::prost::alloc::string::String), + } +} diff --git a/sentry_protos/src/sentry_protos.seer.v1.rs b/sentry_protos/src/sentry_protos.seer.v1.rs new file mode 100644 index 00000000000..b4c191751c1 --- /dev/null +++ b/sentry_protos/src/sentry_protos.seer.v1.rs @@ -0,0 +1,309 @@ +// This file is @generated by prost-build. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SentryEventData { + #[prost(string, tag = "1")] + pub title: ::prost::alloc::string::String, + #[prost(message, repeated, tag = "2")] + pub entries: ::prost::alloc::vec::Vec<::prost_types::Value>, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct IssueDetails { + #[prost(uint64, tag = "1")] + pub id: u64, + #[prost(string, tag = "2")] + pub title: ::prost::alloc::string::String, + /// optional + #[prost(string, tag = "3")] + pub short_id: ::prost::alloc::string::String, + #[prost(message, repeated, tag = "4")] + pub events: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SummarizeRequest { + #[prost(uint64, tag = "1")] + pub group_id: u64, + #[prost(uint64, tag = "2")] + pub organization_id: u64, + #[prost(string, tag = "3")] + pub organization_slug: ::prost::alloc::string::String, + #[prost(uint64, tag = "4")] + pub project_id: u64, + #[prost(message, repeated, tag = "5")] + pub connected_issues: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SummarizeResponse { + #[prost(uint64, tag = "1")] + pub group_id: u64, + #[prost(string, tag = "2")] + pub headline: ::prost::alloc::string::String, + #[prost(string, tag = "3")] + pub summary: ::prost::alloc::string::String, + #[prost(string, tag = "4")] + pub impact: ::prost::alloc::string::String, +} +/// Generated client implementations. +pub mod issue_summary_service_client { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::http::Uri; + use tonic::codegen::*; + #[derive(Debug, Clone)] + pub struct IssueSummaryServiceClient { + inner: tonic::client::Grpc, + } + impl IssueSummaryServiceClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl IssueSummaryServiceClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + std::marker::Send + 'static, + ::Error: Into + std::marker::Send, + { + pub fn new(inner: T) -> Self { + let inner = tonic::client::Grpc::new(inner); + Self { inner } + } + pub fn with_origin(inner: T, origin: Uri) -> Self { + let inner = tonic::client::Grpc::with_origin(inner, origin); + Self { inner } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> IssueSummaryServiceClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + >>::Error: + Into + std::marker::Send + std::marker::Sync, + { + IssueSummaryServiceClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_encoding_message_size(limit); + self + } + pub async fn summarize( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/sentry_protos.seer.v1.IssueSummaryService/Summarize", + ); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "sentry_protos.seer.v1.IssueSummaryService", + "Summarize", + )); + self.inner.unary(req, path, codec).await + } + } +} +/// Generated server implementations. +pub mod issue_summary_service_server { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + /// Generated trait containing gRPC methods that should be implemented for use with IssueSummaryServiceServer. + #[async_trait] + pub trait IssueSummaryService: std::marker::Send + std::marker::Sync + 'static { + async fn summarize( + &self, + request: tonic::Request, + ) -> std::result::Result, tonic::Status>; + } + #[derive(Debug)] + pub struct IssueSummaryServiceServer { + inner: Arc, + accept_compression_encodings: EnabledCompressionEncodings, + send_compression_encodings: EnabledCompressionEncodings, + max_decoding_message_size: Option, + max_encoding_message_size: Option, + } + impl IssueSummaryServiceServer { + pub fn new(inner: T) -> Self { + Self::from_arc(Arc::new(inner)) + } + pub fn from_arc(inner: Arc) -> Self { + Self { + inner, + accept_compression_encodings: Default::default(), + send_compression_encodings: Default::default(), + max_decoding_message_size: None, + max_encoding_message_size: None, + } + } + pub fn with_interceptor(inner: T, interceptor: F) -> InterceptedService + where + F: tonic::service::Interceptor, + { + InterceptedService::new(Self::new(inner), interceptor) + } + /// Enable decompressing requests with the given encoding. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.accept_compression_encodings.enable(encoding); + self + } + /// Compress responses with the given encoding, if the client supports it. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.send_compression_encodings.enable(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.max_decoding_message_size = Some(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.max_encoding_message_size = Some(limit); + self + } + } + impl tonic::codegen::Service> for IssueSummaryServiceServer + where + T: IssueSummaryService, + B: Body + std::marker::Send + 'static, + B::Error: Into + std::marker::Send + 'static, + { + type Response = http::Response; + type Error = std::convert::Infallible; + type Future = BoxFuture; + fn poll_ready( + &mut self, + _cx: &mut Context<'_>, + ) -> Poll> { + Poll::Ready(Ok(())) + } + fn call(&mut self, req: http::Request) -> Self::Future { + match req.uri().path() { + "/sentry_protos.seer.v1.IssueSummaryService/Summarize" => { + #[allow(non_camel_case_types)] + struct SummarizeSvc(pub Arc); + impl + tonic::server::UnaryService for SummarizeSvc + { + type Response = super::SummarizeResponse; + type Future = BoxFuture, tonic::Status>; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::summarize(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let method = SummarizeSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + _ => Box::pin(async move { + Ok(http::Response::builder() + .status(200) + .header("grpc-status", tonic::Code::Unimplemented as i32) + .header( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ) + .body(empty_body()) + .unwrap()) + }), + } + } + } + impl Clone for IssueSummaryServiceServer { + fn clone(&self) -> Self { + let inner = self.inner.clone(); + Self { + inner, + accept_compression_encodings: self.accept_compression_encodings, + send_compression_encodings: self.send_compression_encodings, + max_decoding_message_size: self.max_decoding_message_size, + max_encoding_message_size: self.max_encoding_message_size, + } + } + } + /// Generated gRPC service name + pub const SERVICE_NAME: &str = "sentry_protos.seer.v1.IssueSummaryService"; + impl tonic::server::NamedService for IssueSummaryServiceServer { + const NAME: &'static str = SERVICE_NAME; + } +} diff --git a/sentry_protos/src/sentry_protos.sentry.v1.rs b/sentry_protos/src/sentry_protos.sentry.v1.rs new file mode 100644 index 00000000000..5f925d36341 --- /dev/null +++ b/sentry_protos/src/sentry_protos.sentry.v1.rs @@ -0,0 +1,521 @@ +// This file is @generated by prost-build. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RetryState { + /// Current attempt number + #[prost(int32, tag = "1")] + pub attempts: i32, + /// The classname or adapter type for the retry policy + #[prost(string, tag = "2")] + pub kind: ::prost::alloc::string::String, + /// After this attempt the task should be discarded + #[prost(int32, optional, tag = "3")] + pub discard_after_attempt: ::core::option::Option, + /// After this attempt the task should be put in the dead-letter-queue. + #[prost(int32, optional, tag = "4")] + pub deadletter_after_attempt: ::core::option::Option, + /// Whether a task should be executed at most once. + #[prost(bool, optional, tag = "5")] + pub at_most_once: ::core::option::Option, +} +/// Task message that is stored in Kafka. +/// Once consumed, TaskActivations are wrapped with InflightActivation to track +/// additional state +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TaskActivation { + /// A GUID for the task. Used to update tasks + #[prost(string, tag = "1")] + pub id: ::prost::alloc::string::String, + /// The task namespace + #[prost(string, tag = "2")] + pub namespace: ::prost::alloc::string::String, + /// The name of the task. This name is resolved within the worker + #[prost(string, tag = "3")] + pub taskname: ::prost::alloc::string::String, + /// An opaque parameter collection. Could be JSON or protobuf encoded + #[prost(string, tag = "4")] + pub parameters: ::prost::alloc::string::String, + /// A map of headers for the task. + #[prost(map = "string, string", tag = "5")] + pub headers: + ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + /// The timestamp a task was stored in Kafka + #[prost(message, optional, tag = "6")] + pub received_at: ::core::option::Option<::prost_types::Timestamp>, + /// Unused. Use expires instead. + #[deprecated] + #[prost(message, optional, tag = "7")] + pub deadline: ::core::option::Option<::prost_types::Timestamp>, + /// Retry state + #[prost(message, optional, tag = "8")] + pub retry_state: ::core::option::Option, + /// The duration in seconds that a worker has to complete task execution. + /// When an activation is moved from pending -> processing a result is expected + /// in this many seconds. + #[prost(uint64, tag = "9")] + pub processing_deadline_duration: u64, + /// The duration in seconds that a task has to start execution. + /// After received_at + expires has passed an activation is expired and will not be executed. + #[prost(uint64, optional, tag = "10")] + pub expires: ::core::option::Option, + /// The duration in seconds that a task must wait to begin execution after it is emitted. + /// After received_at + delay has passed, the activation will become pending. + #[prost(uint64, optional, tag = "11")] + pub delay: ::core::option::Option, +} +/// Once a TaskActivation has been received by the task consumer it is wrapped +/// with InflightActivation so that processing state can be tracked. +/// This proto might not be used as InflightActivations don't need to cross +/// process boundaries. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct InflightActivation { + /// The TaskActivation being tracked. + #[prost(message, optional, tag = "1")] + pub activation: ::core::option::Option, + /// The current status + #[prost(enumeration = "TaskActivationStatus", tag = "2")] + pub status: i32, + /// The original offset that the WorkerTask message had + /// Used to find contiguous blocks of completed tasks so that offsets + /// can be commit to Kafka + #[prost(int64, tag = "3")] + pub offset: i64, + /// The timestamp this task was added to PendingTask storage + #[prost(message, optional, tag = "4")] + pub added_at: ::core::option::Option<::prost_types::Timestamp>, + /// The timestamp that this task expires and should be deadlettered. + #[prost(message, optional, tag = "5")] + pub deadletter_at: ::core::option::Option<::prost_types::Timestamp>, + /// The timestamp that processing is expected to be complete by. + /// If processing is not complete by this time, a retry will be attempted. + #[prost(message, optional, tag = "6")] + pub processing_deadline: ::core::option::Option<::prost_types::Timestamp>, +} +/// ////////////////////////// +/// RPC messages and services +/// ////////////////////////// +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Error { + /// Taken directly from the grpc docs. + #[prost(int32, tag = "1")] + pub code: i32, + #[prost(string, tag = "2")] + pub message: ::prost::alloc::string::String, + /// A list of messages that carry any error details. + #[prost(message, repeated, tag = "3")] + pub details: ::prost::alloc::vec::Vec<::prost_types::Any>, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetTaskRequest { + #[prost(string, optional, tag = "1")] + pub namespace: ::core::option::Option<::prost::alloc::string::String>, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetTaskResponse { + /// If there are no tasks available, these will be empty + #[prost(message, optional, tag = "1")] + pub task: ::core::option::Option, + #[prost(message, optional, tag = "3")] + pub error: ::core::option::Option, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FetchNextTask { + #[prost(string, optional, tag = "1")] + pub namespace: ::core::option::Option<::prost::alloc::string::String>, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetTaskStatusRequest { + #[prost(string, tag = "1")] + pub id: ::prost::alloc::string::String, + #[prost(enumeration = "TaskActivationStatus", tag = "3")] + pub status: i32, + /// If fetch_next is provided, receive a new task in the response + #[deprecated] + #[prost(bool, optional, tag = "4")] + pub fetch_next: ::core::option::Option, + #[deprecated] + #[prost(string, optional, tag = "5")] + pub fetch_next_namespace: ::core::option::Option<::prost::alloc::string::String>, + #[prost(message, optional, tag = "6")] + pub fetch_next_task: ::core::option::Option, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetTaskStatusResponse { + /// The next task the worker should execute. Requires fetch_next to be set on the request. + #[prost(message, optional, tag = "1")] + pub task: ::core::option::Option, + #[prost(message, optional, tag = "3")] + pub error: ::core::option::Option, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum TaskActivationStatus { + Unspecified = 0, + Pending = 1, + Processing = 2, + Failure = 3, + Retry = 4, + Complete = 5, +} +impl TaskActivationStatus { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + TaskActivationStatus::Unspecified => "TASK_ACTIVATION_STATUS_UNSPECIFIED", + TaskActivationStatus::Pending => "TASK_ACTIVATION_STATUS_PENDING", + TaskActivationStatus::Processing => "TASK_ACTIVATION_STATUS_PROCESSING", + TaskActivationStatus::Failure => "TASK_ACTIVATION_STATUS_FAILURE", + TaskActivationStatus::Retry => "TASK_ACTIVATION_STATUS_RETRY", + TaskActivationStatus::Complete => "TASK_ACTIVATION_STATUS_COMPLETE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "TASK_ACTIVATION_STATUS_UNSPECIFIED" => Some(Self::Unspecified), + "TASK_ACTIVATION_STATUS_PENDING" => Some(Self::Pending), + "TASK_ACTIVATION_STATUS_PROCESSING" => Some(Self::Processing), + "TASK_ACTIVATION_STATUS_FAILURE" => Some(Self::Failure), + "TASK_ACTIVATION_STATUS_RETRY" => Some(Self::Retry), + "TASK_ACTIVATION_STATUS_COMPLETE" => Some(Self::Complete), + _ => None, + } + } +} +/// Generated client implementations. +pub mod consumer_service_client { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::http::Uri; + use tonic::codegen::*; + #[derive(Debug, Clone)] + pub struct ConsumerServiceClient { + inner: tonic::client::Grpc, + } + impl ConsumerServiceClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl ConsumerServiceClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + std::marker::Send + 'static, + ::Error: Into + std::marker::Send, + { + pub fn new(inner: T) -> Self { + let inner = tonic::client::Grpc::new(inner); + Self { inner } + } + pub fn with_origin(inner: T, origin: Uri) -> Self { + let inner = tonic::client::Grpc::with_origin(inner, origin); + Self { inner } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> ConsumerServiceClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + >>::Error: + Into + std::marker::Send + std::marker::Sync, + { + ConsumerServiceClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_encoding_message_size(limit); + self + } + /// Fetch a new task activation to process. + pub async fn get_task( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/sentry_protos.sentry.v1.ConsumerService/GetTask", + ); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "sentry_protos.sentry.v1.ConsumerService", + "GetTask", + )); + self.inner.unary(req, path, codec).await + } + /// Update the state of a task with execution results. + pub async fn set_task_status( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/sentry_protos.sentry.v1.ConsumerService/SetTaskStatus", + ); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "sentry_protos.sentry.v1.ConsumerService", + "SetTaskStatus", + )); + self.inner.unary(req, path, codec).await + } + } +} +/// Generated server implementations. +pub mod consumer_service_server { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + /// Generated trait containing gRPC methods that should be implemented for use with ConsumerServiceServer. + #[async_trait] + pub trait ConsumerService: std::marker::Send + std::marker::Sync + 'static { + /// Fetch a new task activation to process. + async fn get_task( + &self, + request: tonic::Request, + ) -> std::result::Result, tonic::Status>; + /// Update the state of a task with execution results. + async fn set_task_status( + &self, + request: tonic::Request, + ) -> std::result::Result, tonic::Status>; + } + #[derive(Debug)] + pub struct ConsumerServiceServer { + inner: Arc, + accept_compression_encodings: EnabledCompressionEncodings, + send_compression_encodings: EnabledCompressionEncodings, + max_decoding_message_size: Option, + max_encoding_message_size: Option, + } + impl ConsumerServiceServer { + pub fn new(inner: T) -> Self { + Self::from_arc(Arc::new(inner)) + } + pub fn from_arc(inner: Arc) -> Self { + Self { + inner, + accept_compression_encodings: Default::default(), + send_compression_encodings: Default::default(), + max_decoding_message_size: None, + max_encoding_message_size: None, + } + } + pub fn with_interceptor(inner: T, interceptor: F) -> InterceptedService + where + F: tonic::service::Interceptor, + { + InterceptedService::new(Self::new(inner), interceptor) + } + /// Enable decompressing requests with the given encoding. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.accept_compression_encodings.enable(encoding); + self + } + /// Compress responses with the given encoding, if the client supports it. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.send_compression_encodings.enable(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.max_decoding_message_size = Some(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.max_encoding_message_size = Some(limit); + self + } + } + impl tonic::codegen::Service> for ConsumerServiceServer + where + T: ConsumerService, + B: Body + std::marker::Send + 'static, + B::Error: Into + std::marker::Send + 'static, + { + type Response = http::Response; + type Error = std::convert::Infallible; + type Future = BoxFuture; + fn poll_ready( + &mut self, + _cx: &mut Context<'_>, + ) -> Poll> { + Poll::Ready(Ok(())) + } + fn call(&mut self, req: http::Request) -> Self::Future { + match req.uri().path() { + "/sentry_protos.sentry.v1.ConsumerService/GetTask" => { + #[allow(non_camel_case_types)] + struct GetTaskSvc(pub Arc); + impl tonic::server::UnaryService for GetTaskSvc { + type Response = super::GetTaskResponse; + type Future = BoxFuture, tonic::Status>; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::get_task(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let method = GetTaskSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/sentry_protos.sentry.v1.ConsumerService/SetTaskStatus" => { + #[allow(non_camel_case_types)] + struct SetTaskStatusSvc(pub Arc); + impl + tonic::server::UnaryService + for SetTaskStatusSvc + { + type Response = super::SetTaskStatusResponse; + type Future = BoxFuture, tonic::Status>; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::set_task_status(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let method = SetTaskStatusSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + _ => Box::pin(async move { + Ok(http::Response::builder() + .status(200) + .header("grpc-status", tonic::Code::Unimplemented as i32) + .header( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ) + .body(empty_body()) + .unwrap()) + }), + } + } + } + impl Clone for ConsumerServiceServer { + fn clone(&self) -> Self { + let inner = self.inner.clone(); + Self { + inner, + accept_compression_encodings: self.accept_compression_encodings, + send_compression_encodings: self.send_compression_encodings, + max_decoding_message_size: self.max_decoding_message_size, + max_encoding_message_size: self.max_encoding_message_size, + } + } + } + /// Generated gRPC service name + pub const SERVICE_NAME: &str = "sentry_protos.sentry.v1.ConsumerService"; + impl tonic::server::NamedService for ConsumerServiceServer { + const NAME: &'static str = SERVICE_NAME; + } +} diff --git a/sentry_protos/src/sentry_protos.snuba.v1.rs b/sentry_protos/src/sentry_protos.snuba.v1.rs new file mode 100644 index 00000000000..1891230ac21 --- /dev/null +++ b/sentry_protos/src/sentry_protos.snuba.v1.rs @@ -0,0 +1,1822 @@ +// This file is @generated by prost-build. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AttributeKey { + #[prost(enumeration = "attribute_key::Type", tag = "1")] + pub r#type: i32, + /// the name of the trace item attribute, everything that sentry sends by default is prefixed with + /// `sentry.` to allow users to send attributes of the same name. + /// Exampe: `sentry.duration`, `sentry.span_id` etc + #[prost(string, tag = "2")] + pub name: ::prost::alloc::string::String, +} +/// Nested message and enum types in `AttributeKey`. +pub mod attribute_key { + /// this mostly reflects what types are able to be ingested, see eap_spans consumer for ingest details + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[repr(i32)] + pub enum Type { + /// protobuf requirement, do not send this + Unspecified = 0, + String = 1, + Boolean = 2, + /// deprecated, use TYPE_DOUBLE instead + Float = 3, + /// note: all numbers are stored as float64, so massive integers can be rounded. USE STRING FOR IDS. + Int = 4, + Double = 5, + } + impl Type { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Type::Unspecified => "TYPE_UNSPECIFIED", + Type::String => "TYPE_STRING", + Type::Boolean => "TYPE_BOOLEAN", + Type::Float => "TYPE_FLOAT", + Type::Int => "TYPE_INT", + Type::Double => "TYPE_DOUBLE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "TYPE_UNSPECIFIED" => Some(Self::Unspecified), + "TYPE_STRING" => Some(Self::String), + "TYPE_BOOLEAN" => Some(Self::Boolean), + "TYPE_FLOAT" => Some(Self::Float), + "TYPE_INT" => Some(Self::Int), + "TYPE_DOUBLE" => Some(Self::Double), + _ => None, + } + } + } +} +/// custom mappings of column values +/// +/// for example, `project_name` is changeable by the user and not stored in EAP, +/// but sorting by it may be desired. So something like this might be done: +/// +/// ORDER BY sentry.project_name +/// VirtualColumnContext( +/// from_column_name="sentry.project_id", +/// to_column_name="sentry.project_name", +/// value_map={"1": "sentry", "2": "snuba"}, +/// ) +/// +/// in this example `sentry.project_name` is a virtual column created by mapping +/// values from the real column `sentry.project_id` to new values. project_id of 1 +/// gets mapped to project_name="sentry" etc. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VirtualColumnContext { + #[prost(string, tag = "1")] + pub from_column_name: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub to_column_name: ::prost::alloc::string::String, + #[prost(map = "string, string", tag = "3")] + pub value_map: + ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + #[prost(string, tag = "4")] + pub default_value: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct StrArray { + #[prost(string, repeated, tag = "1")] + pub values: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct IntArray { + #[prost(int64, repeated, tag = "1")] + pub values: ::prost::alloc::vec::Vec, +} +/// DEPRECATED, use DoubleArray instead +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FloatArray { + #[prost(float, repeated, tag = "1")] + pub values: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DoubleArray { + #[prost(double, repeated, tag = "1")] + pub values: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AttributeValue { + /// true if the value is null + #[prost(bool, tag = "11")] + pub is_null: bool, + #[prost( + oneof = "attribute_value::Value", + tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10" + )] + pub value: ::core::option::Option, +} +/// Nested message and enum types in `AttributeValue`. +pub mod attribute_value { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Value { + #[prost(bool, tag = "1")] + ValBool(bool), + #[prost(string, tag = "2")] + ValStr(::prost::alloc::string::String), + /// deprecated, use val_double instead + #[prost(float, tag = "3")] + ValFloat(f32), + #[prost(int64, tag = "4")] + ValInt(i64), + /// set to true if value is null + #[prost(bool, tag = "5")] + ValNull(bool), + #[prost(message, tag = "6")] + ValStrArray(super::StrArray), + #[prost(message, tag = "7")] + ValIntArray(super::IntArray), + /// deprecated, use val_double_array instead + #[prost(message, tag = "8")] + ValFloatArray(super::FloatArray), + #[prost(double, tag = "9")] + ValDouble(f64), + #[prost(message, tag = "10")] + ValDoubleArray(super::DoubleArray), + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AttributeAggregation { + #[prost(enumeration = "Function", tag = "1")] + pub aggregate: i32, + #[prost(message, optional, tag = "2")] + pub key: ::core::option::Option, + #[prost(string, tag = "3")] + pub label: ::prost::alloc::string::String, + #[prost(enumeration = "ExtrapolationMode", tag = "4")] + pub extrapolation_mode: i32, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum Function { + Unspecified = 0, + Sum = 1, + Average = 2, + Count = 3, + P50 = 4, + P75 = 12, + P90 = 5, + P95 = 6, + P99 = 7, + Avg = 8, + Max = 9, + Min = 10, + Uniq = 11, +} +impl Function { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Function::Unspecified => "FUNCTION_UNSPECIFIED", + Function::Sum => "FUNCTION_SUM", + Function::Average => "FUNCTION_AVERAGE", + Function::Count => "FUNCTION_COUNT", + Function::P50 => "FUNCTION_P50", + Function::P75 => "FUNCTION_P75", + Function::P90 => "FUNCTION_P90", + Function::P95 => "FUNCTION_P95", + Function::P99 => "FUNCTION_P99", + Function::Avg => "FUNCTION_AVG", + Function::Max => "FUNCTION_MAX", + Function::Min => "FUNCTION_MIN", + Function::Uniq => "FUNCTION_UNIQ", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "FUNCTION_UNSPECIFIED" => Some(Self::Unspecified), + "FUNCTION_SUM" => Some(Self::Sum), + "FUNCTION_AVERAGE" => Some(Self::Average), + "FUNCTION_COUNT" => Some(Self::Count), + "FUNCTION_P50" => Some(Self::P50), + "FUNCTION_P75" => Some(Self::P75), + "FUNCTION_P90" => Some(Self::P90), + "FUNCTION_P95" => Some(Self::P95), + "FUNCTION_P99" => Some(Self::P99), + "FUNCTION_AVG" => Some(Self::Avg), + "FUNCTION_MAX" => Some(Self::Max), + "FUNCTION_MIN" => Some(Self::Min), + "FUNCTION_UNIQ" => Some(Self::Uniq), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum ExtrapolationMode { + Unspecified = 0, + None = 1, + SampleWeighted = 2, +} +impl ExtrapolationMode { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ExtrapolationMode::Unspecified => "EXTRAPOLATION_MODE_UNSPECIFIED", + ExtrapolationMode::None => "EXTRAPOLATION_MODE_NONE", + ExtrapolationMode::SampleWeighted => "EXTRAPOLATION_MODE_SAMPLE_WEIGHTED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "EXTRAPOLATION_MODE_UNSPECIFIED" => Some(Self::Unspecified), + "EXTRAPOLATION_MODE_NONE" => Some(Self::None), + "EXTRAPOLATION_MODE_SAMPLE_WEIGHTED" => Some(Self::SampleWeighted), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum Reliability { + Unspecified = 0, + Low = 1, + High = 2, +} +impl Reliability { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Reliability::Unspecified => "RELIABILITY_UNSPECIFIED", + Reliability::Low => "RELIABILITY_LOW", + Reliability::High => "RELIABILITY_HIGH", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "RELIABILITY_UNSPECIFIED" => Some(Self::Unspecified), + "RELIABILITY_LOW" => Some(Self::Low), + "RELIABILITY_HIGH" => Some(Self::High), + _ => None, + } + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AndFilter { + #[prost(message, repeated, tag = "1")] + pub filters: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct OrFilter { + #[prost(message, repeated, tag = "1")] + pub filters: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct NotFilter { + #[prost(message, repeated, tag = "1")] + pub filters: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ComparisonFilter { + #[prost(message, optional, tag = "1")] + pub key: ::core::option::Option, + #[prost(enumeration = "comparison_filter::Op", tag = "2")] + pub op: i32, + #[prost(message, optional, tag = "3")] + pub value: ::core::option::Option, + /// optional, if set will ignore case for string comparisons + #[prost(bool, tag = "4")] + pub ignore_case: bool, +} +/// Nested message and enum types in `ComparisonFilter`. +pub mod comparison_filter { + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[repr(i32)] + pub enum Op { + Unspecified = 0, + LessThan = 1, + GreaterThan = 2, + LessThanOrEquals = 3, + GreaterThanOrEquals = 4, + Equals = 5, + NotEquals = 6, + /// string only + Like = 7, + /// string only + NotLike = 8, + /// array only + In = 9, + /// array only + NotIn = 10, + } + impl Op { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Op::Unspecified => "OP_UNSPECIFIED", + Op::LessThan => "OP_LESS_THAN", + Op::GreaterThan => "OP_GREATER_THAN", + Op::LessThanOrEquals => "OP_LESS_THAN_OR_EQUALS", + Op::GreaterThanOrEquals => "OP_GREATER_THAN_OR_EQUALS", + Op::Equals => "OP_EQUALS", + Op::NotEquals => "OP_NOT_EQUALS", + Op::Like => "OP_LIKE", + Op::NotLike => "OP_NOT_LIKE", + Op::In => "OP_IN", + Op::NotIn => "OP_NOT_IN", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "OP_UNSPECIFIED" => Some(Self::Unspecified), + "OP_LESS_THAN" => Some(Self::LessThan), + "OP_GREATER_THAN" => Some(Self::GreaterThan), + "OP_LESS_THAN_OR_EQUALS" => Some(Self::LessThanOrEquals), + "OP_GREATER_THAN_OR_EQUALS" => Some(Self::GreaterThanOrEquals), + "OP_EQUALS" => Some(Self::Equals), + "OP_NOT_EQUALS" => Some(Self::NotEquals), + "OP_LIKE" => Some(Self::Like), + "OP_NOT_LIKE" => Some(Self::NotLike), + "OP_IN" => Some(Self::In), + "OP_NOT_IN" => Some(Self::NotIn), + _ => None, + } + } + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ExistsFilter { + #[prost(message, optional, tag = "1")] + pub key: ::core::option::Option, +} +/// a condition used to filter for matching "trace items" +/// +/// ex: "exists span.duration" would mean +/// "only give me trace items that have the attribute 'span.duration'" +/// +/// ( traces contain trace items, +/// eg. trace items are: span, replay, error, etc, +/// trace items contain attributes like 'span.duration' ) +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TraceItemFilter { + #[prost(oneof = "trace_item_filter::Value", tags = "1, 2, 3, 4, 5")] + pub value: ::core::option::Option, +} +/// Nested message and enum types in `TraceItemFilter`. +pub mod trace_item_filter { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Value { + #[prost(message, tag = "1")] + AndFilter(super::AndFilter), + #[prost(message, tag = "2")] + OrFilter(super::OrFilter), + #[prost(message, tag = "3")] + NotFilter(super::NotFilter), + #[prost(message, tag = "4")] + ComparisonFilter(super::ComparisonFilter), + #[prost(message, tag = "5")] + ExistsFilter(super::ExistsFilter), + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AttributeConditionalAggregation { + #[prost(enumeration = "Function", tag = "1")] + pub aggregate: i32, + #[prost(message, optional, tag = "2")] + pub key: ::core::option::Option, + #[prost(string, tag = "3")] + pub label: ::prost::alloc::string::String, + #[prost(enumeration = "ExtrapolationMode", tag = "4")] + pub extrapolation_mode: i32, + #[prost(message, optional, tag = "5")] + pub filter: ::core::option::Option, +} +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct DownsampledStorageConfig { + #[prost(enumeration = "downsampled_storage_config::Mode", tag = "1")] + pub mode: i32, +} +/// Nested message and enum types in `DownsampledStorageConfig`. +pub mod downsampled_storage_config { + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[repr(i32)] + pub enum Mode { + Unspecified = 0, + /// deprecated, treated as NORMAL mode + Preflight = 1, + /// deprecated, treated as NORMAL mode + BestEffort = 2, + /// NORMAL queries are served faster and should not time out + /// EAP will route to whatever tier it needs to in order to facilitate this + /// The return payload from EAP will inform the client if there is a higher fidelity tier to scan + Normal = 3, + /// HIGHEST_ACCURACY queries go straight to tier 1 + HighestAccuracy = 4, + } + impl Mode { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Mode::Unspecified => "MODE_UNSPECIFIED", + Mode::Preflight => "MODE_PREFLIGHT", + Mode::BestEffort => "MODE_BEST_EFFORT", + Mode::Normal => "MODE_NORMAL", + Mode::HighestAccuracy => "MODE_HIGHEST_ACCURACY", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "MODE_UNSPECIFIED" => Some(Self::Unspecified), + "MODE_PREFLIGHT" => Some(Self::Preflight), + "MODE_BEST_EFFORT" => Some(Self::BestEffort), + "MODE_NORMAL" => Some(Self::Normal), + "MODE_HIGHEST_ACCURACY" => Some(Self::HighestAccuracy), + _ => None, + } + } + } +} +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct DownsampledStorageMeta { + /// deprecated, only use can_go_to_higher_accuracy_tier + #[prost(enumeration = "downsampled_storage_meta::SelectedTier", tag = "1")] + pub tier: i32, + /// how many rows did the estimator think this query would scan + /// 0 means the estimator was not run + /// deprecated, only use can_go_to_higher_accuracy_tier + #[prost(uint64, tag = "2")] + pub estimated_num_rows: u64, + /// if there exists a higher accuracy tier that this query could route to + /// note that if this query goes to a higher accuracy tier, it could potentially time out + #[prost(bool, tag = "3")] + pub can_go_to_higher_accuracy_tier: bool, +} +/// Nested message and enum types in `DownsampledStorageMeta`. +pub mod downsampled_storage_meta { + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[repr(i32)] + pub enum SelectedTier { + Unspecified = 0, + SelectedTier1 = 1, + SelectedTier8 = 2, + SelectedTier64 = 3, + SelectedTier512 = 4, + } + impl SelectedTier { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + SelectedTier::Unspecified => "SELECTED_TIER_UNSPECIFIED", + SelectedTier::SelectedTier1 => "SELECTED_TIER_1", + SelectedTier::SelectedTier8 => "SELECTED_TIER_8", + SelectedTier::SelectedTier64 => "SELECTED_TIER_64", + SelectedTier::SelectedTier512 => "SELECTED_TIER_512", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "SELECTED_TIER_UNSPECIFIED" => Some(Self::Unspecified), + "SELECTED_TIER_1" => Some(Self::SelectedTier1), + "SELECTED_TIER_8" => Some(Self::SelectedTier8), + "SELECTED_TIER_64" => Some(Self::SelectedTier64), + "SELECTED_TIER_512" => Some(Self::SelectedTier512), + _ => None, + } + } + } +} +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct Literal { + #[prost(oneof = "literal::Value", tags = "1")] + pub value: ::core::option::Option, +} +/// Nested message and enum types in `Literal`. +pub mod literal { + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum Value { + #[prost(double, tag = "1")] + ValDouble(f64), + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RequestMeta { + /// id of the organization we are querying data for + #[prost(uint64, tag = "1")] + pub organization_id: u64, + /// used for logging and metrics, ex: "snuba_admin", "eap", "replays", etc + #[prost(string, tag = "2")] + pub cogs_category: ::prost::alloc::string::String, + /// identifier for where the request is coming from + /// ex: "api.profiling.landing-chart", "api.replay.details-page" + #[prost(string, tag = "3")] + pub referrer: ::prost::alloc::string::String, + /// ids of the projects we are querying data for + #[prost(uint64, repeated, tag = "4")] + pub project_ids: ::prost::alloc::vec::Vec, + /// start timestamp we want to query data for + #[prost(message, optional, tag = "5")] + pub start_timestamp: ::core::option::Option<::prost_types::Timestamp>, + /// end timestamp we want to query data for + #[prost(message, optional, tag = "6")] + pub end_timestamp: ::core::option::Option<::prost_types::Timestamp>, + /// DEPRECATED (not implemented) - use trace_item_type instead + #[deprecated] + #[prost(enumeration = "TraceItemName", tag = "7")] + pub trace_item_name: i32, + /// the type of the trace item you are querying + #[prost(enumeration = "TraceItemType", tag = "8")] + pub trace_item_type: i32, + /// whether to include debug information in the response + #[prost(bool, tag = "10")] + pub debug: bool, + /// a unique identifier for the request, user doesnt need to set this + #[prost(string, tag = "11")] + pub request_id: ::prost::alloc::string::String, + /// how to query the downsampled storages + #[prost(message, optional, tag = "12")] + pub downsampled_storage_config: ::core::option::Option, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResponseMeta { + /// id of the request that this response relates to + #[prost(string, tag = "1")] + pub request_id: ::prost::alloc::string::String, + /// Optional field that is included only if debug is true + #[prost(message, repeated, tag = "2")] + pub query_info: ::prost::alloc::vec::Vec, + /// metadata of how the query interacted wit the downsampled storages + #[prost(message, optional, tag = "3")] + pub downsampled_storage_meta: ::core::option::Option, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PageToken { + #[prost(oneof = "page_token::Value", tags = "1, 2")] + pub value: ::core::option::Option, +} +/// Nested message and enum types in `PageToken`. +pub mod page_token { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Value { + /// standard limit/offset pagination + #[prost(uint64, tag = "1")] + Offset(u64), + /// Instead of using offset (which requires all the scanning and ordering), + /// the server sends back a filter clause to be added on to the filter conditions + /// which skips the previous results altogether, avoiding extra scanning and sorting + #[prost(message, tag = "2")] + FilterOffset(super::TraceItemFilter), + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryStats { + #[prost(int64, tag = "1")] + pub rows_read: i64, + #[prost(int64, tag = "2")] + pub columns_read: i64, + #[prost(int32, tag = "4")] + pub blocks: i32, + #[prost(int64, tag = "5")] + pub progress_bytes: i64, + #[prost(int32, tag = "8")] + pub max_threads: i32, + #[prost(message, optional, tag = "11")] + pub timing_marks: ::core::option::Option, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryMetadata { + #[prost(string, tag = "1")] + pub sql: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub status: ::prost::alloc::string::String, + #[prost(string, tag = "3")] + pub clickhouse_table: ::prost::alloc::string::String, + #[prost(bool, tag = "4")] + pub r#final: bool, + #[prost(string, tag = "6")] + pub query_id: ::prost::alloc::string::String, + #[prost(bool, tag = "7")] + pub consistent: bool, + #[prost(bool, tag = "9")] + pub cache_hit: bool, + #[prost(string, tag = "10")] + pub cluster_name: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TimingMarks { + #[prost(int64, tag = "1")] + pub duration_ms: i64, + #[prost(map = "string, int64", tag = "2")] + pub marks_ms: ::std::collections::HashMap<::prost::alloc::string::String, i64>, + #[prost(map = "string, string", tag = "3")] + pub tags: + ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + #[prost(int64, tag = "4")] + pub timestamp: i64, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryInfo { + #[prost(message, optional, tag = "1")] + pub stats: ::core::option::Option, + #[prost(message, optional, tag = "2")] + pub metadata: ::core::option::Option, + #[prost(string, tag = "3")] + pub trace_logs: ::prost::alloc::string::String, +} +/// DEPRECATED: use TraceItemType instead +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum TraceItemName { + Unspecified = 0, + EapSpans = 1, + EapErrors = 2, +} +impl TraceItemName { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + TraceItemName::Unspecified => "TRACE_ITEM_NAME_UNSPECIFIED", + TraceItemName::EapSpans => "TRACE_ITEM_NAME_EAP_SPANS", + TraceItemName::EapErrors => "TRACE_ITEM_NAME_EAP_ERRORS", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "TRACE_ITEM_NAME_UNSPECIFIED" => Some(Self::Unspecified), + "TRACE_ITEM_NAME_EAP_SPANS" => Some(Self::EapSpans), + "TRACE_ITEM_NAME_EAP_ERRORS" => Some(Self::EapErrors), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum TraceItemType { + Unspecified = 0, + Span = 1, + Error = 2, + Log = 3, + UptimeCheck = 4, +} +impl TraceItemType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + TraceItemType::Unspecified => "TRACE_ITEM_TYPE_UNSPECIFIED", + TraceItemType::Span => "TRACE_ITEM_TYPE_SPAN", + TraceItemType::Error => "TRACE_ITEM_TYPE_ERROR", + TraceItemType::Log => "TRACE_ITEM_TYPE_LOG", + TraceItemType::UptimeCheck => "TRACE_ITEM_TYPE_UPTIME_CHECK", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "TRACE_ITEM_TYPE_UNSPECIFIED" => Some(Self::Unspecified), + "TRACE_ITEM_TYPE_SPAN" => Some(Self::Span), + "TRACE_ITEM_TYPE_ERROR" => Some(Self::Error), + "TRACE_ITEM_TYPE_LOG" => Some(Self::Log), + "TRACE_ITEM_TYPE_UPTIME_CHECK" => Some(Self::UptimeCheck), + _ => None, + } + } +} +/// This is a request to the TimeSeries endpoint, +/// it is used to do a timeseries aggregation of a given attribute +/// across traces. +/// +/// ex: avg(span.duration) group by db.system +/// this (conceptually) will return a 2d graph where y-axis is avg(span.duration), +/// x-axis is time, and there is a separate line/function on the graph for each db.system value +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TimeSeriesRequest { + /// metadata about the request + /// used to filter time range, organization, project, etc. + #[prost(message, optional, tag = "1")] + pub meta: ::core::option::Option, + /// filters out spans (TraceItems) that dont meet the criteria + /// ex: avg(span.duration) where span.environment = 'production' + #[prost(message, optional, tag = "2")] + pub filter: ::core::option::Option, + /// deprecated, please use expressions instead + #[deprecated] + #[prost(message, repeated, tag = "3")] + pub aggregations: ::prost::alloc::vec::Vec, + /// the actual aggregation to compute ex: avg(span.duration) or avg(span.duration) / sum(span.duration) + #[prost(message, repeated, tag = "6")] + pub expressions: ::prost::alloc::vec::Vec, + /// the level of detail in the timeseries graph, + /// low granularity is very detailed, high is less detail. + /// ex: if granularity is 1s you will have a data point every 1s, + /// if its 1m you have a data point every 1m + /// tip: for performance, if the query is is over a large time period you should + /// have high granularity + #[prost(uint64, tag = "4")] + pub granularity_secs: u64, + /// attribute key to group by + /// ex: span.environment might give 3 timeseries lines, + /// one for prod, one for dev etc + #[prost(message, repeated, tag = "5")] + pub group_by: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Expression { + #[prost(string, tag = "3")] + pub label: ::prost::alloc::string::String, + #[prost(oneof = "expression::Expression", tags = "1, 2, 4, 5")] + pub expression: ::core::option::Option, +} +/// Nested message and enum types in `Expression`. +pub mod expression { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct BinaryFormula { + #[prost(enumeration = "binary_formula::Op", tag = "1")] + pub op: i32, + #[prost(message, optional, boxed, tag = "2")] + pub left: ::core::option::Option<::prost::alloc::boxed::Box>, + #[prost(message, optional, boxed, tag = "3")] + pub right: ::core::option::Option<::prost::alloc::boxed::Box>, + /// optional, if the formula evalutates to null this value is returned + /// formula can evaluate to null if an attribute is missing for example + #[prost(oneof = "binary_formula::DefaultValue", tags = "4, 5")] + pub default_value: ::core::option::Option, + } + /// Nested message and enum types in `BinaryFormula`. + pub mod binary_formula { + #[derive( + Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration, + )] + #[repr(i32)] + pub enum Op { + Unspecified = 0, + Divide = 1, + Multiply = 2, + Add = 3, + Subtract = 4, + } + impl Op { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Op::Unspecified => "OP_UNSPECIFIED", + Op::Divide => "OP_DIVIDE", + Op::Multiply => "OP_MULTIPLY", + Op::Add => "OP_ADD", + Op::Subtract => "OP_SUBTRACT", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "OP_UNSPECIFIED" => Some(Self::Unspecified), + "OP_DIVIDE" => Some(Self::Divide), + "OP_MULTIPLY" => Some(Self::Multiply), + "OP_ADD" => Some(Self::Add), + "OP_SUBTRACT" => Some(Self::Subtract), + _ => None, + } + } + } + /// optional, if the formula evalutates to null this value is returned + /// formula can evaluate to null if an attribute is missing for example + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum DefaultValue { + #[prost(double, tag = "4")] + DefaultValueDouble(f64), + #[prost(int64, tag = "5")] + DefaultValueInt64(i64), + } + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Expression { + #[prost(message, tag = "1")] + Aggregation(super::AttributeAggregation), + #[prost(message, tag = "2")] + Formula(::prost::alloc::boxed::Box), + #[prost(message, tag = "4")] + ConditionalAggregation(super::AttributeConditionalAggregation), + #[prost(message, tag = "5")] + Literal(super::Literal), + } +} +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct DataPoint { + #[prost(float, tag = "1")] + pub data: f32, + /// false if this datapoint is empty, true otherwise. + /// optional, if not set assume true. + /// used for sparse time series + #[prost(bool, tag = "2")] + pub data_present: bool, + /// only set for extrapolated data points, 0 otherwise + /// the extrapolated avg sampling rate for this data point + #[prost(float, tag = "3")] + pub avg_sampling_rate: f32, + /// deprecated + #[deprecated] + #[prost(bool, tag = "4")] + pub is_reliable: bool, + /// the reliability of the data value based on math based on confidence intervals and sample size + #[prost(enumeration = "Reliability", tag = "5")] + pub reliability: i32, + /// the sample count for this data point + #[prost(int64, tag = "6")] + pub sample_count: i64, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TimeSeries { + #[prost(string, tag = "1")] + pub label: ::prost::alloc::string::String, + /// the names and values of the attribute keys which + /// were in the group by + #[prost(map = "string, string", tag = "2")] + pub group_by_attributes: + ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + /// time bucket for each data point in the timeseries + #[prost(message, repeated, tag = "3")] + pub buckets: ::prost::alloc::vec::Vec<::prost_types::Timestamp>, + #[prost(message, repeated, tag = "4")] + pub data_points: ::prost::alloc::vec::Vec, + /// number of events used to calculate this timeseries + #[prost(uint64, tag = "5")] + pub num_events: u64, + /// deprecated + #[deprecated] + #[prost(float, tag = "6")] + pub avg_sampling_rate: f32, +} +/// This is the response from the TimeSeries endpoint, +/// it is the counterpart of TimeSeriesRequest +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TimeSeriesResponse { + #[prost(message, repeated, tag = "1")] + pub result_timeseries: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "5")] + pub meta: ::core::option::Option, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateSubscriptionRequest { + #[prost(message, optional, tag = "1")] + pub time_series_request: ::core::option::Option, + #[prost(uint32, tag = "2")] + pub time_window_secs: u32, + #[prost(uint32, tag = "3")] + pub resolution_secs: u32, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateSubscriptionResponse { + #[prost(string, tag = "1")] + pub subscription_id: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TracePageToken { + /// This class exists to avoid circular imports with the PageToken class + /// The next version of the proto will have a PageToken class that can be used + /// for all endpoints, and this class can be removed. + #[prost(oneof = "trace_page_token::Value", tags = "1, 2, 3")] + pub value: ::core::option::Option, +} +/// Nested message and enum types in `TracePageToken`. +pub mod trace_page_token { + /// This class exists to avoid circular imports with the PageToken class + /// The next version of the proto will have a PageToken class that can be used + /// for all endpoints, and this class can be removed. + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Value { + #[prost(uint64, tag = "1")] + Offset(u64), + /// Instead of using offset (which requires all the scanning and ordering), + /// the server sends back a filter clause to be added on to the filter conditions + /// which skips the previous results altogether, avoiding extra scanning and sorting + #[prost(message, tag = "2")] + EventFilter(super::EventFilter), + #[prost(message, tag = "3")] + TraceFilter(super::TraceFilter), + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FindTracesRequest { + #[prost(message, optional, tag = "1")] + pub meta: ::core::option::Option, + #[prost(message, optional, tag = "2")] + pub filter: ::core::option::Option, + #[prost(message, optional, tag = "3")] + pub page_token: ::core::option::Option, + #[prost(enumeration = "TraceOrderBy", tag = "4")] + pub order_by: i32, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TraceResponse { + #[prost(string, tag = "1")] + pub trace_id: ::prost::alloc::string::String, + #[prost(message, optional, tag = "5")] + pub start_timestamp: ::core::option::Option<::prost_types::Timestamp>, + #[prost(message, optional, tag = "6")] + pub end_timestamp: ::core::option::Option<::prost_types::Timestamp>, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FindTracesResponse { + #[prost(message, repeated, tag = "1")] + pub traces: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "2")] + pub page_token: ::core::option::Option, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct EventFilter { + #[prost(enumeration = "TraceItemName", tag = "1")] + pub trace_item_name: i32, + #[prost(message, optional, tag = "2")] + pub filter: ::core::option::Option, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AndTraceFilter { + #[prost(message, repeated, tag = "1")] + pub filters: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct OrTraceFilter { + #[prost(message, repeated, tag = "1")] + pub filters: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct NotTraceFilter { + #[prost(message, repeated, tag = "1")] + pub filters: ::prost::alloc::vec::Vec, +} +/// Represents a set of conditions for finding particular events +/// in a trace. Each EventFilter is meant to find one particular +/// type of event. Those can then be combined to find traces that +/// contain different combinations of events. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TraceFilter { + #[prost(oneof = "trace_filter::Filter", tags = "1, 2, 3, 4")] + pub filter: ::core::option::Option, +} +/// Nested message and enum types in `TraceFilter`. +pub mod trace_filter { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Filter { + #[prost(message, tag = "1")] + AndFilter(super::AndTraceFilter), + #[prost(message, tag = "2")] + OrFilter(super::OrTraceFilter), + #[prost(message, tag = "3")] + NotFilter(super::NotTraceFilter), + #[prost(message, tag = "4")] + EventFilter(super::EventFilter), + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum TraceOrderBy { + Unspecified = 0, + EndTime = 1, + TraceDuration = 2, +} +impl TraceOrderBy { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + TraceOrderBy::Unspecified => "TRACE_ORDER_BY_UNSPECIFIED", + TraceOrderBy::EndTime => "TRACE_ORDER_BY_END_TIME", + TraceOrderBy::TraceDuration => "TRACE_ORDER_BY_TRACE_DURATION", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "TRACE_ORDER_BY_UNSPECIFIED" => Some(Self::Unspecified), + "TRACE_ORDER_BY_END_TIME" => Some(Self::EndTime), + "TRACE_ORDER_BY_TRACE_DURATION" => Some(Self::TraceDuration), + _ => None, + } + } +} +/// GetTraceRequest lets you query a trace by trace_id, returning all its items. +/// +/// Each item will return every attributes by default or you can pass a list of +/// attributes to return for each item type. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetTraceRequest { + #[prost(message, optional, tag = "1")] + pub meta: ::core::option::Option, + #[prost(string, tag = "2")] + pub trace_id: ::prost::alloc::string::String, + /// A list of items and their attributes to return in the response. + #[prost(message, repeated, tag = "3")] + pub items: ::prost::alloc::vec::Vec, +} +/// Nested message and enum types in `GetTraceRequest`. +pub mod get_trace_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct TraceItem { + /// DEPRECATED: use item_type instead + #[deprecated] + #[prost(enumeration = "super::TraceItemName", tag = "1")] + pub r#type: i32, + /// If attributes is empty, all attributes will be returned for this type. + #[prost(message, repeated, tag = "2")] + pub attributes: ::prost::alloc::vec::Vec, + #[prost(enumeration = "super::TraceItemType", tag = "3")] + pub item_type: i32, + } +} +/// GetTraceResponse returns a trace and all its items. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetTraceResponse { + #[prost(string, tag = "1")] + pub trace_id: ::prost::alloc::string::String, + #[prost(message, optional, tag = "2")] + pub meta: ::core::option::Option, + #[prost(message, repeated, tag = "3")] + pub item_groups: ::prost::alloc::vec::Vec, +} +/// Nested message and enum types in `GetTraceResponse`. +pub mod get_trace_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Item { + #[prost(string, tag = "1")] + pub id: ::prost::alloc::string::String, + #[prost(message, optional, tag = "2")] + pub timestamp: ::core::option::Option<::prost_types::Timestamp>, + #[prost(message, repeated, tag = "3")] + pub attributes: ::prost::alloc::vec::Vec, + } + /// Nested message and enum types in `Item`. + pub mod item { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Attribute { + #[prost(message, optional, tag = "1")] + pub key: ::core::option::Option, + #[prost(message, optional, tag = "2")] + pub value: ::core::option::Option, + } + } + /// ItemGroup is a list of items of a specific type. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct ItemGroup { + /// DEPRECATED: use item_type instead + #[deprecated] + #[prost(enumeration = "super::TraceItemName", tag = "1")] + pub r#type: i32, + #[prost(message, repeated, tag = "2")] + pub items: ::prost::alloc::vec::Vec, + #[prost(enumeration = "super::TraceItemType", tag = "3")] + pub item_type: i32, + } +} +/// TraceAttribute represents the attribute of a trace. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TraceAttribute { + #[prost(enumeration = "trace_attribute::Key", tag = "1")] + pub key: i32, + #[prost(message, optional, tag = "2")] + pub value: ::core::option::Option, + /// AttributeKey.Type will specify the type of the attribute we return. + /// It does not need to be sent when requesting an attribute. + #[prost(enumeration = "attribute_key::Type", tag = "3")] + pub r#type: i32, +} +/// Nested message and enum types in `TraceAttribute`. +pub mod trace_attribute { + /// Key lists the available trace attribute keys you can query. + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[repr(i32)] + pub enum Key { + Unspecified = 0, + TraceId = 1, + /// KEY_START_TIMESTAMP will return the earliest timestamp seen in the trace. + StartTimestamp = 2, + /// KEY_ROOT_SPAN_NAME will return the name of the root (segment) span of + /// the trace. + RootSpanName = 3, + /// KEY_TOTAL_ITEM_COUNT will return the count of all the items in a trace, + /// regardless of the conditions applied. + TotalItemCount = 4, + /// KEY_FILTERED_ITEM_COUNT will return the count of items where the filters + /// apply. + /// For example, in a trace with 5 items (1 http.server span, 4 db spans), + /// if we query for traces with span.op == "db", this will return 4. + FilteredItemCount = 5, + /// KEY_ROOT_SPAN_DURATION_MS will return the duration of the root span in + /// milliseconds. + RootSpanDurationMs = 6, + /// KEY_ROOT_SPAN_PROJECT_ID returns the project ID associated with the root + /// span. + RootSpanProjectId = 7, + /// KEY_EARLIEST_SPAN_NAME returns the name of the earliest span of a trace, + /// regardless if it's a root span or not + EarliestSpanName = 8, + /// KEY_EARLIEST_FRONTEND_SPAN returns the name of the earliest span emitted + /// by the frontend (for example, span op being `pageload` or `navigation`). + EarliestFrontendSpan = 9, + /// KEY_END_TIMESTAMP will return the latest timestamp seen in the trace. + EndTimestamp = 10, + /// KEY_EARLIEST_SPAN_PROJECT_ID returns the project ID associated with the earliest span. + EarliestSpanProjectId = 11, + /// KEY_EARLIEST_SPAN_DURATION_MS will return the duration of the earliest span in milliseconds. + EarliestSpanDurationMs = 12, + /// KEY_EARLIEST_FRONTEND_SPAN_PROJECT_ID returns the project ID associated with the earliest frontend span. + EarliestFrontendSpanProjectId = 13, + /// KEY_EARLIEST_FRONTEND_SPAN_DURATION_MS will return the duration of the earliest frontend span in milliseconds. + EarliestFrontendSpanDurationMs = 14, + } + impl Key { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Key::Unspecified => "KEY_UNSPECIFIED", + Key::TraceId => "KEY_TRACE_ID", + Key::StartTimestamp => "KEY_START_TIMESTAMP", + Key::RootSpanName => "KEY_ROOT_SPAN_NAME", + Key::TotalItemCount => "KEY_TOTAL_ITEM_COUNT", + Key::FilteredItemCount => "KEY_FILTERED_ITEM_COUNT", + Key::RootSpanDurationMs => "KEY_ROOT_SPAN_DURATION_MS", + Key::RootSpanProjectId => "KEY_ROOT_SPAN_PROJECT_ID", + Key::EarliestSpanName => "KEY_EARLIEST_SPAN_NAME", + Key::EarliestFrontendSpan => "KEY_EARLIEST_FRONTEND_SPAN", + Key::EndTimestamp => "KEY_END_TIMESTAMP", + Key::EarliestSpanProjectId => "KEY_EARLIEST_SPAN_PROJECT_ID", + Key::EarliestSpanDurationMs => "KEY_EARLIEST_SPAN_DURATION_MS", + Key::EarliestFrontendSpanProjectId => "KEY_EARLIEST_FRONTEND_SPAN_PROJECT_ID", + Key::EarliestFrontendSpanDurationMs => "KEY_EARLIEST_FRONTEND_SPAN_DURATION_MS", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "KEY_UNSPECIFIED" => Some(Self::Unspecified), + "KEY_TRACE_ID" => Some(Self::TraceId), + "KEY_START_TIMESTAMP" => Some(Self::StartTimestamp), + "KEY_ROOT_SPAN_NAME" => Some(Self::RootSpanName), + "KEY_TOTAL_ITEM_COUNT" => Some(Self::TotalItemCount), + "KEY_FILTERED_ITEM_COUNT" => Some(Self::FilteredItemCount), + "KEY_ROOT_SPAN_DURATION_MS" => Some(Self::RootSpanDurationMs), + "KEY_ROOT_SPAN_PROJECT_ID" => Some(Self::RootSpanProjectId), + "KEY_EARLIEST_SPAN_NAME" => Some(Self::EarliestSpanName), + "KEY_EARLIEST_FRONTEND_SPAN" => Some(Self::EarliestFrontendSpan), + "KEY_END_TIMESTAMP" => Some(Self::EndTimestamp), + "KEY_EARLIEST_SPAN_PROJECT_ID" => Some(Self::EarliestSpanProjectId), + "KEY_EARLIEST_SPAN_DURATION_MS" => Some(Self::EarliestSpanDurationMs), + "KEY_EARLIEST_FRONTEND_SPAN_PROJECT_ID" => { + Some(Self::EarliestFrontendSpanProjectId) + } + "KEY_EARLIEST_FRONTEND_SPAN_DURATION_MS" => { + Some(Self::EarliestFrontendSpanDurationMs) + } + _ => None, + } + } + } +} +/// GetTracesRequest lets you query traces with various attributes. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetTracesRequest { + #[prost(message, optional, tag = "1")] + pub meta: ::core::option::Option, + #[prost(message, optional, tag = "2")] + pub page_token: ::core::option::Option, + #[prost(uint32, tag = "3")] + pub limit: u32, + /// List of filters on items of the trace we'll use when querying. + #[prost(message, repeated, tag = "4")] + pub filters: ::prost::alloc::vec::Vec, + /// List of attributes we'd like to order by. + #[prost(message, repeated, tag = "5")] + pub order_by: ::prost::alloc::vec::Vec, + /// List of attributes we want to query. + #[prost(message, repeated, tag = "6")] + pub attributes: ::prost::alloc::vec::Vec, +} +/// Nested message and enum types in `GetTracesRequest`. +pub mod get_traces_request { + #[derive(Clone, Copy, PartialEq, ::prost::Message)] + pub struct OrderBy { + #[prost(enumeration = "super::trace_attribute::Key", tag = "1")] + pub key: i32, + #[prost(bool, tag = "2")] + pub descending: bool, + } + /// TraceFilter specifies conditions to apply on the items contained in a trace. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct TraceFilter { + /// DEPRECATED: use item_type + #[deprecated] + #[prost(enumeration = "super::TraceItemName", tag = "1")] + pub item_name: i32, + #[prost(message, optional, tag = "2")] + pub filter: ::core::option::Option, + /// the item type we will apply the filter condition on. + #[prost(enumeration = "super::TraceItemType", tag = "3")] + pub item_type: i32, + } +} +/// GetTracesResponse contains a list of traces returned by the request. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetTracesResponse { + #[prost(message, optional, tag = "1")] + pub page_token: ::core::option::Option, + #[prost(message, optional, tag = "2")] + pub meta: ::core::option::Option, + /// List of traces matching conditions. + #[prost(message, repeated, tag = "3")] + pub traces: ::prost::alloc::vec::Vec, +} +/// Nested message and enum types in `GetTracesResponse`. +pub mod get_traces_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Trace { + /// List of attributes queried. + #[prost(message, repeated, tag = "1")] + pub attributes: ::prost::alloc::vec::Vec, + } +} +/// TraceItemAttributeNamesRequest is a request to the TraceItemAttributeNames endpoint, +/// it returns the names of all queryable "TraceItemAttributes" that exist in the given projects, +/// date range, and other filters. +/// +/// TraceItem are things like: span, error, log, replay +/// TraceItemAttributes could be things like: sentry.duration,user_id cart_total, etc. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TraceItemAttributeNamesRequest { + /// metadata about the request + /// this is where you specify organization, project, time range etc. + #[prost(message, optional, tag = "1")] + pub meta: ::core::option::Option, + /// maximum number of attributes to return + #[prost(uint32, tag = "2")] + pub limit: u32, + /// offset is deprecated, please use `page_token` instead + #[deprecated] + #[prost(uint32, tag = "3")] + pub offset: u32, + /// The type of the attributes to return, must be specified, + /// only TYPE_STRING and TYPE_FLOAT are supported, anything else will return empty response + #[prost(enumeration = "attribute_key::Type", tag = "5")] + pub r#type: i32, + /// optionalfilter to only return attribute names that match the given substring + #[prost(string, tag = "6")] + pub value_substring_match: ::prost::alloc::string::String, + /// optional, used for pagination, the next page token will be returned in the response + #[prost(message, optional, tag = "7")] + pub page_token: ::core::option::Option, + /// A filter to only get relevant attribute keys + /// including this makes sure that only attribute keys are returned + /// which *intersect* with the ones specified in the filter. + /// This is a BEST-EFFORT operation. If no co-occurring keys are found within + /// 1 second, the endpoint returns without taking the intersecing attributes into account + #[prost(message, optional, tag = "8")] + pub intersecting_attributes_filter: ::core::option::Option, +} +/// TraceItemAttributeNamesResponse is the response returned by the TraceItemAttributeNames endpoint. +/// It is the counterpart to TraceItemAttributeNamesRequest. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TraceItemAttributeNamesResponse { + /// all attributes that matched the filters in the request + #[prost(message, repeated, tag = "1")] + pub attributes: ::prost::alloc::vec::Vec, + /// page token for the next page of results + #[prost(message, optional, tag = "2")] + pub page_token: ::core::option::Option, + /// metadata about the response + #[prost(message, optional, tag = "3")] + pub meta: ::core::option::Option, +} +/// Nested message and enum types in `TraceItemAttributeNamesResponse`. +pub mod trace_item_attribute_names_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Attribute { + #[prost(string, tag = "1")] + pub name: ::prost::alloc::string::String, + #[prost(enumeration = "super::attribute_key::Type", tag = "2")] + pub r#type: i32, + } +} +/// TraceItemAttributeValuesRequest is a request to the TraceItemAttributeValues endpoint, +/// it returns the set of all possible values for the given attribute key, across the given +/// organization, project_id, timerange etc (specified in meta). +/// +/// This endpoint only supports string values, it does not make sense +/// to get all the possible values of a numerical attribute +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TraceItemAttributeValuesRequest { + /// metadata about the request + /// this is where you specify organization, project, time range etc. + #[prost(message, optional, tag = "1")] + pub meta: ::core::option::Option, + /// attribute you want the values of + #[prost(message, optional, tag = "2")] + pub key: ::core::option::Option, + /// deprecated, please use the `key` field instead + #[deprecated] + #[prost(string, tag = "3")] + pub name: ::prost::alloc::string::String, + /// a substring of the value being searched for, + /// only values matching this substring will be returned. + /// only strict substring supported, no regex + #[prost(string, tag = "4")] + pub value_substring_match: ::prost::alloc::string::String, + /// max number of values to return + #[prost(uint32, tag = "5")] + pub limit: u32, + /// optional, used for pagination, the next page token will be returned in the response + #[prost(message, optional, tag = "6")] + pub page_token: ::core::option::Option, +} +/// TraceItemAttributeValuesResponse is a response from the TraceItemAttributeValues endpoint +/// it is the counterpart to TraceItemAttributesRequest +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TraceItemAttributeValuesResponse { + /// all the values that matched the criteria specified in the request + #[prost(string, repeated, tag = "1")] + pub values: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + /// page token for the next page of results + #[prost(message, optional, tag = "6")] + pub page_token: ::core::option::Option, + /// metadata about the response + #[prost(message, optional, tag = "7")] + pub meta: ::core::option::Option, +} +/// This is a request to the TraceItemDetails endpoint, +/// it is used to query for TraceItems (ex. spans or logs) +/// it returns all of the information for a specific trace item. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TraceItemDetailsRequest { + #[prost(message, optional, tag = "1")] + pub meta: ::core::option::Option, + /// required: the ID (hex string) of the item you are looking for + #[prost(string, tag = "2")] + pub item_id: ::prost::alloc::string::String, + /// required: the trace ID of the item. + #[prost(string, tag = "4")] + pub trace_id: ::prost::alloc::string::String, + #[prost(message, optional, tag = "3")] + pub filter: ::core::option::Option, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TraceItemDetailsAttribute { + #[prost(string, tag = "1")] + pub name: ::prost::alloc::string::String, + #[prost(message, optional, tag = "2")] + pub value: ::core::option::Option, +} +/// this is a response from the TraceItemDetails endpoint +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TraceItemDetailsResponse { + #[prost(string, tag = "1")] + pub item_id: ::prost::alloc::string::String, + #[prost(message, optional, tag = "2")] + pub timestamp: ::core::option::Option<::prost_types::Timestamp>, + #[prost(message, repeated, tag = "3")] + pub attributes: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "4")] + pub meta: ::core::option::Option, +} +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct AttributeDistributionsRequest { + /// max_buckets and limit wouldn't apply to other stats types (like totals) + #[prost(uint32, tag = "1")] + pub max_buckets: u32, + #[prost(uint32, tag = "2")] + pub max_attributes: u32, +} +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct StatsType { + #[prost(oneof = "stats_type::Type", tags = "1")] + pub r#type: ::core::option::Option, +} +/// Nested message and enum types in `StatsType`. +pub mod stats_type { + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum Type { + #[prost(message, tag = "1")] + AttributeDistributions(super::AttributeDistributionsRequest), + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TraceItemStatsRequest { + #[prost(message, optional, tag = "1")] + pub meta: ::core::option::Option, + /// same filter applies to all stats types requested + #[prost(message, optional, tag = "2")] + pub filter: ::core::option::Option, + #[prost(message, repeated, tag = "3")] + pub stats_types: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AttributeDistribution { + #[prost(string, tag = "1")] + pub attribute_name: ::prost::alloc::string::String, + #[prost(message, repeated, tag = "2")] + pub buckets: ::prost::alloc::vec::Vec, +} +/// Nested message and enum types in `AttributeDistribution`. +pub mod attribute_distribution { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Bucket { + #[prost(string, tag = "1")] + pub label: ::prost::alloc::string::String, + #[prost(float, tag = "2")] + pub value: f32, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AttributeDistributions { + #[prost(message, repeated, tag = "1")] + pub attributes: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TraceItemStatsResult { + #[prost(oneof = "trace_item_stats_result::Result", tags = "1")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `TraceItemStatsResult`. +pub mod trace_item_stats_result { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Result { + #[prost(message, tag = "1")] + AttributeDistributions(super::AttributeDistributions), + } +} +/// this is a response from the TraceItemStats endpoint +/// it is the counterpart to TraceItemStatsRequest +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TraceItemStatsResponse { + #[prost(message, repeated, tag = "1")] + pub results: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "2")] + pub page_token: ::core::option::Option, + #[prost(message, optional, tag = "3")] + pub meta: ::core::option::Option, +} +/// This is a request to the TraceItemTable endpoint, +/// it is used to query for TraceItems (ex. spans) +/// it returns tabular data where each row is a TraceItem, +/// and the columns are the attributes of the TraceItem +/// it can also be used for aggregations +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TraceItemTableRequest { + #[prost(message, optional, tag = "1")] + pub meta: ::core::option::Option, + /// the columns or aggregations you want to get + #[prost(message, repeated, tag = "2")] + pub columns: ::prost::alloc::vec::Vec, + /// filter out trace items you dont want + #[prost(message, optional, tag = "3")] + pub filter: ::core::option::Option, + #[prost(message, repeated, tag = "4")] + pub order_by: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "5")] + pub group_by: ::prost::alloc::vec::Vec, + #[prost(uint32, tag = "6")] + pub limit: u32, + /// optional, used for pagination, the next page token will be returned in the response + #[prost(message, optional, tag = "7")] + pub page_token: ::core::option::Option, + #[prost(message, repeated, tag = "8")] + pub virtual_column_contexts: ::prost::alloc::vec::Vec, + /// optional, filter out results of aggregates, same as SQL HAVING + #[prost(message, optional, tag = "9")] + pub aggregation_filter: ::core::option::Option, +} +/// Nested message and enum types in `TraceItemTableRequest`. +pub mod trace_item_table_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct OrderBy { + #[prost(message, optional, tag = "1")] + pub column: ::core::option::Option, + #[prost(bool, tag = "2")] + pub descending: bool, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AggregationAndFilter { + #[prost(message, repeated, tag = "1")] + pub filters: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AggregationOrFilter { + #[prost(message, repeated, tag = "1")] + pub filters: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AggregationComparisonFilter { + /// deprecated as columns should always be aggregated in a post aggregation filter + #[deprecated] + #[prost(message, optional, tag = "1")] + pub column: ::core::option::Option, + #[prost(enumeration = "aggregation_comparison_filter::Op", tag = "2")] + pub op: i32, + /// since only aggregated columns are supported, the value should be numeric + #[deprecated] + #[prost(message, optional, tag = "3")] + pub value: ::core::option::Option, + #[prost(double, tag = "5")] + pub val: f64, + #[prost(message, optional, tag = "4")] + pub aggregation: ::core::option::Option, + #[prost(message, optional, tag = "6")] + pub conditional_aggregation: ::core::option::Option, +} +/// Nested message and enum types in `AggregationComparisonFilter`. +pub mod aggregation_comparison_filter { + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[repr(i32)] + pub enum Op { + Unspecified = 0, + LessThan = 1, + GreaterThan = 2, + LessThanOrEquals = 3, + GreaterThanOrEquals = 4, + Equals = 5, + NotEquals = 6, + } + impl Op { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Op::Unspecified => "OP_UNSPECIFIED", + Op::LessThan => "OP_LESS_THAN", + Op::GreaterThan => "OP_GREATER_THAN", + Op::LessThanOrEquals => "OP_LESS_THAN_OR_EQUALS", + Op::GreaterThanOrEquals => "OP_GREATER_THAN_OR_EQUALS", + Op::Equals => "OP_EQUALS", + Op::NotEquals => "OP_NOT_EQUALS", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "OP_UNSPECIFIED" => Some(Self::Unspecified), + "OP_LESS_THAN" => Some(Self::LessThan), + "OP_GREATER_THAN" => Some(Self::GreaterThan), + "OP_LESS_THAN_OR_EQUALS" => Some(Self::LessThanOrEquals), + "OP_GREATER_THAN_OR_EQUALS" => Some(Self::GreaterThanOrEquals), + "OP_EQUALS" => Some(Self::Equals), + "OP_NOT_EQUALS" => Some(Self::NotEquals), + _ => None, + } + } + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AggregationFilter { + #[prost(oneof = "aggregation_filter::Value", tags = "1, 2, 3")] + pub value: ::core::option::Option, +} +/// Nested message and enum types in `AggregationFilter`. +pub mod aggregation_filter { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Value { + #[prost(message, tag = "1")] + AndFilter(super::AggregationAndFilter), + #[prost(message, tag = "2")] + OrFilter(super::AggregationOrFilter), + #[prost(message, tag = "3")] + ComparisonFilter(super::AggregationComparisonFilter), + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Column { + #[prost(string, tag = "3")] + pub label: ::prost::alloc::string::String, + #[prost(oneof = "column::Column", tags = "1, 2, 5, 4, 6")] + pub column: ::core::option::Option, +} +/// Nested message and enum types in `Column`. +pub mod column { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct BinaryFormula { + #[prost(enumeration = "binary_formula::Op", tag = "1")] + pub op: i32, + #[prost(message, optional, boxed, tag = "2")] + pub left: ::core::option::Option<::prost::alloc::boxed::Box>, + #[prost(message, optional, boxed, tag = "3")] + pub right: ::core::option::Option<::prost::alloc::boxed::Box>, + /// optional, if the formula evalutates to null this value is returned + /// formula can evaluate to null if an attribute is missing for example + #[prost(oneof = "binary_formula::DefaultValue", tags = "4, 5")] + pub default_value: ::core::option::Option, + } + /// Nested message and enum types in `BinaryFormula`. + pub mod binary_formula { + #[derive( + Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration, + )] + #[repr(i32)] + pub enum Op { + Unspecified = 0, + Divide = 1, + Multiply = 2, + Add = 3, + Subtract = 4, + } + impl Op { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Op::Unspecified => "OP_UNSPECIFIED", + Op::Divide => "OP_DIVIDE", + Op::Multiply => "OP_MULTIPLY", + Op::Add => "OP_ADD", + Op::Subtract => "OP_SUBTRACT", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "OP_UNSPECIFIED" => Some(Self::Unspecified), + "OP_DIVIDE" => Some(Self::Divide), + "OP_MULTIPLY" => Some(Self::Multiply), + "OP_ADD" => Some(Self::Add), + "OP_SUBTRACT" => Some(Self::Subtract), + _ => None, + } + } + } + /// optional, if the formula evalutates to null this value is returned + /// formula can evaluate to null if an attribute is missing for example + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum DefaultValue { + #[prost(double, tag = "4")] + DefaultValueDouble(f64), + #[prost(int64, tag = "5")] + DefaultValueInt64(i64), + } + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Column { + #[prost(message, tag = "1")] + Key(super::AttributeKey), + #[prost(message, tag = "2")] + Aggregation(super::AttributeAggregation), + #[prost(message, tag = "5")] + ConditionalAggregation(super::AttributeConditionalAggregation), + #[prost(message, tag = "4")] + Formula(::prost::alloc::boxed::Box), + #[prost(message, tag = "6")] + Literal(super::Literal), + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TraceItemColumnValues { + #[prost(string, tag = "1")] + pub attribute_name: ::prost::alloc::string::String, + #[prost(message, repeated, tag = "2")] + pub results: ::prost::alloc::vec::Vec, + /// reliability of the values based on confidence interval and sample size math + #[prost(enumeration = "Reliability", repeated, tag = "3")] + pub reliabilities: ::prost::alloc::vec::Vec, +} +/// this is a response from the TraceItemTable endpoint +/// it is the counterpart to TraceItemTableRequest +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TraceItemTableResponse { + /// the rows + #[prost(message, repeated, tag = "1")] + pub column_values: ::prost::alloc::vec::Vec, + /// page token for the next page of results + #[prost(message, optional, tag = "2")] + pub page_token: ::core::option::Option, + #[prost(message, optional, tag = "3")] + pub meta: ::core::option::Option, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateTraceItemTableSubscriptionRequest { + #[prost(message, optional, tag = "1")] + pub table_request: ::core::option::Option, + #[prost(uint64, tag = "2")] + pub project_id: u64, + #[prost(uint32, tag = "3")] + pub time_window: u32, + #[prost(uint32, tag = "4")] + pub resolution: u32, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateTraceItemTableSubscriptionResponse { + #[prost(string, tag = "1")] + pub subscription_id: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Error { + /// The HTTP status code corresponding to this error + #[prost(int32, tag = "1")] + pub code: i32, + /// The developer-facing message + #[prost(string, tag = "2")] + pub message: ::prost::alloc::string::String, + /// Additional error information + #[prost(message, repeated, tag = "3")] + pub details: ::prost::alloc::vec::Vec<::prost_types::Any>, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AnyValue { + #[prost(oneof = "any_value::Value", tags = "1, 2, 3, 4, 5, 6, 7")] + pub value: ::core::option::Option, +} +/// Nested message and enum types in `AnyValue`. +pub mod any_value { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Value { + #[prost(string, tag = "1")] + StringValue(::prost::alloc::string::String), + #[prost(bool, tag = "2")] + BoolValue(bool), + #[prost(int64, tag = "3")] + IntValue(i64), + #[prost(double, tag = "4")] + DoubleValue(f64), + #[prost(message, tag = "5")] + ArrayValue(super::ArrayValue), + #[prost(message, tag = "6")] + KvlistValue(super::KeyValueList), + #[prost(bytes, tag = "7")] + BytesValue(::prost::alloc::vec::Vec), + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ArrayValue { + #[prost(message, repeated, tag = "1")] + pub values: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct KeyValueList { + #[prost(message, repeated, tag = "1")] + pub values: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct KeyValue { + #[prost(string, tag = "1")] + pub key: ::prost::alloc::string::String, + #[prost(message, optional, tag = "2")] + pub value: ::core::option::Option, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TraceItem { + #[prost(uint64, tag = "1")] + pub organization_id: u64, + #[prost(uint64, tag = "2")] + pub project_id: u64, + #[prost(string, tag = "3")] + pub trace_id: ::prost::alloc::string::String, + /// item_id as bytes, little endian + #[prost(bytes = "vec", tag = "4")] + pub item_id: ::prost::alloc::vec::Vec, + #[prost(enumeration = "TraceItemType", tag = "5")] + pub item_type: i32, + #[prost(message, optional, tag = "6")] + pub timestamp: ::core::option::Option<::prost_types::Timestamp>, + #[prost(map = "string, message", tag = "7")] + pub attributes: ::std::collections::HashMap<::prost::alloc::string::String, AnyValue>, + #[prost(double, tag = "8")] + pub client_sample_rate: f64, + #[prost(double, tag = "9")] + pub server_sample_rate: f64, + /// Internal fields + #[prost(uint32, tag = "100")] + pub retention_days: u32, + #[prost(message, optional, tag = "101")] + pub received: ::core::option::Option<::prost_types::Timestamp>, +} diff --git a/sentry_protos/src/sentry_protos.taskbroker.v1.rs b/sentry_protos/src/sentry_protos.taskbroker.v1.rs new file mode 100644 index 00000000000..ec640b1f630 --- /dev/null +++ b/sentry_protos/src/sentry_protos.taskbroker.v1.rs @@ -0,0 +1,495 @@ +// This file is @generated by prost-build. +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct RetryState { + /// Current attempt number + #[prost(uint32, tag = "1")] + pub attempts: u32, + /// After this number of attempts, the task is either discarded or deadlettered. + #[prost(uint32, tag = "2")] + pub max_attempts: u32, + /// The action to take after the max_attempts is exceeded. + #[prost(enumeration = "OnAttemptsExceeded", tag = "3")] + pub on_attempts_exceeded: i32, + /// Whether a task should be executed at most once. + #[prost(bool, optional, tag = "4")] + pub at_most_once: ::core::option::Option, +} +/// Task message that is stored in Kafka and shared over RPC. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TaskActivation { + /// A GUID for the task. Used to update tasks + #[prost(string, tag = "1")] + pub id: ::prost::alloc::string::String, + /// The task namespace + #[prost(string, tag = "2")] + pub namespace: ::prost::alloc::string::String, + /// The name of the task. This name is resolved within the worker + #[prost(string, tag = "3")] + pub taskname: ::prost::alloc::string::String, + /// An opaque parameter collection. Could be JSON or protobuf encoded + #[prost(string, tag = "4")] + pub parameters: ::prost::alloc::string::String, + /// A map of headers for the task. + #[prost(map = "string, string", tag = "5")] + pub headers: + ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + /// The timestamp a task was stored in Kafka + #[prost(message, optional, tag = "6")] + pub received_at: ::core::option::Option<::prost_types::Timestamp>, + /// Retry state + #[prost(message, optional, tag = "7")] + pub retry_state: ::core::option::Option, + /// The duration in seconds that a worker has to complete task execution. + /// When an activation is moved from pending -> processing a result is expected + /// in this many seconds. + #[prost(uint64, tag = "8")] + pub processing_deadline_duration: u64, + /// The duration in seconds that a task has to start execution. + /// After received_at + expires has passed an activation is expired and will not be executed. + #[prost(uint64, optional, tag = "9")] + pub expires: ::core::option::Option, + /// The duration in seconds that a task must wait to begin execution after it is emitted. + /// After received_at + delay has passed, the activation will become pending. + #[prost(uint64, optional, tag = "11")] + pub delay: ::core::option::Option, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetTaskRequest { + #[prost(string, optional, tag = "1")] + pub namespace: ::core::option::Option<::prost::alloc::string::String>, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetTaskResponse { + /// If there are no tasks available, this will be empty + #[prost(message, optional, tag = "1")] + pub task: ::core::option::Option, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FetchNextTask { + #[prost(string, optional, tag = "1")] + pub namespace: ::core::option::Option<::prost::alloc::string::String>, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetTaskStatusRequest { + #[prost(string, tag = "1")] + pub id: ::prost::alloc::string::String, + #[prost(enumeration = "TaskActivationStatus", tag = "2")] + pub status: i32, + /// If fetch_next is provided, receive a new task in the response + #[prost(message, optional, tag = "3")] + pub fetch_next_task: ::core::option::Option, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetTaskStatusResponse { + /// The next task the worker should execute. Requires fetch_next to be set on the request. + #[prost(message, optional, tag = "1")] + pub task: ::core::option::Option, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum OnAttemptsExceeded { + Unspecified = 0, + Discard = 1, + Deadletter = 2, +} +impl OnAttemptsExceeded { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + OnAttemptsExceeded::Unspecified => "ON_ATTEMPTS_EXCEEDED_UNSPECIFIED", + OnAttemptsExceeded::Discard => "ON_ATTEMPTS_EXCEEDED_DISCARD", + OnAttemptsExceeded::Deadletter => "ON_ATTEMPTS_EXCEEDED_DEADLETTER", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "ON_ATTEMPTS_EXCEEDED_UNSPECIFIED" => Some(Self::Unspecified), + "ON_ATTEMPTS_EXCEEDED_DISCARD" => Some(Self::Discard), + "ON_ATTEMPTS_EXCEEDED_DEADLETTER" => Some(Self::Deadletter), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum TaskActivationStatus { + Unspecified = 0, + Pending = 1, + Processing = 2, + Failure = 3, + Retry = 4, + Complete = 5, +} +impl TaskActivationStatus { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + TaskActivationStatus::Unspecified => "TASK_ACTIVATION_STATUS_UNSPECIFIED", + TaskActivationStatus::Pending => "TASK_ACTIVATION_STATUS_PENDING", + TaskActivationStatus::Processing => "TASK_ACTIVATION_STATUS_PROCESSING", + TaskActivationStatus::Failure => "TASK_ACTIVATION_STATUS_FAILURE", + TaskActivationStatus::Retry => "TASK_ACTIVATION_STATUS_RETRY", + TaskActivationStatus::Complete => "TASK_ACTIVATION_STATUS_COMPLETE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "TASK_ACTIVATION_STATUS_UNSPECIFIED" => Some(Self::Unspecified), + "TASK_ACTIVATION_STATUS_PENDING" => Some(Self::Pending), + "TASK_ACTIVATION_STATUS_PROCESSING" => Some(Self::Processing), + "TASK_ACTIVATION_STATUS_FAILURE" => Some(Self::Failure), + "TASK_ACTIVATION_STATUS_RETRY" => Some(Self::Retry), + "TASK_ACTIVATION_STATUS_COMPLETE" => Some(Self::Complete), + _ => None, + } + } +} +/// Generated client implementations. +pub mod consumer_service_client { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::http::Uri; + use tonic::codegen::*; + /// ////////////////////////// + /// RPC messages and services + /// ////////////////////////// + #[derive(Debug, Clone)] + pub struct ConsumerServiceClient { + inner: tonic::client::Grpc, + } + impl ConsumerServiceClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl ConsumerServiceClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + std::marker::Send + 'static, + ::Error: Into + std::marker::Send, + { + pub fn new(inner: T) -> Self { + let inner = tonic::client::Grpc::new(inner); + Self { inner } + } + pub fn with_origin(inner: T, origin: Uri) -> Self { + let inner = tonic::client::Grpc::with_origin(inner, origin); + Self { inner } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> ConsumerServiceClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + >>::Error: + Into + std::marker::Send + std::marker::Sync, + { + ConsumerServiceClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_encoding_message_size(limit); + self + } + /// Fetch a new task activation to process. + pub async fn get_task( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/sentry_protos.taskbroker.v1.ConsumerService/GetTask", + ); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "sentry_protos.taskbroker.v1.ConsumerService", + "GetTask", + )); + self.inner.unary(req, path, codec).await + } + /// Update the state of a task with execution results. + pub async fn set_task_status( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/sentry_protos.taskbroker.v1.ConsumerService/SetTaskStatus", + ); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new( + "sentry_protos.taskbroker.v1.ConsumerService", + "SetTaskStatus", + )); + self.inner.unary(req, path, codec).await + } + } +} +/// Generated server implementations. +pub mod consumer_service_server { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + /// Generated trait containing gRPC methods that should be implemented for use with ConsumerServiceServer. + #[async_trait] + pub trait ConsumerService: std::marker::Send + std::marker::Sync + 'static { + /// Fetch a new task activation to process. + async fn get_task( + &self, + request: tonic::Request, + ) -> std::result::Result, tonic::Status>; + /// Update the state of a task with execution results. + async fn set_task_status( + &self, + request: tonic::Request, + ) -> std::result::Result, tonic::Status>; + } + /// ////////////////////////// + /// RPC messages and services + /// ////////////////////////// + #[derive(Debug)] + pub struct ConsumerServiceServer { + inner: Arc, + accept_compression_encodings: EnabledCompressionEncodings, + send_compression_encodings: EnabledCompressionEncodings, + max_decoding_message_size: Option, + max_encoding_message_size: Option, + } + impl ConsumerServiceServer { + pub fn new(inner: T) -> Self { + Self::from_arc(Arc::new(inner)) + } + pub fn from_arc(inner: Arc) -> Self { + Self { + inner, + accept_compression_encodings: Default::default(), + send_compression_encodings: Default::default(), + max_decoding_message_size: None, + max_encoding_message_size: None, + } + } + pub fn with_interceptor(inner: T, interceptor: F) -> InterceptedService + where + F: tonic::service::Interceptor, + { + InterceptedService::new(Self::new(inner), interceptor) + } + /// Enable decompressing requests with the given encoding. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.accept_compression_encodings.enable(encoding); + self + } + /// Compress responses with the given encoding, if the client supports it. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.send_compression_encodings.enable(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.max_decoding_message_size = Some(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.max_encoding_message_size = Some(limit); + self + } + } + impl tonic::codegen::Service> for ConsumerServiceServer + where + T: ConsumerService, + B: Body + std::marker::Send + 'static, + B::Error: Into + std::marker::Send + 'static, + { + type Response = http::Response; + type Error = std::convert::Infallible; + type Future = BoxFuture; + fn poll_ready( + &mut self, + _cx: &mut Context<'_>, + ) -> Poll> { + Poll::Ready(Ok(())) + } + fn call(&mut self, req: http::Request) -> Self::Future { + match req.uri().path() { + "/sentry_protos.taskbroker.v1.ConsumerService/GetTask" => { + #[allow(non_camel_case_types)] + struct GetTaskSvc(pub Arc); + impl tonic::server::UnaryService for GetTaskSvc { + type Response = super::GetTaskResponse; + type Future = BoxFuture, tonic::Status>; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::get_task(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let method = GetTaskSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/sentry_protos.taskbroker.v1.ConsumerService/SetTaskStatus" => { + #[allow(non_camel_case_types)] + struct SetTaskStatusSvc(pub Arc); + impl + tonic::server::UnaryService + for SetTaskStatusSvc + { + type Response = super::SetTaskStatusResponse; + type Future = BoxFuture, tonic::Status>; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::set_task_status(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let method = SetTaskStatusSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + _ => Box::pin(async move { + Ok(http::Response::builder() + .status(200) + .header("grpc-status", tonic::Code::Unimplemented as i32) + .header( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ) + .body(empty_body()) + .unwrap()) + }), + } + } + } + impl Clone for ConsumerServiceServer { + fn clone(&self) -> Self { + let inner = self.inner.clone(); + Self { + inner, + accept_compression_encodings: self.accept_compression_encodings, + send_compression_encodings: self.send_compression_encodings, + max_decoding_message_size: self.max_decoding_message_size, + max_encoding_message_size: self.max_encoding_message_size, + } + } + } + /// Generated gRPC service name + pub const SERVICE_NAME: &str = "sentry_protos.taskbroker.v1.ConsumerService"; + impl tonic::server::NamedService for ConsumerServiceServer { + const NAME: &'static str = SERVICE_NAME; + } +} From 5332d1cd9e4c8b41bb13ecc44cbd25dca0d7c4a0 Mon Sep 17 00:00:00 2001 From: Pierre Massat Date: Tue, 6 May 2025 12:06:36 -0400 Subject: [PATCH 03/37] Gate sentry_protos dependency behind the processing feature --- relay-server/Cargo.toml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/relay-server/Cargo.toml b/relay-server/Cargo.toml index 5227774ab5e..28eeb54f28f 100644 --- a/relay-server/Cargo.toml +++ b/relay-server/Cargo.toml @@ -16,6 +16,8 @@ processing = [ "dep:minidump", "dep:symbolic-common", "dep:symbolic-unreal", + "dep:prost-types", + "sentry_protos", "relay-cardinality/redis", "relay-config/processing", "relay-kafka/producer", @@ -97,8 +99,8 @@ reqwest = { workspace = true, features = [ ] } rmp-serde = { workspace = true } sentry = { workspace = true, features = ["tower-http"] } -sentry_protos = { workspace = true } -prost-types = { workspace = true } +sentry_protos = { workspace = true, optional = true } +prost-types = { workspace = true , optional = true } serde = { workspace = true } serde_bytes = { workspace = true } serde_json = { workspace = true } From d5ddc8920163ec8d20eb3903d80b910a69522eb2 Mon Sep 17 00:00:00 2001 From: Pierre Massat Date: Tue, 6 May 2025 12:11:14 -0400 Subject: [PATCH 04/37] Use the proper enum value --- relay-server/src/services/store.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/relay-server/src/services/store.rs b/relay-server/src/services/store.rs index b8781ef6d71..188adfb30b0 100644 --- a/relay-server/src/services/store.rs +++ b/relay-server/src/services/store.rs @@ -1087,7 +1087,10 @@ impl StoreService { let message = KafkaMessage::Log { headers: BTreeMap::from([ ("project_id".to_string(), scoping.project_id.to_string()), - ("item_type".to_string(), "3".to_string()), + ( + "item_type".to_string(), + TraceItemType::Log.as_str_name().to_string(), + ), ]), message, }; From a401c2f652425faa64f04397d2a265053c8f2e4a Mon Sep 17 00:00:00 2001 From: Pierre Massat Date: Tue, 6 May 2025 12:11:21 -0400 Subject: [PATCH 05/37] Do not use the macro --- relay-server/src/services/store.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/relay-server/src/services/store.rs b/relay-server/src/services/store.rs index 188adfb30b0..b10441e6bd7 100644 --- a/relay-server/src/services/store.rs +++ b/relay-server/src/services/store.rs @@ -1078,7 +1078,7 @@ impl StoreService { } } - let mut message = vec![]; + let mut message = Vec::new(); if trace_item.encode(&mut message).is_err() { return Ok(()); From 697763acc3ea5fdc9fa3eb6fff19a6802d2bd8c6 Mon Sep 17 00:00:00 2001 From: Pierre Massat Date: Tue, 6 May 2025 14:54:53 -0400 Subject: [PATCH 06/37] Serialize in the function and return the raw bytes in serialize() --- relay-server/src/services/store.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/relay-server/src/services/store.rs b/relay-server/src/services/store.rs index b10441e6bd7..1805382e1d3 100644 --- a/relay-server/src/services/store.rs +++ b/relay-server/src/services/store.rs @@ -56,6 +56,8 @@ pub enum StoreError { EncodingFailed(std::io::Error), #[error("failed to store event because event id was missing")] NoEventId, + #[error("failed to encode protobuf because the buffer is too small")] + ProtobufEncodingFailed, } struct Producer { @@ -1077,12 +1079,11 @@ impl StoreService { } } } - let mut message = Vec::new(); if trace_item.encode(&mut message).is_err() { - return Ok(()); - }; + return Err(StoreError::ProtobufEncodingFailed); + } let message = KafkaMessage::Log { headers: BTreeMap::from([ @@ -1682,7 +1683,6 @@ enum KafkaMessage<'a> { message: SpanKafkaMessage<'a>, }, Log { - #[serde(skip)] headers: BTreeMap, message: Vec, }, @@ -1787,9 +1787,7 @@ impl Message for KafkaMessage<'_> { KafkaMessage::Span { message, .. } => serde_json::to_vec(message) .map(Cow::Owned) .map_err(ClientError::InvalidJson), - KafkaMessage::Log { message, .. } => serde_json::to_vec(message) - .map(Cow::Owned) - .map_err(ClientError::InvalidJson), + KafkaMessage::Log { message, .. } => Ok(Cow::Borrowed(message)), _ => rmp_serde::to_vec_named(&self) .map(Cow::Owned) .map_err(ClientError::InvalidMsgPack), From 74e809dd70b0974f3cfe327931fba7b8843c59d8 Mon Sep 17 00:00:00 2001 From: Pierre Massat Date: Tue, 6 May 2025 15:16:03 -0400 Subject: [PATCH 07/37] Read the items portion of the config --- relay-kafka/src/config.rs | 6 +++++- relay-server/src/services/store.rs | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/relay-kafka/src/config.rs b/relay-kafka/src/config.rs index 00f36d16f38..e2bcd0067e7 100644 --- a/relay-kafka/src/config.rs +++ b/relay-kafka/src/config.rs @@ -51,6 +51,8 @@ pub enum KafkaTopic { Spans, /// Feedback events topic. Feedback, + /// Items topic + Items, } impl KafkaTopic { @@ -58,7 +60,7 @@ impl KafkaTopic { /// It will have to be adjusted if the new variants are added. pub fn iter() -> std::slice::Iter<'static, Self> { use KafkaTopic::*; - static TOPICS: [KafkaTopic; 14] = [ + static TOPICS: [KafkaTopic; 15] = [ Events, Attachments, Transactions, @@ -73,6 +75,7 @@ impl KafkaTopic { OurLogs, Spans, Feedback, + Items, ]; TOPICS.iter() } @@ -138,6 +141,7 @@ define_topic_assignments! { monitors: (KafkaTopic::Monitors, "ingest-monitors", "Monitor check-ins."), spans: (KafkaTopic::Spans, "snuba-spans", "Standalone spans without a transaction."), feedback: (KafkaTopic::Feedback, "ingest-feedback-events", "Feedback events topic."), + items: (KafkaTopic::Items, "snuba-items", "Items topic."), } /// Configuration for a "logical" topic/datasink that Relay should forward data into. diff --git a/relay-server/src/services/store.rs b/relay-server/src/services/store.rs index 1805382e1d3..7e5f3a9d106 100644 --- a/relay-server/src/services/store.rs +++ b/relay-server/src/services/store.rs @@ -1096,7 +1096,7 @@ impl StoreService { message, }; - self.produce(KafkaTopic::OurLogs, message)?; + self.produce(KafkaTopic::Items, message)?; // We need to track the count and bytes separately for possible rate limits and quotas on both counts and bytes. self.outcome_aggregator.send(TrackOutcome { From 1be1453c8b42f57cda47fb959063e1bc4b022c5d Mon Sep 17 00:00:00 2001 From: Pierre Massat Date: Tue, 6 May 2025 15:58:07 -0400 Subject: [PATCH 08/37] Generate proper types for Protobuf schema validation --- Cargo.lock | 148 +++++++++++++++++++++++++++++++++++++++-- Cargo.toml | 2 +- relay-kafka/Cargo.toml | 2 +- 3 files changed, 143 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 309a93fca0b..737e0e29976 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -747,7 +747,7 @@ version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" dependencies = [ - "heck", + "heck 0.5.0", "proc-macro2", "quote", "syn", @@ -1196,6 +1196,12 @@ version = "0.15.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" +[[package]] +name = "dyn-clone" +version = "1.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c7a8fb8a9fbf66c1f703fe16184d10ca0ee9d23be5b4436400408ba54a95005" + [[package]] name = "dynfmt" version = "0.1.5" @@ -1274,7 +1280,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1e6a265c649f3f5979b601d26f1d05ada116434c87741c9493cb56218f76cbc" dependencies = [ - "heck", + "heck 0.5.0", "proc-macro2", "quote", "syn", @@ -1690,6 +1696,12 @@ dependencies = [ "hashbrown 0.14.5", ] +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + [[package]] name = "heck" version = "0.5.0" @@ -3251,7 +3263,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c1318b19085f08681016926435853bbf7858f9c082d0999b80550ff5d9abe15" dependencies = [ "bytes", - "heck", + "heck 0.5.0", "itertools 0.13.0", "log", "multimap", @@ -3555,6 +3567,16 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" +[[package]] +name = "regress" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f5f39ba4513916c1b2657b72af6ec671f091cd637992f58d0ede5cae4e5dea0" +dependencies = [ + "hashbrown 0.14.5", + "memchr", +] + [[package]] name = "relay" version = "25.4.0" @@ -4162,7 +4184,7 @@ dependencies = [ "rmp-serde", "semver", "sentry", - "sentry_protos", + "sentry_protos 0.1.74", "serde", "serde_bytes", "serde_json", @@ -4492,6 +4514,30 @@ dependencies = [ "parking_lot", ] +[[package]] +name = "schemars" +version = "0.8.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fbf2ae1b8bc8e02df939598064d22402220cd5bbcca1c76f7d6a310974d5615" +dependencies = [ + "dyn-clone", + "schemars_derive", + "serde", + "serde_json", +] + +[[package]] +name = "schemars_derive" +version = "0.8.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32e265784ad618884abaea0600a9adf15393368d840e0222d101a072f3f7534d" +dependencies = [ + "proc-macro2", + "quote", + "serde_derive_internals", + "syn", +] + [[package]] name = "scopeguard" version = "1.2.0" @@ -4639,15 +4685,21 @@ dependencies = [ [[package]] name = "sentry-kafka-schemas" -version = "0.1.129" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "790627715d4ea0e58e252dcb657a44146fde401b5520bbbc3b6500764ef71c86" +checksum = "ab02afbb01cbd8b7e71ae1c83a58a288e5b97d3670a4484e332079009e52828d" dependencies = [ "jsonschema", + "prettyplease", + "prost", + "schemars", + "sentry_protos 0.1.74 (registry+https://github.com/rust-lang/crates.io-index)", "serde", "serde_json", "serde_yaml", + "syn", "thiserror 1.0.69", + "typify", "url", ] @@ -4728,6 +4780,21 @@ dependencies = [ "tonic-build", ] +[[package]] +name = "sentry_protos" +version = "0.1.74" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0aefff68057c87dc1054563870fc268c04266a9143c51f424a98faf548330d6" +dependencies = [ + "glob", + "prost", + "prost-types", + "regex", + "tokio", + "tonic", + "tonic-build", +] + [[package]] name = "serde" version = "1.0.215" @@ -4766,6 +4833,17 @@ dependencies = [ "syn", ] +[[package]] +name = "serde_derive_internals" +version = "0.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "serde_json" version = "1.0.133" @@ -4797,6 +4875,18 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_tokenstream" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64060d864397305347a78851c51588fd283767e7e7589829e8121d65512340f1" +dependencies = [ + "proc-macro2", + "quote", + "serde", + "syn", +] + [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -5078,7 +5168,7 @@ checksum = "1804e8a7c7865599c9c79be146dc8a9fd8cc86935fa641d3ea58e5f0688abaa5" dependencies = [ "dotenvy", "either", - "heck", + "heck 0.5.0", "hex", "once_cell", "proc-macro2", @@ -5801,6 +5891,50 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +[[package]] +name = "typify" +version = "0.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c61e9db210bbff218e6535c664b37ec47da449169b98e7866d0580d0db75529" +dependencies = [ + "typify-impl", + "typify-macro", +] + +[[package]] +name = "typify-impl" +version = "0.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95e32f38493804f88e2dc7a5412eccd872ea5452b4db9b0a77de4df180f2a87e" +dependencies = [ + "heck 0.4.1", + "log", + "proc-macro2", + "quote", + "regress", + "schemars", + "serde_json", + "syn", + "thiserror 1.0.69", + "unicode-ident", +] + +[[package]] +name = "typify-macro" +version = "0.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc09508b72f63d521d68e42c7f172c7416d67986df44b3c7d1f7f9963948ed32" +dependencies = [ + "proc-macro2", + "quote", + "schemars", + "serde", + "serde_json", + "serde_tokenstream", + "syn", + "typify-impl", +] + [[package]] name = "uaparser" version = "0.6.4" diff --git a/Cargo.toml b/Cargo.toml index 1babcd1d186..fc9ffc30cda 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -161,7 +161,7 @@ reqwest = "0.12.9" rmp-serde = "1.3.0" sentry = "0.36.0" sentry-core = "0.36.0" -sentry-kafka-schemas = { version = "0.1.129", default-features = false } +sentry-kafka-schemas = { version = "1.2.2", default-features = false } sentry-release-parser = { version = "1.3.2", default-features = false } sentry-types = "0.36.0" prost-types = "0.13.3" diff --git a/relay-kafka/Cargo.toml b/relay-kafka/Cargo.toml index 2e72c5346f9..9910af2411c 100644 --- a/relay-kafka/Cargo.toml +++ b/relay-kafka/Cargo.toml @@ -21,7 +21,7 @@ rmp-serde = { workspace = true, optional = true } serde = { workspace = true } serde_json = { workspace = true, optional = true } thiserror = { workspace = true } -sentry-kafka-schemas = { workspace = true, default_features = false, optional = true } +sentry-kafka-schemas = { workspace = true, optional = true , features = ["type_generation"]} [dev-dependencies] serde_yaml = { workspace = true } From 9a779f8a21d35c32f62d7108949aa63044bb8e12 Mon Sep 17 00:00:00 2001 From: Pierre Massat Date: Tue, 6 May 2025 16:28:51 -0400 Subject: [PATCH 09/37] Remove vendored in favor of installing protoc --- .github/workflows/ci.yml | 5 + Cargo.lock | 17 +- Cargo.toml | 2 +- sentry_protos/Cargo.toml | 26 - sentry_protos/src/lib.rs | 41 - .../src/sentry_protos.kafka.events.v1.rs | 1187 ---- sentry_protos/src/sentry_protos.options.v1.rs | 46 - sentry_protos/src/sentry_protos.relay.v1.rs | 6236 ----------------- sentry_protos/src/sentry_protos.seer.v1.rs | 309 - sentry_protos/src/sentry_protos.sentry.v1.rs | 521 -- sentry_protos/src/sentry_protos.snuba.v1.rs | 1822 ----- .../src/sentry_protos.taskbroker.v1.rs | 495 -- 12 files changed, 8 insertions(+), 10699 deletions(-) delete mode 100644 sentry_protos/Cargo.toml delete mode 100644 sentry_protos/src/lib.rs delete mode 100644 sentry_protos/src/sentry_protos.kafka.events.v1.rs delete mode 100644 sentry_protos/src/sentry_protos.options.v1.rs delete mode 100644 sentry_protos/src/sentry_protos.relay.v1.rs delete mode 100644 sentry_protos/src/sentry_protos.seer.v1.rs delete mode 100644 sentry_protos/src/sentry_protos.sentry.v1.rs delete mode 100644 sentry_protos/src/sentry_protos.snuba.v1.rs delete mode 100644 sentry_protos/src/sentry_protos.taskbroker.v1.rs diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 54c8cedd2a9..ff62872fb55 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,6 +37,11 @@ jobs: with: python-version: "3.11" + - name: Install Protoc + uses: arduino/setup-protoc@v3 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + - name: Install Rust Toolchain run: | rustup toolchain install stable --profile minimal --no-self-update diff --git a/Cargo.lock b/Cargo.lock index 737e0e29976..2a5a1de9a3b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4184,7 +4184,7 @@ dependencies = [ "rmp-serde", "semver", "sentry", - "sentry_protos 0.1.74", + "sentry_protos", "serde", "serde_bytes", "serde_json", @@ -4693,7 +4693,7 @@ dependencies = [ "prettyplease", "prost", "schemars", - "sentry_protos 0.1.74 (registry+https://github.com/rust-lang/crates.io-index)", + "sentry_protos", "serde", "serde_json", "serde_yaml", @@ -4767,19 +4767,6 @@ dependencies = [ "uuid", ] -[[package]] -name = "sentry_protos" -version = "0.1.74" -dependencies = [ - "glob", - "prost", - "prost-types", - "regex", - "tokio", - "tonic", - "tonic-build", -] - [[package]] name = "sentry_protos" version = "0.1.74" diff --git a/Cargo.toml b/Cargo.toml index fc9ffc30cda..b5a93453f68 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -67,7 +67,6 @@ relay-ua = { path = "relay-ua" } relay-test = { path = "relay-test" } relay-protocol-derive = { path = "relay-protocol-derive" } relay-event-derive = { path = "relay-event-derive" } -sentry_protos = { path = "sentry_protos" } ahash = "0.8.11" android_trace_log = { version = "0.3.0", features = ["serde"] } @@ -164,6 +163,7 @@ sentry-core = "0.36.0" sentry-kafka-schemas = { version = "1.2.2", default-features = false } sentry-release-parser = { version = "1.3.2", default-features = false } sentry-types = "0.36.0" +sentry_protos = "0.1.74" prost-types = "0.13.3" semver = "1.0.23" serde = { version = "1.0.215", features = ["derive", "rc"] } diff --git a/sentry_protos/Cargo.toml b/sentry_protos/Cargo.toml deleted file mode 100644 index e3e75aad7a3..00000000000 --- a/sentry_protos/Cargo.toml +++ /dev/null @@ -1,26 +0,0 @@ -[package] -name = "sentry_protos" -version = "0.1.74" -edition = "2021" -readme = "README.md" -description = "Rust bindings for sentry-protos" -license-file = "LICENSE.md" -authors = ["Sentry "] -repository = "https://github.com/getsentry/sentry-protos" -publish = false - -[build-dependencies] -glob = "0.3.1" -tonic-build = "0.12" -prost = { workspace = true } -prost-types = { workspace = true } -regex = "1.10.5" - -[dependencies] -tonic = "0.12.3" -prost = { workspace = true } -prost-types = { workspace = true } -tokio = { version = "1.0", features = ["macros", "rt-multi-thread"] } - -[lints] -workspace = true diff --git a/sentry_protos/src/lib.rs b/sentry_protos/src/lib.rs deleted file mode 100644 index 6bb25e1a176..00000000000 --- a/sentry_protos/src/lib.rs +++ /dev/null @@ -1,41 +0,0 @@ -pub mod events { - pub mod v1 { - include!("sentry_protos.kafka.events.v1.rs"); - } -} - -pub mod options { - pub mod v1 { - include!("sentry_protos.options.v1.rs"); - } -} - -pub mod seer { - pub mod v1 { - include!("sentry_protos.seer.v1.rs"); - } -} - -pub mod relay { - pub mod v1 { - include!("sentry_protos.relay.v1.rs"); - } -} - -pub mod sentry { - pub mod v1 { - include!("sentry_protos.sentry.v1.rs"); - } -} - -pub mod taskbroker { - pub mod v1 { - include!("sentry_protos.taskbroker.v1.rs"); - } -} - -pub mod snuba { - pub mod v1 { - include!("sentry_protos.snuba.v1.rs"); - } -} diff --git a/sentry_protos/src/sentry_protos.kafka.events.v1.rs b/sentry_protos/src/sentry_protos.kafka.events.v1.rs deleted file mode 100644 index bb7ecbdc0ab..00000000000 --- a/sentry_protos/src/sentry_protos.kafka.events.v1.rs +++ /dev/null @@ -1,1187 +0,0 @@ -// This file is @generated by prost-build. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct EventStreamMessage { - #[prost( - oneof = "event_stream_message::Value", - tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14" - )] - pub value: ::core::option::Option, -} -/// Nested message and enum types in `EventStreamMessage`. -pub mod event_stream_message { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum Value { - #[prost(message, tag = "1")] - Inserteventmessage(super::Inserteventmessage), - #[prost(message, tag = "2")] - Startdeletegroupsmessage(super::Startdeletegroupsmessage), - #[prost(message, tag = "3")] - Startmergemessage(super::Startmergemessage), - #[prost(message, tag = "4")] - Startunmergemessage(super::Startunmergemessage), - #[prost(message, tag = "5")] - Startunmergehierarchicalmessage(super::Startunmergehierarchicalmessage), - #[prost(message, tag = "6")] - Startdeletetagmessage(super::Startdeletetagmessage), - #[prost(message, tag = "7")] - Enddeletegroupsmessage(super::Enddeletegroupsmessage), - #[prost(message, tag = "8")] - Endmergemessage(super::Endmergemessage), - #[prost(message, tag = "9")] - Endunmergemessage(super::Endunmergemessage), - #[prost(message, tag = "10")] - Endunmergehierarchicalmessage(super::Endunmergehierarchicalmessage), - #[prost(message, tag = "11")] - Enddeletetagmessage(super::Enddeletetagmessage), - #[prost(message, tag = "12")] - Tombstoneeventsmessage(super::Tombstoneeventsmessage), - #[prost(message, tag = "13")] - Replacegroupmessage(super::Replacegroupmessage), - #[prost(message, tag = "14")] - Excludegroupsmessage(super::Excludegroupsmessage), - } -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Startmergemessage { - #[prost(int64, tag = "1")] - pub a0: i64, - #[prost(string, tag = "2")] - pub a1: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub a2: ::core::option::Option, -} -/// Nested message and enum types in `Startmergemessage`. -pub mod startmergemessage { - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Startmergemessage2 { - #[prost(string, tag = "1")] - pub transaction_id: ::prost::alloc::string::String, - #[prost(int64, tag = "2")] - pub project_id: i64, - #[prost(int64, repeated, tag = "3")] - pub previous_group_ids: ::prost::alloc::vec::Vec, - #[prost(int64, tag = "4")] - pub new_group_id: i64, - #[prost(string, tag = "5")] - pub datetime: ::prost::alloc::string::String, - } -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Endmergemessage { - #[prost(int64, tag = "1")] - pub a0: i64, - #[prost(string, tag = "2")] - pub a1: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub a2: ::core::option::Option, -} -/// Nested message and enum types in `Endmergemessage`. -pub mod endmergemessage { - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Endmergemessage2 { - #[prost(string, tag = "1")] - pub transaction_id: ::prost::alloc::string::String, - #[prost(int64, tag = "2")] - pub project_id: i64, - #[prost(int64, repeated, tag = "3")] - pub previous_group_ids: ::prost::alloc::vec::Vec, - #[prost(int64, tag = "4")] - pub new_group_id: i64, - #[prost(string, tag = "5")] - pub datetime: ::prost::alloc::string::String, - } -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Startdeletegroupsmessage { - #[prost(int64, tag = "1")] - pub a0: i64, - #[prost(string, tag = "2")] - pub a1: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub a2: ::core::option::Option, -} -/// Nested message and enum types in `Startdeletegroupsmessage`. -pub mod startdeletegroupsmessage { - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Startdeletegroupsmessage2 { - #[prost(string, tag = "1")] - pub transaction_id: ::prost::alloc::string::String, - #[prost(int64, tag = "2")] - pub project_id: i64, - #[prost(int64, repeated, tag = "3")] - pub group_ids: ::prost::alloc::vec::Vec, - #[prost(string, tag = "4")] - pub datetime: ::prost::alloc::string::String, - } -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Enddeletegroupsmessage { - #[prost(int64, tag = "1")] - pub a0: i64, - #[prost(string, tag = "2")] - pub a1: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub a2: ::core::option::Option, -} -/// Nested message and enum types in `Enddeletegroupsmessage`. -pub mod enddeletegroupsmessage { - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Enddeletegroupsmessage2 { - #[prost(string, tag = "1")] - pub transaction_id: ::prost::alloc::string::String, - #[prost(int64, tag = "2")] - pub project_id: i64, - #[prost(int64, repeated, tag = "3")] - pub group_ids: ::prost::alloc::vec::Vec, - #[prost(string, tag = "4")] - pub datetime: ::prost::alloc::string::String, - } -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Startunmergemessage { - #[prost(int64, tag = "1")] - pub a0: i64, - #[prost(string, tag = "2")] - pub a1: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub a2: ::core::option::Option, -} -/// Nested message and enum types in `Startunmergemessage`. -pub mod startunmergemessage { - #[derive(Clone, Copy, PartialEq, ::prost::Message)] - pub struct Startunmergemessage2 { - #[prost(int64, tag = "1")] - pub project_id: i64, - } -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Startunmergehierarchicalmessage { - #[prost(int64, tag = "1")] - pub a0: i64, - #[prost(string, tag = "2")] - pub a1: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub a2: - ::core::option::Option, -} -/// Nested message and enum types in `Startunmergehierarchicalmessage`. -pub mod startunmergehierarchicalmessage { - #[derive(Clone, Copy, PartialEq, ::prost::Message)] - pub struct Startunmergehierarchicalmessage2 { - #[prost(int64, tag = "1")] - pub project_id: i64, - } -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Startdeletetagmessage { - #[prost(int64, tag = "1")] - pub a0: i64, - #[prost(string, tag = "2")] - pub a1: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub a2: ::core::option::Option, -} -/// Nested message and enum types in `Startdeletetagmessage`. -pub mod startdeletetagmessage { - #[derive(Clone, Copy, PartialEq, ::prost::Message)] - pub struct Startdeletetagmessage2 { - #[prost(int64, tag = "1")] - pub project_id: i64, - } -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Endunmergemessage { - #[prost(int64, tag = "1")] - pub a0: i64, - #[prost(string, tag = "2")] - pub a1: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub a2: ::core::option::Option, -} -/// Nested message and enum types in `Endunmergemessage`. -pub mod endunmergemessage { - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Endunmergemessage2 { - #[prost(string, tag = "1")] - pub transaction_id: ::prost::alloc::string::String, - #[prost(int64, tag = "2")] - pub project_id: i64, - #[prost(int64, tag = "3")] - pub previous_group_id: i64, - #[prost(int64, tag = "4")] - pub new_group_id: i64, - #[prost(string, repeated, tag = "5")] - pub hashes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - #[prost(string, tag = "6")] - pub datetime: ::prost::alloc::string::String, - } -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Endunmergehierarchicalmessage { - #[prost(int64, tag = "1")] - pub a0: i64, - #[prost(string, tag = "2")] - pub a1: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub a2: ::core::option::Option, -} -/// Nested message and enum types in `Endunmergehierarchicalmessage`. -pub mod endunmergehierarchicalmessage { - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Endunmergehierarchicalmessage2 { - #[prost(int64, tag = "1")] - pub project_id: i64, - #[prost(int64, tag = "2")] - pub previous_group_id: i64, - #[prost(int64, tag = "3")] - pub new_group_id: i64, - #[prost(string, tag = "4")] - pub primary_hash: ::prost::alloc::string::String, - #[prost(string, tag = "5")] - pub hierarchical_hash: ::prost::alloc::string::String, - #[prost(string, tag = "6")] - pub datetime: ::prost::alloc::string::String, - } -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Enddeletetagmessage { - #[prost(int64, tag = "1")] - pub a0: i64, - #[prost(string, tag = "2")] - pub a1: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub a2: ::core::option::Option, -} -/// Nested message and enum types in `Enddeletetagmessage`. -pub mod enddeletetagmessage { - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Enddeletetagmessage2 { - #[prost(string, tag = "1")] - pub tag: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub datetime: ::prost::alloc::string::String, - #[prost(int64, tag = "3")] - pub project_id: i64, - } -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Tombstoneeventsmessage { - #[prost(int64, tag = "1")] - pub a0: i64, - #[prost(string, tag = "2")] - pub a1: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub a2: ::core::option::Option, -} -/// Nested message and enum types in `Tombstoneeventsmessage`. -pub mod tombstoneeventsmessage { - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Tombstoneeventsmessage2 { - #[prost(int64, tag = "1")] - pub project_id: i64, - #[prost(string, repeated, tag = "2")] - pub event_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - #[prost(string, tag = "4")] - pub from_timestamp: ::prost::alloc::string::String, - #[prost(string, tag = "5")] - pub to_timestamp: ::prost::alloc::string::String, - #[prost(string, tag = "6")] - pub datetime: ::prost::alloc::string::String, - #[prost(oneof = "tombstoneeventsmessage2::HasOldPrimaryHash", tags = "3")] - pub has_old_primary_hash: - ::core::option::Option, - } - /// Nested message and enum types in `Tombstoneeventsmessage2`. - pub mod tombstoneeventsmessage2 { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasOldPrimaryHash { - #[prost(string, tag = "3")] - OldPrimaryHash(::prost::alloc::string::String), - } - } -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Replacegroupmessage { - #[prost(int64, tag = "1")] - pub a0: i64, - #[prost(string, tag = "2")] - pub a1: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub a2: ::core::option::Option, -} -/// Nested message and enum types in `Replacegroupmessage`. -pub mod replacegroupmessage { - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Replacegroupmessage2 { - #[prost(string, repeated, tag = "1")] - pub event_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - #[prost(int64, tag = "2")] - pub project_id: i64, - #[prost(string, tag = "3")] - pub from_timestamp: ::prost::alloc::string::String, - #[prost(string, tag = "4")] - pub to_timestamp: ::prost::alloc::string::String, - #[prost(string, tag = "5")] - pub transaction_id: ::prost::alloc::string::String, - #[prost(string, tag = "6")] - pub datetime: ::prost::alloc::string::String, - #[prost(int64, tag = "7")] - pub new_group_id: i64, - } -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Excludegroupsmessage { - #[prost(int64, tag = "1")] - pub a0: i64, - #[prost(string, tag = "2")] - pub a1: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub a2: ::core::option::Option, -} -/// Nested message and enum types in `Excludegroupsmessage`. -pub mod excludegroupsmessage { - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Excludegroupsmessage2 { - #[prost(int64, tag = "1")] - pub project_id: i64, - #[prost(int64, repeated, tag = "2")] - pub group_ids: ::prost::alloc::vec::Vec, - } -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Contexts { - #[prost(oneof = "contexts::HasReplay", tags = "1")] - pub has_replay: ::core::option::Option, - #[prost(oneof = "contexts::HasTrace", tags = "2")] - pub has_trace: ::core::option::Option, -} -/// Nested message and enum types in `Contexts`. -pub mod contexts { - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct ContextsReplay { - #[prost(oneof = "contexts_replay::HasReplayId", tags = "1")] - pub has_replay_id: ::core::option::Option, - } - /// Nested message and enum types in `ContextsReplay`. - pub mod contexts_replay { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasReplayId { - #[prost(string, tag = "1")] - ReplayId(::prost::alloc::string::String), - } - } - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct ContextsTrace { - #[prost(oneof = "contexts_trace::HasSampled", tags = "1")] - pub has_sampled: ::core::option::Option, - #[prost(oneof = "contexts_trace::HasSpanId", tags = "2")] - pub has_span_id: ::core::option::Option, - #[prost(oneof = "contexts_trace::HasTraceId", tags = "3")] - pub has_trace_id: ::core::option::Option, - } - /// Nested message and enum types in `ContextsTrace`. - pub mod contexts_trace { - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasSampled { - #[prost(bool, tag = "1")] - Sampled(bool), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasSpanId { - #[prost(string, tag = "2")] - SpanId(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasTraceId { - #[prost(string, tag = "3")] - TraceId(::prost::alloc::string::String), - } - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasReplay { - #[prost(message, tag = "1")] - Replay(ContextsReplay), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasTrace { - #[prost(message, tag = "2")] - Trace(ContextsTrace), - } -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Errordata { - #[prost(message, optional, tag = "2")] - pub culprit: ::core::option::Option<::prost_types::Value>, - #[prost(message, repeated, tag = "3")] - pub errors: ::prost::alloc::vec::Vec<::prost_types::Value>, - #[prost(string, repeated, tag = "5")] - pub hierarchical_hashes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - #[prost(map = "string, string", tag = "7")] - pub modules: - ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, - #[prost(double, tag = "8")] - pub received: f64, - #[prost(message, repeated, tag = "11")] - pub tags: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "13")] - pub title: ::core::option::Option<::prost_types::Value>, - #[prost(message, optional, tag = "14")] - pub r#type: ::core::option::Option<::prost_types::Value>, - #[prost(oneof = "errordata::HasContexts", tags = "1")] - pub has_contexts: ::core::option::Option, - #[prost(oneof = "errordata::HasException", tags = "4")] - pub has_exception: ::core::option::Option, - #[prost(oneof = "errordata::HasLocation", tags = "6")] - pub has_location: ::core::option::Option, - #[prost(oneof = "errordata::HasRequest", tags = "9")] - pub has_request: ::core::option::Option, - #[prost(oneof = "errordata::HasSdk", tags = "10")] - pub has_sdk: ::core::option::Option, - #[prost(oneof = "errordata::HasThreads", tags = "12")] - pub has_threads: ::core::option::Option, - #[prost(oneof = "errordata::HasUser", tags = "15")] - pub has_user: ::core::option::Option, - #[prost(oneof = "errordata::HasVersion", tags = "16")] - pub has_version: ::core::option::Option, -} -/// Nested message and enum types in `Errordata`. -pub mod errordata { - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct ErrordataContexts { - #[prost(oneof = "errordata_contexts::HasReplay", tags = "1")] - pub has_replay: ::core::option::Option, - #[prost(oneof = "errordata_contexts::HasTrace", tags = "2")] - pub has_trace: ::core::option::Option, - } - /// Nested message and enum types in `ErrordataContexts`. - pub mod errordata_contexts { - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct ErrordataContextsReplay { - #[prost(oneof = "errordata_contexts_replay::HasReplayId", tags = "1")] - pub has_replay_id: ::core::option::Option, - } - /// Nested message and enum types in `ErrordataContextsReplay`. - pub mod errordata_contexts_replay { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasReplayId { - #[prost(string, tag = "1")] - ReplayId(::prost::alloc::string::String), - } - } - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct ErrordataContextsTrace { - #[prost(oneof = "errordata_contexts_trace::HasSampled", tags = "1")] - pub has_sampled: ::core::option::Option, - #[prost(oneof = "errordata_contexts_trace::HasSpanId", tags = "2")] - pub has_span_id: ::core::option::Option, - #[prost(oneof = "errordata_contexts_trace::HasTraceId", tags = "3")] - pub has_trace_id: ::core::option::Option, - } - /// Nested message and enum types in `ErrordataContextsTrace`. - pub mod errordata_contexts_trace { - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasSampled { - #[prost(bool, tag = "1")] - Sampled(bool), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasSpanId { - #[prost(string, tag = "2")] - SpanId(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasTraceId { - #[prost(string, tag = "3")] - TraceId(::prost::alloc::string::String), - } - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasReplay { - #[prost(message, tag = "1")] - Replay(ErrordataContextsReplay), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasTrace { - #[prost(message, tag = "2")] - Trace(ErrordataContextsTrace), - } - } - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct ErrordataException { - #[prost(message, repeated, tag = "1")] - pub values: ::prost::alloc::vec::Vec, - } - /// Nested message and enum types in `ErrordataException`. - pub mod errordata_exception { - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct ErrordataExceptionValues { - #[prost(message, optional, tag = "4")] - pub r#type: ::core::option::Option<::prost_types::Value>, - #[prost(message, optional, tag = "5")] - pub value: ::core::option::Option<::prost_types::Value>, - #[prost(oneof = "errordata_exception_values::HasMechanism", tags = "1")] - pub has_mechanism: ::core::option::Option, - #[prost(oneof = "errordata_exception_values::HasStacktrace", tags = "2")] - pub has_stacktrace: ::core::option::Option, - #[prost(oneof = "errordata_exception_values::HasThreadId", tags = "3")] - pub has_thread_id: ::core::option::Option, - } - /// Nested message and enum types in `ErrordataExceptionValues`. - pub mod errordata_exception_values { - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct ErrordataExceptionValuesMechanism { - #[prost(message, optional, tag = "1")] - pub handled: ::core::option::Option<::prost_types::Value>, - #[prost(message, optional, tag = "2")] - pub r#type: ::core::option::Option<::prost_types::Value>, - } - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct ErrordataExceptionValuesStacktrace { - #[prost(message, repeated, tag = "1")] - pub frames: ::prost::alloc::vec::Vec< - errordata_exception_values_stacktrace::ErrordataExceptionValuesStacktraceFrames, - >, - } - /// Nested message and enum types in `ErrordataExceptionValuesStacktrace`. - pub mod errordata_exception_values_stacktrace { - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct ErrordataExceptionValuesStacktraceFrames { - #[prost(message, optional, tag = "1")] - pub abs_path: ::core::option::Option<::prost_types::Value>, - #[prost(message, optional, tag = "3")] - pub filename: ::core::option::Option<::prost_types::Value>, - #[prost(message, optional, tag = "4")] - pub function: ::core::option::Option<::prost_types::Value>, - #[prost(message, optional, tag = "7")] - pub module: ::core::option::Option<::prost_types::Value>, - #[prost(message, optional, tag = "8")] - pub package: ::core::option::Option<::prost_types::Value>, - #[prost( - oneof = "errordata_exception_values_stacktrace_frames::HasColno", - tags = "2" - )] - pub has_colno: ::core::option::Option< - errordata_exception_values_stacktrace_frames::HasColno, - >, - #[prost( - oneof = "errordata_exception_values_stacktrace_frames::HasInApp", - tags = "5" - )] - pub has_in_app: ::core::option::Option< - errordata_exception_values_stacktrace_frames::HasInApp, - >, - #[prost( - oneof = "errordata_exception_values_stacktrace_frames::HasLineno", - tags = "6" - )] - pub has_lineno: ::core::option::Option< - errordata_exception_values_stacktrace_frames::HasLineno, - >, - } - /// Nested message and enum types in `ErrordataExceptionValuesStacktraceFrames`. - pub mod errordata_exception_values_stacktrace_frames { - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasColno { - #[prost(int64, tag = "2")] - Colno(i64), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasInApp { - #[prost(bool, tag = "5")] - InApp(bool), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasLineno { - #[prost(int64, tag = "6")] - Lineno(i64), - } - } - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasMechanism { - #[prost(message, tag = "1")] - Mechanism(ErrordataExceptionValuesMechanism), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasStacktrace { - #[prost(message, tag = "2")] - Stacktrace(ErrordataExceptionValuesStacktrace), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasThreadId { - #[prost(message, tag = "3")] - ThreadId(::prost_types::Value), - } - } - } - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct ErrordataRequest { - #[prost(message, repeated, tag = "1")] - pub headers: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "2")] - pub method: ::core::option::Option<::prost_types::Value>, - } - /// Nested message and enum types in `ErrordataRequest`. - pub mod errordata_request { - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct ErrordataRequestHeaders { - #[prost(string, tag = "1")] - pub a0: ::prost::alloc::string::String, - #[prost(message, optional, tag = "2")] - pub a1: ::core::option::Option<::prost_types::Value>, - } - } - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct ErrordataSdk { - #[prost(message, repeated, tag = "1")] - pub integrations: ::prost::alloc::vec::Vec<::prost_types::Value>, - #[prost(message, optional, tag = "2")] - pub name: ::core::option::Option<::prost_types::Value>, - #[prost(message, optional, tag = "3")] - pub version: ::core::option::Option<::prost_types::Value>, - } - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct ErrordataTags { - #[prost(message, optional, tag = "1")] - pub a0: ::core::option::Option<::prost_types::Value>, - #[prost(message, optional, tag = "2")] - pub a1: ::core::option::Option<::prost_types::Value>, - } - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct ErrordataThreads { - #[prost(message, repeated, tag = "1")] - pub values: ::prost::alloc::vec::Vec, - } - /// Nested message and enum types in `ErrordataThreads`. - pub mod errordata_threads { - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct ErrordataThreadsValues { - #[prost(oneof = "errordata_threads_values::HasId", tags = "1")] - pub has_id: ::core::option::Option, - #[prost(oneof = "errordata_threads_values::HasMain", tags = "2")] - pub has_main: ::core::option::Option, - } - /// Nested message and enum types in `ErrordataThreadsValues`. - pub mod errordata_threads_values { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasId { - #[prost(message, tag = "1")] - Id(::prost_types::Value), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasMain { - #[prost(bool, tag = "2")] - Main(bool), - } - } - } - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct ErrordataUser { - #[prost(message, optional, tag = "1")] - pub email: ::core::option::Option<::prost_types::Value>, - #[prost(map = "string, message", tag = "2")] - pub geo: ::std::collections::HashMap<::prost::alloc::string::String, ::prost_types::Value>, - #[prost(message, optional, tag = "3")] - pub id: ::core::option::Option<::prost_types::Value>, - #[prost(message, optional, tag = "5")] - pub username: ::core::option::Option<::prost_types::Value>, - #[prost(oneof = "errordata_user::HasIpAddress", tags = "4")] - pub has_ip_address: ::core::option::Option, - } - /// Nested message and enum types in `ErrordataUser`. - pub mod errordata_user { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasIpAddress { - #[prost(string, tag = "4")] - IpAddress(::prost::alloc::string::String), - } - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasContexts { - #[prost(message, tag = "1")] - Contexts(ErrordataContexts), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasException { - #[prost(message, tag = "4")] - Exception(ErrordataException), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasLocation { - #[prost(string, tag = "6")] - Location(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasRequest { - #[prost(message, tag = "9")] - Request(ErrordataRequest), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasSdk { - #[prost(message, tag = "10")] - Sdk(ErrordataSdk), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasThreads { - #[prost(message, tag = "12")] - Threads(ErrordataThreads), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasUser { - #[prost(message, tag = "15")] - User(ErrordataUser), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasVersion { - #[prost(string, tag = "16")] - Version(::prost::alloc::string::String), - } -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Errormessage { - #[prost(message, optional, tag = "1")] - pub data: ::core::option::Option, - #[prost(string, tag = "2")] - pub datetime: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub event_id: ::prost::alloc::string::String, - #[prost(int64, tag = "4")] - pub group_id: i64, - #[prost(string, tag = "5")] - pub message: ::prost::alloc::string::String, - #[prost(string, tag = "7")] - pub primary_hash: ::prost::alloc::string::String, - #[prost(int64, tag = "8")] - pub project_id: i64, - #[prost(oneof = "errormessage::HasPlatform", tags = "6")] - pub has_platform: ::core::option::Option, - #[prost(oneof = "errormessage::HasRetentionDays", tags = "9")] - pub has_retention_days: ::core::option::Option, -} -/// Nested message and enum types in `Errormessage`. -pub mod errormessage { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasPlatform { - #[prost(string, tag = "6")] - Platform(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasRetentionDays { - #[prost(int64, tag = "9")] - RetentionDays(i64), - } -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Exception { - #[prost(message, repeated, tag = "1")] - pub values: ::prost::alloc::vec::Vec, -} -/// Nested message and enum types in `Exception`. -pub mod exception { - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct ExceptionValues { - #[prost(message, optional, tag = "4")] - pub r#type: ::core::option::Option<::prost_types::Value>, - #[prost(message, optional, tag = "5")] - pub value: ::core::option::Option<::prost_types::Value>, - #[prost(oneof = "exception_values::HasMechanism", tags = "1")] - pub has_mechanism: ::core::option::Option, - #[prost(oneof = "exception_values::HasStacktrace", tags = "2")] - pub has_stacktrace: ::core::option::Option, - #[prost(oneof = "exception_values::HasThreadId", tags = "3")] - pub has_thread_id: ::core::option::Option, - } - /// Nested message and enum types in `ExceptionValues`. - pub mod exception_values { - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct ExceptionValuesMechanism { - #[prost(message, optional, tag = "1")] - pub handled: ::core::option::Option<::prost_types::Value>, - #[prost(message, optional, tag = "2")] - pub r#type: ::core::option::Option<::prost_types::Value>, - } - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct ExceptionValuesStacktrace { - #[prost(message, repeated, tag = "1")] - pub frames: ::prost::alloc::vec::Vec< - exception_values_stacktrace::ExceptionValuesStacktraceFrames, - >, - } - /// Nested message and enum types in `ExceptionValuesStacktrace`. - pub mod exception_values_stacktrace { - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct ExceptionValuesStacktraceFrames { - #[prost(message, optional, tag = "1")] - pub abs_path: ::core::option::Option<::prost_types::Value>, - #[prost(message, optional, tag = "3")] - pub filename: ::core::option::Option<::prost_types::Value>, - #[prost(message, optional, tag = "4")] - pub function: ::core::option::Option<::prost_types::Value>, - #[prost(message, optional, tag = "7")] - pub module: ::core::option::Option<::prost_types::Value>, - #[prost(message, optional, tag = "8")] - pub package: ::core::option::Option<::prost_types::Value>, - #[prost(oneof = "exception_values_stacktrace_frames::HasColno", tags = "2")] - pub has_colno: ::core::option::Option, - #[prost(oneof = "exception_values_stacktrace_frames::HasInApp", tags = "5")] - pub has_in_app: - ::core::option::Option, - #[prost(oneof = "exception_values_stacktrace_frames::HasLineno", tags = "6")] - pub has_lineno: - ::core::option::Option, - } - /// Nested message and enum types in `ExceptionValuesStacktraceFrames`. - pub mod exception_values_stacktrace_frames { - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasColno { - #[prost(int64, tag = "2")] - Colno(i64), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasInApp { - #[prost(bool, tag = "5")] - InApp(bool), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasLineno { - #[prost(int64, tag = "6")] - Lineno(i64), - } - } - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasMechanism { - #[prost(message, tag = "1")] - Mechanism(ExceptionValuesMechanism), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasStacktrace { - #[prost(message, tag = "2")] - Stacktrace(ExceptionValuesStacktrace), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasThreadId { - #[prost(message, tag = "3")] - ThreadId(::prost_types::Value), - } - } -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Exceptionmechanism { - #[prost(message, optional, tag = "1")] - pub handled: ::core::option::Option<::prost_types::Value>, - #[prost(message, optional, tag = "2")] - pub r#type: ::core::option::Option<::prost_types::Value>, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Exceptionvalue { - #[prost(message, optional, tag = "4")] - pub r#type: ::core::option::Option<::prost_types::Value>, - #[prost(message, optional, tag = "5")] - pub value: ::core::option::Option<::prost_types::Value>, - #[prost(oneof = "exceptionvalue::HasMechanism", tags = "1")] - pub has_mechanism: ::core::option::Option, - #[prost(oneof = "exceptionvalue::HasStacktrace", tags = "2")] - pub has_stacktrace: ::core::option::Option, - #[prost(oneof = "exceptionvalue::HasThreadId", tags = "3")] - pub has_thread_id: ::core::option::Option, -} -/// Nested message and enum types in `Exceptionvalue`. -pub mod exceptionvalue { - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct ExceptionvalueMechanism { - #[prost(message, optional, tag = "1")] - pub handled: ::core::option::Option<::prost_types::Value>, - #[prost(message, optional, tag = "2")] - pub r#type: ::core::option::Option<::prost_types::Value>, - } - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct ExceptionvalueStacktrace { - #[prost(message, repeated, tag = "1")] - pub frames: - ::prost::alloc::vec::Vec, - } - /// Nested message and enum types in `ExceptionvalueStacktrace`. - pub mod exceptionvalue_stacktrace { - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct ExceptionvalueStacktraceFrames { - #[prost(message, optional, tag = "1")] - pub abs_path: ::core::option::Option<::prost_types::Value>, - #[prost(message, optional, tag = "3")] - pub filename: ::core::option::Option<::prost_types::Value>, - #[prost(message, optional, tag = "4")] - pub function: ::core::option::Option<::prost_types::Value>, - #[prost(message, optional, tag = "7")] - pub module: ::core::option::Option<::prost_types::Value>, - #[prost(message, optional, tag = "8")] - pub package: ::core::option::Option<::prost_types::Value>, - #[prost(oneof = "exceptionvalue_stacktrace_frames::HasColno", tags = "2")] - pub has_colno: ::core::option::Option, - #[prost(oneof = "exceptionvalue_stacktrace_frames::HasInApp", tags = "5")] - pub has_in_app: ::core::option::Option, - #[prost(oneof = "exceptionvalue_stacktrace_frames::HasLineno", tags = "6")] - pub has_lineno: ::core::option::Option, - } - /// Nested message and enum types in `ExceptionvalueStacktraceFrames`. - pub mod exceptionvalue_stacktrace_frames { - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasColno { - #[prost(int64, tag = "2")] - Colno(i64), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasInApp { - #[prost(bool, tag = "5")] - InApp(bool), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasLineno { - #[prost(int64, tag = "6")] - Lineno(i64), - } - } - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasMechanism { - #[prost(message, tag = "1")] - Mechanism(ExceptionvalueMechanism), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasStacktrace { - #[prost(message, tag = "2")] - Stacktrace(ExceptionvalueStacktrace), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasThreadId { - #[prost(message, tag = "3")] - ThreadId(::prost_types::Value), - } -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Inserteventmessage { - #[prost(int64, tag = "1")] - pub a0: i64, - #[prost(string, tag = "2")] - pub a1: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub a2: ::core::option::Option, - #[prost(message, optional, tag = "4")] - pub a3: ::core::option::Option<::prost_types::Value>, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Replaycontext { - #[prost(oneof = "replaycontext::HasReplayId", tags = "1")] - pub has_replay_id: ::core::option::Option, -} -/// Nested message and enum types in `Replaycontext`. -pub mod replaycontext { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasReplayId { - #[prost(string, tag = "1")] - ReplayId(::prost::alloc::string::String), - } -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Request { - #[prost(message, repeated, tag = "1")] - pub headers: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "2")] - pub method: ::core::option::Option<::prost_types::Value>, -} -/// Nested message and enum types in `Request`. -pub mod request { - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct RequestHeaders { - #[prost(string, tag = "1")] - pub a0: ::prost::alloc::string::String, - #[prost(message, optional, tag = "2")] - pub a1: ::core::option::Option<::prost_types::Value>, - } -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Sdk { - #[prost(message, repeated, tag = "1")] - pub integrations: ::prost::alloc::vec::Vec<::prost_types::Value>, - #[prost(message, optional, tag = "2")] - pub name: ::core::option::Option<::prost_types::Value>, - #[prost(message, optional, tag = "3")] - pub version: ::core::option::Option<::prost_types::Value>, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Stackframe { - #[prost(message, optional, tag = "1")] - pub abs_path: ::core::option::Option<::prost_types::Value>, - #[prost(message, optional, tag = "3")] - pub filename: ::core::option::Option<::prost_types::Value>, - #[prost(message, optional, tag = "4")] - pub function: ::core::option::Option<::prost_types::Value>, - #[prost(message, optional, tag = "7")] - pub module: ::core::option::Option<::prost_types::Value>, - #[prost(message, optional, tag = "8")] - pub package: ::core::option::Option<::prost_types::Value>, - #[prost(oneof = "stackframe::HasColno", tags = "2")] - pub has_colno: ::core::option::Option, - #[prost(oneof = "stackframe::HasInApp", tags = "5")] - pub has_in_app: ::core::option::Option, - #[prost(oneof = "stackframe::HasLineno", tags = "6")] - pub has_lineno: ::core::option::Option, -} -/// Nested message and enum types in `Stackframe`. -pub mod stackframe { - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasColno { - #[prost(int64, tag = "2")] - Colno(i64), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasInApp { - #[prost(bool, tag = "5")] - InApp(bool), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasLineno { - #[prost(int64, tag = "6")] - Lineno(i64), - } -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Stacktrace { - #[prost(message, repeated, tag = "1")] - pub frames: ::prost::alloc::vec::Vec, -} -/// Nested message and enum types in `Stacktrace`. -pub mod stacktrace { - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct StacktraceFrames { - #[prost(message, optional, tag = "1")] - pub abs_path: ::core::option::Option<::prost_types::Value>, - #[prost(message, optional, tag = "3")] - pub filename: ::core::option::Option<::prost_types::Value>, - #[prost(message, optional, tag = "4")] - pub function: ::core::option::Option<::prost_types::Value>, - #[prost(message, optional, tag = "7")] - pub module: ::core::option::Option<::prost_types::Value>, - #[prost(message, optional, tag = "8")] - pub package: ::core::option::Option<::prost_types::Value>, - #[prost(oneof = "stacktrace_frames::HasColno", tags = "2")] - pub has_colno: ::core::option::Option, - #[prost(oneof = "stacktrace_frames::HasInApp", tags = "5")] - pub has_in_app: ::core::option::Option, - #[prost(oneof = "stacktrace_frames::HasLineno", tags = "6")] - pub has_lineno: ::core::option::Option, - } - /// Nested message and enum types in `StacktraceFrames`. - pub mod stacktrace_frames { - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasColno { - #[prost(int64, tag = "2")] - Colno(i64), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasInApp { - #[prost(bool, tag = "5")] - InApp(bool), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasLineno { - #[prost(int64, tag = "6")] - Lineno(i64), - } - } -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Thread { - #[prost(message, repeated, tag = "1")] - pub values: ::prost::alloc::vec::Vec, -} -/// Nested message and enum types in `Thread`. -pub mod thread { - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct ThreadValues { - #[prost(oneof = "thread_values::HasId", tags = "1")] - pub has_id: ::core::option::Option, - #[prost(oneof = "thread_values::HasMain", tags = "2")] - pub has_main: ::core::option::Option, - } - /// Nested message and enum types in `ThreadValues`. - pub mod thread_values { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasId { - #[prost(message, tag = "1")] - Id(::prost_types::Value), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasMain { - #[prost(bool, tag = "2")] - Main(bool), - } - } -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Threadvalue { - #[prost(oneof = "threadvalue::HasId", tags = "1")] - pub has_id: ::core::option::Option, - #[prost(oneof = "threadvalue::HasMain", tags = "2")] - pub has_main: ::core::option::Option, -} -/// Nested message and enum types in `Threadvalue`. -pub mod threadvalue { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasId { - #[prost(message, tag = "1")] - Id(::prost_types::Value), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasMain { - #[prost(bool, tag = "2")] - Main(bool), - } -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Tracecontext { - #[prost(oneof = "tracecontext::HasSampled", tags = "1")] - pub has_sampled: ::core::option::Option, - #[prost(oneof = "tracecontext::HasSpanId", tags = "2")] - pub has_span_id: ::core::option::Option, - #[prost(oneof = "tracecontext::HasTraceId", tags = "3")] - pub has_trace_id: ::core::option::Option, -} -/// Nested message and enum types in `Tracecontext`. -pub mod tracecontext { - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasSampled { - #[prost(bool, tag = "1")] - Sampled(bool), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasSpanId { - #[prost(string, tag = "2")] - SpanId(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasTraceId { - #[prost(string, tag = "3")] - TraceId(::prost::alloc::string::String), - } -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct User { - #[prost(message, optional, tag = "1")] - pub email: ::core::option::Option<::prost_types::Value>, - #[prost(map = "string, message", tag = "2")] - pub geo: ::std::collections::HashMap<::prost::alloc::string::String, ::prost_types::Value>, - #[prost(message, optional, tag = "3")] - pub id: ::core::option::Option<::prost_types::Value>, - #[prost(message, optional, tag = "5")] - pub username: ::core::option::Option<::prost_types::Value>, - #[prost(oneof = "user::HasIpAddress", tags = "4")] - pub has_ip_address: ::core::option::Option, -} -/// Nested message and enum types in `User`. -pub mod user { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasIpAddress { - #[prost(string, tag = "4")] - IpAddress(::prost::alloc::string::String), - } -} diff --git a/sentry_protos/src/sentry_protos.options.v1.rs b/sentry_protos/src/sentry_protos.options.v1.rs deleted file mode 100644 index f215544c24a..00000000000 --- a/sentry_protos/src/sentry_protos.options.v1.rs +++ /dev/null @@ -1,46 +0,0 @@ -// This file is @generated by prost-build. -/// Used to signal that a schema is associated with the output of a kafka topic, including -/// some metadata about that. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TopicConfig { - #[prost(string, tag = "1")] - pub topic: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub services: ::core::option::Option, - #[prost(string, tag = "4")] - pub pipeline: ::prost::alloc::string::String, - #[prost(map = "string, string", tag = "5")] - pub topic_creation_config: - ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, - #[prost(oneof = "topic_config::HasEnforcedPartitionCount", tags = "6")] - pub has_enforced_partition_count: - ::core::option::Option, -} -/// Nested message and enum types in `TopicConfig`. -pub mod topic_config { - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasEnforcedPartitionCount { - #[prost(uint64, tag = "6")] - EnforcedPartitionCount(u64), - } -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ServicesData { - #[prost(string, repeated, tag = "1")] - pub consumers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - #[prost(string, repeated, tag = "2")] - pub producers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -/// Signals that a producer of this data intends a specific value as a potential discriminator. -/// At a protocol level, consts should not be enforced or validated, but they can be used to -/// make decisions. They are a lightweight coordination paradigm with little more guarantee -/// than best-effort. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Const { - #[prost(int64, tag = "1")] - pub int: i64, - #[prost(string, tag = "2")] - pub string: ::prost::alloc::string::String, -} diff --git a/sentry_protos/src/sentry_protos.relay.v1.rs b/sentry_protos/src/sentry_protos.relay.v1.rs deleted file mode 100644 index 1c8bf957c30..00000000000 --- a/sentry_protos/src/sentry_protos.relay.v1.rs +++ /dev/null @@ -1,6236 +0,0 @@ -// This file is @generated by prost-build. -/// -/// The sentry v7 event structure. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Event { - #[prost(map = "string, message", tag = "2")] - pub contexts: ::std::collections::HashMap<::prost::alloc::string::String, ::prost_types::Value>, - #[prost(message, repeated, tag = "7")] - pub errors: ::prost::alloc::vec::Vec, - #[prost(string, repeated, tag = "11")] - pub fingerprint: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - #[prost(map = "string, string", tag = "15")] - pub modules: - ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, - #[prost(oneof = "event::HasBreadcrumbs", tags = "1")] - pub has_breadcrumbs: ::core::option::Option, - #[prost(oneof = "event::HasCulprit", tags = "3")] - pub has_culprit: ::core::option::Option, - #[prost(oneof = "event::HasDebugMeta", tags = "4")] - pub has_debug_meta: ::core::option::Option, - #[prost(oneof = "event::HasDist", tags = "5")] - pub has_dist: ::core::option::Option, - #[prost(oneof = "event::HasEnvironment", tags = "6")] - pub has_environment: ::core::option::Option, - #[prost(oneof = "event::HasEventId", tags = "8")] - pub has_event_id: ::core::option::Option, - #[prost(oneof = "event::HasException", tags = "9")] - pub has_exception: ::core::option::Option, - #[prost(oneof = "event::HasExtra", tags = "10")] - pub has_extra: ::core::option::Option, - #[prost(oneof = "event::HasLevel", tags = "12")] - pub has_level: ::core::option::Option, - #[prost(oneof = "event::HasLogentry", tags = "13")] - pub has_logentry: ::core::option::Option, - #[prost(oneof = "event::HasLogger", tags = "14")] - pub has_logger: ::core::option::Option, - #[prost(oneof = "event::HasPlatform", tags = "16")] - pub has_platform: ::core::option::Option, - #[prost(oneof = "event::HasReceived", tags = "17")] - pub has_received: ::core::option::Option, - #[prost(oneof = "event::HasRelease", tags = "18")] - pub has_release: ::core::option::Option, - #[prost(oneof = "event::HasRequest", tags = "19")] - pub has_request: ::core::option::Option, - #[prost(oneof = "event::HasSdk", tags = "20")] - pub has_sdk: ::core::option::Option, - #[prost(oneof = "event::HasServerName", tags = "21")] - pub has_server_name: ::core::option::Option, - #[prost(oneof = "event::HasStacktrace", tags = "22")] - pub has_stacktrace: ::core::option::Option, - #[prost(oneof = "event::HasTags", tags = "23")] - pub has_tags: ::core::option::Option, - #[prost(oneof = "event::HasThreads", tags = "24")] - pub has_threads: ::core::option::Option, - #[prost(oneof = "event::HasTimeSpent", tags = "25")] - pub has_time_spent: ::core::option::Option, - #[prost(oneof = "event::HasTimestamp", tags = "26")] - pub has_timestamp: ::core::option::Option, - #[prost(oneof = "event::HasTransaction", tags = "27")] - pub has_transaction: ::core::option::Option, - #[prost(oneof = "event::HasTransactionInfo", tags = "28")] - pub has_transaction_info: ::core::option::Option, - #[prost(oneof = "event::HasType", tags = "29")] - pub has_type: ::core::option::Option, - #[prost(oneof = "event::HasUser", tags = "30")] - pub has_user: ::core::option::Option, - #[prost(oneof = "event::HasVersion", tags = "31")] - pub has_version: ::core::option::Option, -} -/// Nested message and enum types in `Event`. -pub mod event { - /// - /// List of breadcrumbs recorded before this event. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct EventBreadcrumbs { - #[prost(message, repeated, tag = "1")] - pub values: ::prost::alloc::vec::Vec, - } - /// Nested message and enum types in `EventBreadcrumbs`. - pub mod event_breadcrumbs { - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct EventBreadcrumbsValues { - #[prost(oneof = "event_breadcrumbs_values::HasCategory", tags = "1")] - pub has_category: ::core::option::Option, - #[prost(oneof = "event_breadcrumbs_values::HasData", tags = "2")] - pub has_data: ::core::option::Option, - #[prost(oneof = "event_breadcrumbs_values::HasEventId", tags = "3")] - pub has_event_id: ::core::option::Option, - #[prost(oneof = "event_breadcrumbs_values::HasLevel", tags = "4")] - pub has_level: ::core::option::Option, - #[prost(oneof = "event_breadcrumbs_values::HasMessage", tags = "5")] - pub has_message: ::core::option::Option, - #[prost(oneof = "event_breadcrumbs_values::HasTimestamp", tags = "6")] - pub has_timestamp: ::core::option::Option, - #[prost(oneof = "event_breadcrumbs_values::HasType", tags = "7")] - pub has_type: ::core::option::Option, - } - /// Nested message and enum types in `EventBreadcrumbsValues`. - pub mod event_breadcrumbs_values { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasCategory { - #[prost(string, tag = "1")] - Category(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasData { - #[prost(message, tag = "2")] - Data(::prost_types::Value), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasEventId { - #[prost(string, tag = "3")] - EventId(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasLevel { - #[prost(string, tag = "4")] - Level(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasMessage { - #[prost(string, tag = "5")] - Message(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasTimestamp { - #[prost(message, tag = "6")] - Timestamp(::prost_types::Value), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasType { - #[prost(string, tag = "7")] - Type(::prost::alloc::string::String), - } - } - } - /// - /// Meta data for event processing and debugging. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct EventDebugMeta { - #[prost(message, repeated, tag = "1")] - pub images: ::prost::alloc::vec::Vec<::prost_types::Value>, - #[prost(oneof = "event_debug_meta::HasSdkInfo", tags = "2")] - pub has_sdk_info: ::core::option::Option, - } - /// Nested message and enum types in `EventDebugMeta`. - pub mod event_debug_meta { - /// - /// Information about the system SDK (e.g. iOS SDK). - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct EventDebugMetaSdkInfo { - #[prost(oneof = "event_debug_meta_sdk_info::HasSdkName", tags = "1")] - pub has_sdk_name: ::core::option::Option, - #[prost(oneof = "event_debug_meta_sdk_info::HasVersionMajor", tags = "2")] - pub has_version_major: - ::core::option::Option, - #[prost(oneof = "event_debug_meta_sdk_info::HasVersionMinor", tags = "3")] - pub has_version_minor: - ::core::option::Option, - #[prost(oneof = "event_debug_meta_sdk_info::HasVersionPatchlevel", tags = "4")] - pub has_version_patchlevel: - ::core::option::Option, - } - /// Nested message and enum types in `EventDebugMetaSdkInfo`. - pub mod event_debug_meta_sdk_info { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasSdkName { - #[prost(string, tag = "1")] - SdkName(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasVersionMajor { - #[prost(uint64, tag = "2")] - VersionMajor(u64), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasVersionMinor { - #[prost(uint64, tag = "3")] - VersionMinor(u64), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasVersionPatchlevel { - #[prost(uint64, tag = "4")] - VersionPatchlevel(u64), - } - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasSdkInfo { - #[prost(message, tag = "2")] - SdkInfo(EventDebugMetaSdkInfo), - } - } - /// - /// Errors encountered during processing. Intended to be phased out in favor of - /// annotation/metadata system. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct EventErrors { - #[prost(string, tag = "2")] - pub r#type: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub value: ::core::option::Option<::prost_types::Value>, - #[prost(oneof = "event_errors::HasName", tags = "1")] - pub has_name: ::core::option::Option, - } - /// Nested message and enum types in `EventErrors`. - pub mod event_errors { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasName { - #[prost(string, tag = "1")] - Name(::prost::alloc::string::String), - } - } - /// - /// One or multiple chained (nested) exceptions. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct EventException { - #[prost(message, repeated, tag = "1")] - pub values: ::prost::alloc::vec::Vec, - } - /// Nested message and enum types in `EventException`. - pub mod event_exception { - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct EventExceptionValues { - #[prost(oneof = "event_exception_values::HasMechanism", tags = "1")] - pub has_mechanism: ::core::option::Option, - #[prost(oneof = "event_exception_values::HasModule", tags = "2")] - pub has_module: ::core::option::Option, - #[prost(oneof = "event_exception_values::HasStacktrace", tags = "3")] - pub has_stacktrace: ::core::option::Option, - #[prost(oneof = "event_exception_values::HasThreadId", tags = "4")] - pub has_thread_id: ::core::option::Option, - #[prost(oneof = "event_exception_values::HasType", tags = "5")] - pub has_type: ::core::option::Option, - #[prost(oneof = "event_exception_values::HasValue", tags = "6")] - pub has_value: ::core::option::Option, - } - /// Nested message and enum types in `EventExceptionValues`. - pub mod event_exception_values { - /// - /// Mechanism by which this exception was generated and handled. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct EventExceptionValuesMechanism { - #[prost(string, tag = "11")] - pub r#type: ::prost::alloc::string::String, - #[prost(oneof = "event_exception_values_mechanism::HasData", tags = "1")] - pub has_data: ::core::option::Option, - #[prost(oneof = "event_exception_values_mechanism::HasDescription", tags = "2")] - pub has_description: - ::core::option::Option, - #[prost(oneof = "event_exception_values_mechanism::HasExceptionId", tags = "3")] - pub has_exception_id: - ::core::option::Option, - #[prost(oneof = "event_exception_values_mechanism::HasHandled", tags = "4")] - pub has_handled: - ::core::option::Option, - #[prost(oneof = "event_exception_values_mechanism::HasHelpLink", tags = "5")] - pub has_help_link: - ::core::option::Option, - #[prost( - oneof = "event_exception_values_mechanism::HasIsExceptionGroup", - tags = "6" - )] - pub has_is_exception_group: - ::core::option::Option, - #[prost(oneof = "event_exception_values_mechanism::HasMeta", tags = "7")] - pub has_meta: ::core::option::Option, - #[prost(oneof = "event_exception_values_mechanism::HasParentId", tags = "8")] - pub has_parent_id: - ::core::option::Option, - #[prost(oneof = "event_exception_values_mechanism::HasSource", tags = "9")] - pub has_source: ::core::option::Option, - #[prost(oneof = "event_exception_values_mechanism::HasSynthetic", tags = "10")] - pub has_synthetic: - ::core::option::Option, - } - /// Nested message and enum types in `EventExceptionValuesMechanism`. - pub mod event_exception_values_mechanism { - /// - /// Operating system or runtime meta information. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct EventExceptionValuesMechanismMeta { - #[prost(oneof = "event_exception_values_mechanism_meta::HasErrno", tags = "1")] - pub has_errno: - ::core::option::Option, - #[prost( - oneof = "event_exception_values_mechanism_meta::HasMachException", - tags = "2" - )] - pub has_mach_exception: ::core::option::Option< - event_exception_values_mechanism_meta::HasMachException, - >, - #[prost( - oneof = "event_exception_values_mechanism_meta::HasNsError", - tags = "3" - )] - pub has_ns_error: - ::core::option::Option, - #[prost( - oneof = "event_exception_values_mechanism_meta::HasSignal", - tags = "4" - )] - pub has_signal: - ::core::option::Option, - } - /// Nested message and enum types in `EventExceptionValuesMechanismMeta`. - pub mod event_exception_values_mechanism_meta { - /// - /// Optional ISO C standard error code. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct EventExceptionValuesMechanismMetaErrno { - #[prost( - oneof = "event_exception_values_mechanism_meta_errno::HasName", - tags = "1" - )] - pub has_name: ::core::option::Option< - event_exception_values_mechanism_meta_errno::HasName, - >, - #[prost( - oneof = "event_exception_values_mechanism_meta_errno::HasNumber", - tags = "2" - )] - pub has_number: ::core::option::Option< - event_exception_values_mechanism_meta_errno::HasNumber, - >, - } - /// Nested message and enum types in `EventExceptionValuesMechanismMetaErrno`. - pub mod event_exception_values_mechanism_meta_errno { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasName { - #[prost(string, tag = "1")] - Name(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasNumber { - #[prost(int64, tag = "2")] - Number(i64), - } - } - /// - /// A Mach Exception on Apple systems comprising a code triple and optional descriptions. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct EventExceptionValuesMechanismMetaMachException { - #[prost( - oneof = "event_exception_values_mechanism_meta_mach_exception::HasCode", - tags = "1" - )] - pub has_code: ::core::option::Option< - event_exception_values_mechanism_meta_mach_exception::HasCode, - >, - #[prost( - oneof = "event_exception_values_mechanism_meta_mach_exception::HasException", - tags = "2" - )] - pub has_exception: ::core::option::Option< - event_exception_values_mechanism_meta_mach_exception::HasException, - >, - #[prost( - oneof = "event_exception_values_mechanism_meta_mach_exception::HasName", - tags = "3" - )] - pub has_name: ::core::option::Option< - event_exception_values_mechanism_meta_mach_exception::HasName, - >, - #[prost( - oneof = "event_exception_values_mechanism_meta_mach_exception::HasSubcode", - tags = "4" - )] - pub has_subcode: ::core::option::Option< - event_exception_values_mechanism_meta_mach_exception::HasSubcode, - >, - } - /// Nested message and enum types in `EventExceptionValuesMechanismMetaMachException`. - pub mod event_exception_values_mechanism_meta_mach_exception { - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasCode { - #[prost(uint64, tag = "1")] - Code(u64), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasException { - #[prost(int64, tag = "2")] - Exception(i64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasName { - #[prost(string, tag = "3")] - Name(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasSubcode { - #[prost(uint64, tag = "4")] - Subcode(u64), - } - } - /// - /// An NSError on Apple systems comprising code and signal. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct EventExceptionValuesMechanismMetaNsError { - #[prost( - oneof = "event_exception_values_mechanism_meta_ns_error::HasCode", - tags = "1" - )] - pub has_code: ::core::option::Option< - event_exception_values_mechanism_meta_ns_error::HasCode, - >, - #[prost( - oneof = "event_exception_values_mechanism_meta_ns_error::HasDomain", - tags = "2" - )] - pub has_domain: ::core::option::Option< - event_exception_values_mechanism_meta_ns_error::HasDomain, - >, - } - /// Nested message and enum types in `EventExceptionValuesMechanismMetaNsError`. - pub mod event_exception_values_mechanism_meta_ns_error { - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasCode { - #[prost(int64, tag = "1")] - Code(i64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasDomain { - #[prost(string, tag = "2")] - Domain(::prost::alloc::string::String), - } - } - /// - /// Information on the POSIX signal. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct EventExceptionValuesMechanismMetaSignal { - #[prost( - oneof = "event_exception_values_mechanism_meta_signal::HasCode", - tags = "1" - )] - pub has_code: ::core::option::Option< - event_exception_values_mechanism_meta_signal::HasCode, - >, - #[prost( - oneof = "event_exception_values_mechanism_meta_signal::HasCodeName", - tags = "2" - )] - pub has_code_name: ::core::option::Option< - event_exception_values_mechanism_meta_signal::HasCodeName, - >, - #[prost( - oneof = "event_exception_values_mechanism_meta_signal::HasName", - tags = "3" - )] - pub has_name: ::core::option::Option< - event_exception_values_mechanism_meta_signal::HasName, - >, - #[prost( - oneof = "event_exception_values_mechanism_meta_signal::HasNumber", - tags = "4" - )] - pub has_number: ::core::option::Option< - event_exception_values_mechanism_meta_signal::HasNumber, - >, - } - /// Nested message and enum types in `EventExceptionValuesMechanismMetaSignal`. - pub mod event_exception_values_mechanism_meta_signal { - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasCode { - #[prost(int64, tag = "1")] - Code(i64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasCodeName { - #[prost(string, tag = "2")] - CodeName(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasName { - #[prost(string, tag = "3")] - Name(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasNumber { - #[prost(int64, tag = "4")] - Number(i64), - } - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasErrno { - #[prost(message, tag = "1")] - Errno(EventExceptionValuesMechanismMetaErrno), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasMachException { - #[prost(message, tag = "2")] - MachException(EventExceptionValuesMechanismMetaMachException), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasNsError { - #[prost(message, tag = "3")] - NsError(EventExceptionValuesMechanismMetaNsError), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasSignal { - #[prost(message, tag = "4")] - Signal(EventExceptionValuesMechanismMetaSignal), - } - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasData { - #[prost(message, tag = "1")] - Data(::prost_types::Value), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasDescription { - #[prost(string, tag = "2")] - Description(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasExceptionId { - #[prost(uint64, tag = "3")] - ExceptionId(u64), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasHandled { - #[prost(bool, tag = "4")] - Handled(bool), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasHelpLink { - #[prost(string, tag = "5")] - HelpLink(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasIsExceptionGroup { - #[prost(bool, tag = "6")] - IsExceptionGroup(bool), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasMeta { - #[prost(message, tag = "7")] - Meta(EventExceptionValuesMechanismMeta), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasParentId { - #[prost(uint64, tag = "8")] - ParentId(u64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasSource { - #[prost(string, tag = "9")] - Source(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasSynthetic { - #[prost(bool, tag = "10")] - Synthetic(bool), - } - } - /// - /// Stack trace containing frames of this exception. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct EventExceptionValuesStacktrace { - #[prost(message, repeated, tag = "1")] - pub frames: ::prost::alloc::vec::Vec< - event_exception_values_stacktrace::EventExceptionValuesStacktraceFrames, - >, - #[prost(map = "string, string", tag = "4")] - pub registers: ::std::collections::HashMap< - ::prost::alloc::string::String, - ::prost::alloc::string::String, - >, - #[prost( - oneof = "event_exception_values_stacktrace::HasInstructionAddrAdjustment", - tags = "2" - )] - pub has_instruction_addr_adjustment: ::core::option::Option< - event_exception_values_stacktrace::HasInstructionAddrAdjustment, - >, - #[prost(oneof = "event_exception_values_stacktrace::HasLang", tags = "3")] - pub has_lang: ::core::option::Option, - #[prost(oneof = "event_exception_values_stacktrace::HasSnapshot", tags = "5")] - pub has_snapshot: - ::core::option::Option, - } - /// Nested message and enum types in `EventExceptionValuesStacktrace`. - pub mod event_exception_values_stacktrace { - /// - /// Required. A non-empty list of stack frames. The list is ordered from caller to callee, or - /// oldest to youngest. The last frame is the one creating the exception. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct EventExceptionValuesStacktraceFrames { - #[prost(string, repeated, tag = "16")] - pub post_context: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - #[prost(string, repeated, tag = "17")] - pub pre_context: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - #[prost( - oneof = "event_exception_values_stacktrace_frames::HasAbsPath", - tags = "1" - )] - pub has_abs_path: ::core::option::Option< - event_exception_values_stacktrace_frames::HasAbsPath, - >, - #[prost( - oneof = "event_exception_values_stacktrace_frames::HasAddrMode", - tags = "2" - )] - pub has_addr_mode: ::core::option::Option< - event_exception_values_stacktrace_frames::HasAddrMode, - >, - #[prost( - oneof = "event_exception_values_stacktrace_frames::HasColno", - tags = "3" - )] - pub has_colno: - ::core::option::Option, - #[prost( - oneof = "event_exception_values_stacktrace_frames::HasContextLine", - tags = "4" - )] - pub has_context_line: ::core::option::Option< - event_exception_values_stacktrace_frames::HasContextLine, - >, - #[prost( - oneof = "event_exception_values_stacktrace_frames::HasFilename", - tags = "5" - )] - pub has_filename: ::core::option::Option< - event_exception_values_stacktrace_frames::HasFilename, - >, - #[prost( - oneof = "event_exception_values_stacktrace_frames::HasFunction", - tags = "6" - )] - pub has_function: ::core::option::Option< - event_exception_values_stacktrace_frames::HasFunction, - >, - #[prost( - oneof = "event_exception_values_stacktrace_frames::HasFunctionId", - tags = "7" - )] - pub has_function_id: ::core::option::Option< - event_exception_values_stacktrace_frames::HasFunctionId, - >, - #[prost( - oneof = "event_exception_values_stacktrace_frames::HasImageAddr", - tags = "8" - )] - pub has_image_addr: ::core::option::Option< - event_exception_values_stacktrace_frames::HasImageAddr, - >, - #[prost( - oneof = "event_exception_values_stacktrace_frames::HasInApp", - tags = "9" - )] - pub has_in_app: - ::core::option::Option, - #[prost( - oneof = "event_exception_values_stacktrace_frames::HasInstructionAddr", - tags = "10" - )] - pub has_instruction_addr: ::core::option::Option< - event_exception_values_stacktrace_frames::HasInstructionAddr, - >, - #[prost( - oneof = "event_exception_values_stacktrace_frames::HasLineno", - tags = "11" - )] - pub has_lineno: - ::core::option::Option, - #[prost( - oneof = "event_exception_values_stacktrace_frames::HasLock", - tags = "12" - )] - pub has_lock: - ::core::option::Option, - #[prost( - oneof = "event_exception_values_stacktrace_frames::HasModule", - tags = "13" - )] - pub has_module: - ::core::option::Option, - #[prost( - oneof = "event_exception_values_stacktrace_frames::HasPackage", - tags = "14" - )] - pub has_package: ::core::option::Option< - event_exception_values_stacktrace_frames::HasPackage, - >, - #[prost( - oneof = "event_exception_values_stacktrace_frames::HasPlatform", - tags = "15" - )] - pub has_platform: ::core::option::Option< - event_exception_values_stacktrace_frames::HasPlatform, - >, - #[prost( - oneof = "event_exception_values_stacktrace_frames::HasRawFunction", - tags = "18" - )] - pub has_raw_function: ::core::option::Option< - event_exception_values_stacktrace_frames::HasRawFunction, - >, - #[prost( - oneof = "event_exception_values_stacktrace_frames::HasStackStart", - tags = "19" - )] - pub has_stack_start: ::core::option::Option< - event_exception_values_stacktrace_frames::HasStackStart, - >, - #[prost( - oneof = "event_exception_values_stacktrace_frames::HasSymbol", - tags = "20" - )] - pub has_symbol: - ::core::option::Option, - #[prost( - oneof = "event_exception_values_stacktrace_frames::HasSymbolAddr", - tags = "21" - )] - pub has_symbol_addr: ::core::option::Option< - event_exception_values_stacktrace_frames::HasSymbolAddr, - >, - #[prost( - oneof = "event_exception_values_stacktrace_frames::HasVars", - tags = "22" - )] - pub has_vars: - ::core::option::Option, - } - /// Nested message and enum types in `EventExceptionValuesStacktraceFrames`. - pub mod event_exception_values_stacktrace_frames { - /// - /// A possible lock (java monitor object) held by this frame. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct EventExceptionValuesStacktraceFramesLock { - #[prost(string, tag = "5")] - pub r#type: ::prost::alloc::string::String, - #[prost( - oneof = "event_exception_values_stacktrace_frames_lock::HasAddress", - tags = "1" - )] - pub has_address: ::core::option::Option< - event_exception_values_stacktrace_frames_lock::HasAddress, - >, - #[prost( - oneof = "event_exception_values_stacktrace_frames_lock::HasClassName", - tags = "2" - )] - pub has_class_name: ::core::option::Option< - event_exception_values_stacktrace_frames_lock::HasClassName, - >, - #[prost( - oneof = "event_exception_values_stacktrace_frames_lock::HasPackageName", - tags = "3" - )] - pub has_package_name: ::core::option::Option< - event_exception_values_stacktrace_frames_lock::HasPackageName, - >, - #[prost( - oneof = "event_exception_values_stacktrace_frames_lock::HasThreadId", - tags = "4" - )] - pub has_thread_id: ::core::option::Option< - event_exception_values_stacktrace_frames_lock::HasThreadId, - >, - } - /// Nested message and enum types in `EventExceptionValuesStacktraceFramesLock`. - pub mod event_exception_values_stacktrace_frames_lock { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasAddress { - #[prost(string, tag = "1")] - Address(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasClassName { - #[prost(string, tag = "2")] - ClassName(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasPackageName { - #[prost(string, tag = "3")] - PackageName(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasThreadId { - #[prost(message, tag = "4")] - ThreadId(::prost_types::Value), - } - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasAbsPath { - #[prost(string, tag = "1")] - AbsPath(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasAddrMode { - #[prost(string, tag = "2")] - AddrMode(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasColno { - #[prost(uint64, tag = "3")] - Colno(u64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasContextLine { - #[prost(string, tag = "4")] - ContextLine(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasFilename { - #[prost(string, tag = "5")] - Filename(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasFunction { - #[prost(string, tag = "6")] - Function(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasFunctionId { - #[prost(string, tag = "7")] - FunctionId(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasImageAddr { - #[prost(string, tag = "8")] - ImageAddr(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasInApp { - #[prost(bool, tag = "9")] - InApp(bool), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasInstructionAddr { - #[prost(string, tag = "10")] - InstructionAddr(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasLineno { - #[prost(uint64, tag = "11")] - Lineno(u64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasLock { - #[prost(message, tag = "12")] - Lock(EventExceptionValuesStacktraceFramesLock), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasModule { - #[prost(string, tag = "13")] - Module(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasPackage { - #[prost(string, tag = "14")] - Package(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasPlatform { - #[prost(string, tag = "15")] - Platform(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasRawFunction { - #[prost(string, tag = "18")] - RawFunction(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasStackStart { - #[prost(bool, tag = "19")] - StackStart(bool), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasSymbol { - #[prost(string, tag = "20")] - Symbol(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasSymbolAddr { - #[prost(string, tag = "21")] - SymbolAddr(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasVars { - #[prost(message, tag = "22")] - Vars(::prost_types::Value), - } - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasInstructionAddrAdjustment { - #[prost(string, tag = "2")] - InstructionAddrAdjustment(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasLang { - #[prost(string, tag = "3")] - Lang(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasSnapshot { - #[prost(bool, tag = "5")] - Snapshot(bool), - } - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasMechanism { - #[prost(message, tag = "1")] - Mechanism(EventExceptionValuesMechanism), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasModule { - #[prost(string, tag = "2")] - Module(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasStacktrace { - #[prost(message, tag = "3")] - Stacktrace(EventExceptionValuesStacktrace), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasThreadId { - #[prost(message, tag = "4")] - ThreadId(::prost_types::Value), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasType { - #[prost(string, tag = "5")] - Type(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasValue { - #[prost(string, tag = "6")] - Value(::prost::alloc::string::String), - } - } - } - /// - /// Custom parameterized message for this event. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct EventLogentry { - #[prost(message, optional, tag = "3")] - pub params: ::core::option::Option<::prost_types::Value>, - #[prost(oneof = "event_logentry::HasFormatted", tags = "1")] - pub has_formatted: ::core::option::Option, - #[prost(oneof = "event_logentry::HasMessage", tags = "2")] - pub has_message: ::core::option::Option, - } - /// Nested message and enum types in `EventLogentry`. - pub mod event_logentry { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasFormatted { - #[prost(string, tag = "1")] - Formatted(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasMessage { - #[prost(string, tag = "2")] - Message(::prost::alloc::string::String), - } - } - /// - /// Information about a web request that occurred during the event. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct EventRequest { - #[prost(message, optional, tag = "4")] - pub data: ::core::option::Option<::prost_types::Value>, - #[prost(oneof = "event_request::HasApiTarget", tags = "1")] - pub has_api_target: ::core::option::Option, - #[prost(oneof = "event_request::HasBodySize", tags = "2")] - pub has_body_size: ::core::option::Option, - #[prost(oneof = "event_request::HasCookies", tags = "3")] - pub has_cookies: ::core::option::Option, - #[prost(oneof = "event_request::HasEnv", tags = "5")] - pub has_env: ::core::option::Option, - #[prost(oneof = "event_request::HasFragment", tags = "6")] - pub has_fragment: ::core::option::Option, - #[prost(oneof = "event_request::HasHeaders", tags = "7")] - pub has_headers: ::core::option::Option, - #[prost(oneof = "event_request::HasInferredContentType", tags = "8")] - pub has_inferred_content_type: - ::core::option::Option, - #[prost(oneof = "event_request::HasMethod", tags = "9")] - pub has_method: ::core::option::Option, - #[prost(oneof = "event_request::HasProtocol", tags = "10")] - pub has_protocol: ::core::option::Option, - #[prost(oneof = "event_request::HasQueryString", tags = "11")] - pub has_query_string: ::core::option::Option, - #[prost(oneof = "event_request::HasUrl", tags = "12")] - pub has_url: ::core::option::Option, - } - /// Nested message and enum types in `EventRequest`. - pub mod event_request { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasApiTarget { - #[prost(string, tag = "1")] - ApiTarget(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasBodySize { - #[prost(uint64, tag = "2")] - BodySize(u64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasCookies { - #[prost(message, tag = "3")] - Cookies(::prost_types::Value), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasEnv { - #[prost(message, tag = "5")] - Env(::prost_types::Value), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasFragment { - #[prost(string, tag = "6")] - Fragment(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasHeaders { - #[prost(message, tag = "7")] - Headers(::prost_types::Value), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasInferredContentType { - #[prost(string, tag = "8")] - InferredContentType(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasMethod { - #[prost(string, tag = "9")] - Method(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasProtocol { - #[prost(string, tag = "10")] - Protocol(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasQueryString { - #[prost(message, tag = "11")] - QueryString(::prost_types::Value), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasUrl { - #[prost(string, tag = "12")] - Url(::prost::alloc::string::String), - } - } - /// - /// Information about the Sentry SDK that generated this event. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct EventSdk { - #[prost(string, repeated, tag = "1")] - pub integrations: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - #[prost(string, tag = "2")] - pub name: ::prost::alloc::string::String, - #[prost(message, repeated, tag = "3")] - pub packages: ::prost::alloc::vec::Vec, - #[prost(string, tag = "4")] - pub version: ::prost::alloc::string::String, - } - /// Nested message and enum types in `EventSdk`. - pub mod event_sdk { - /// - /// List of installed and loaded SDK packages. _Optional._ - /// - /// A list of packages that were installed as part of this SDK or the activated integrations. - /// Each package consists of a name in the format `source:identifier` and `version`. If the - /// source is a Git repository, the `source` should be `git`, the identifier should be a - /// checkout link and the version should be a Git reference (branch, tag or SHA). - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct EventSdkPackages { - #[prost(oneof = "event_sdk_packages::HasName", tags = "1")] - pub has_name: ::core::option::Option, - #[prost(oneof = "event_sdk_packages::HasVersion", tags = "2")] - pub has_version: ::core::option::Option, - } - /// Nested message and enum types in `EventSdkPackages`. - pub mod event_sdk_packages { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasName { - #[prost(string, tag = "1")] - Name(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasVersion { - #[prost(string, tag = "2")] - Version(::prost::alloc::string::String), - } - } - } - /// - /// Event stacktrace. - /// - /// DEPRECATED: Prefer `threads` or `exception` depending on which is more appropriate. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct EventStacktrace { - #[prost(message, repeated, tag = "1")] - pub frames: ::prost::alloc::vec::Vec, - #[prost(map = "string, string", tag = "4")] - pub registers: ::std::collections::HashMap< - ::prost::alloc::string::String, - ::prost::alloc::string::String, - >, - #[prost(oneof = "event_stacktrace::HasInstructionAddrAdjustment", tags = "2")] - pub has_instruction_addr_adjustment: - ::core::option::Option, - #[prost(oneof = "event_stacktrace::HasLang", tags = "3")] - pub has_lang: ::core::option::Option, - #[prost(oneof = "event_stacktrace::HasSnapshot", tags = "5")] - pub has_snapshot: ::core::option::Option, - } - /// Nested message and enum types in `EventStacktrace`. - pub mod event_stacktrace { - /// - /// Required. A non-empty list of stack frames. The list is ordered from caller to callee, or - /// oldest to youngest. The last frame is the one creating the exception. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct EventStacktraceFrames { - #[prost(string, repeated, tag = "16")] - pub post_context: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - #[prost(string, repeated, tag = "17")] - pub pre_context: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - #[prost(oneof = "event_stacktrace_frames::HasAbsPath", tags = "1")] - pub has_abs_path: ::core::option::Option, - #[prost(oneof = "event_stacktrace_frames::HasAddrMode", tags = "2")] - pub has_addr_mode: ::core::option::Option, - #[prost(oneof = "event_stacktrace_frames::HasColno", tags = "3")] - pub has_colno: ::core::option::Option, - #[prost(oneof = "event_stacktrace_frames::HasContextLine", tags = "4")] - pub has_context_line: ::core::option::Option, - #[prost(oneof = "event_stacktrace_frames::HasFilename", tags = "5")] - pub has_filename: ::core::option::Option, - #[prost(oneof = "event_stacktrace_frames::HasFunction", tags = "6")] - pub has_function: ::core::option::Option, - #[prost(oneof = "event_stacktrace_frames::HasFunctionId", tags = "7")] - pub has_function_id: ::core::option::Option, - #[prost(oneof = "event_stacktrace_frames::HasImageAddr", tags = "8")] - pub has_image_addr: ::core::option::Option, - #[prost(oneof = "event_stacktrace_frames::HasInApp", tags = "9")] - pub has_in_app: ::core::option::Option, - #[prost(oneof = "event_stacktrace_frames::HasInstructionAddr", tags = "10")] - pub has_instruction_addr: - ::core::option::Option, - #[prost(oneof = "event_stacktrace_frames::HasLineno", tags = "11")] - pub has_lineno: ::core::option::Option, - #[prost(oneof = "event_stacktrace_frames::HasLock", tags = "12")] - pub has_lock: ::core::option::Option, - #[prost(oneof = "event_stacktrace_frames::HasModule", tags = "13")] - pub has_module: ::core::option::Option, - #[prost(oneof = "event_stacktrace_frames::HasPackage", tags = "14")] - pub has_package: ::core::option::Option, - #[prost(oneof = "event_stacktrace_frames::HasPlatform", tags = "15")] - pub has_platform: ::core::option::Option, - #[prost(oneof = "event_stacktrace_frames::HasRawFunction", tags = "18")] - pub has_raw_function: ::core::option::Option, - #[prost(oneof = "event_stacktrace_frames::HasStackStart", tags = "19")] - pub has_stack_start: ::core::option::Option, - #[prost(oneof = "event_stacktrace_frames::HasSymbol", tags = "20")] - pub has_symbol: ::core::option::Option, - #[prost(oneof = "event_stacktrace_frames::HasSymbolAddr", tags = "21")] - pub has_symbol_addr: ::core::option::Option, - #[prost(oneof = "event_stacktrace_frames::HasVars", tags = "22")] - pub has_vars: ::core::option::Option, - } - /// Nested message and enum types in `EventStacktraceFrames`. - pub mod event_stacktrace_frames { - /// - /// A possible lock (java monitor object) held by this frame. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct EventStacktraceFramesLock { - #[prost(string, tag = "5")] - pub r#type: ::prost::alloc::string::String, - #[prost(oneof = "event_stacktrace_frames_lock::HasAddress", tags = "1")] - pub has_address: ::core::option::Option, - #[prost(oneof = "event_stacktrace_frames_lock::HasClassName", tags = "2")] - pub has_class_name: - ::core::option::Option, - #[prost(oneof = "event_stacktrace_frames_lock::HasPackageName", tags = "3")] - pub has_package_name: - ::core::option::Option, - #[prost(oneof = "event_stacktrace_frames_lock::HasThreadId", tags = "4")] - pub has_thread_id: - ::core::option::Option, - } - /// Nested message and enum types in `EventStacktraceFramesLock`. - pub mod event_stacktrace_frames_lock { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasAddress { - #[prost(string, tag = "1")] - Address(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasClassName { - #[prost(string, tag = "2")] - ClassName(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasPackageName { - #[prost(string, tag = "3")] - PackageName(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasThreadId { - #[prost(message, tag = "4")] - ThreadId(::prost_types::Value), - } - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasAbsPath { - #[prost(string, tag = "1")] - AbsPath(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasAddrMode { - #[prost(string, tag = "2")] - AddrMode(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasColno { - #[prost(uint64, tag = "3")] - Colno(u64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasContextLine { - #[prost(string, tag = "4")] - ContextLine(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasFilename { - #[prost(string, tag = "5")] - Filename(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasFunction { - #[prost(string, tag = "6")] - Function(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasFunctionId { - #[prost(string, tag = "7")] - FunctionId(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasImageAddr { - #[prost(string, tag = "8")] - ImageAddr(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasInApp { - #[prost(bool, tag = "9")] - InApp(bool), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasInstructionAddr { - #[prost(string, tag = "10")] - InstructionAddr(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasLineno { - #[prost(uint64, tag = "11")] - Lineno(u64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasLock { - #[prost(message, tag = "12")] - Lock(EventStacktraceFramesLock), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasModule { - #[prost(string, tag = "13")] - Module(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasPackage { - #[prost(string, tag = "14")] - Package(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasPlatform { - #[prost(string, tag = "15")] - Platform(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasRawFunction { - #[prost(string, tag = "18")] - RawFunction(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasStackStart { - #[prost(bool, tag = "19")] - StackStart(bool), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasSymbol { - #[prost(string, tag = "20")] - Symbol(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasSymbolAddr { - #[prost(string, tag = "21")] - SymbolAddr(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasVars { - #[prost(message, tag = "22")] - Vars(::prost_types::Value), - } - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasInstructionAddrAdjustment { - #[prost(string, tag = "2")] - InstructionAddrAdjustment(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasLang { - #[prost(string, tag = "3")] - Lang(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasSnapshot { - #[prost(bool, tag = "5")] - Snapshot(bool), - } - } - /// - /// Threads that were active when the event occurred. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct EventThreads { - #[prost(message, repeated, tag = "1")] - pub values: ::prost::alloc::vec::Vec, - } - /// Nested message and enum types in `EventThreads`. - pub mod event_threads { - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct EventThreadsValues { - #[prost(map = "string, message", tag = "3")] - pub held_locks: ::std::collections::HashMap< - ::prost::alloc::string::String, - event_threads_values::EventThreadsValuesHeldLocks, - >, - #[prost(oneof = "event_threads_values::HasCrashed", tags = "1")] - pub has_crashed: ::core::option::Option, - #[prost(oneof = "event_threads_values::HasCurrent", tags = "2")] - pub has_current: ::core::option::Option, - #[prost(oneof = "event_threads_values::HasId", tags = "4")] - pub has_id: ::core::option::Option, - #[prost(oneof = "event_threads_values::HasMain", tags = "5")] - pub has_main: ::core::option::Option, - #[prost(oneof = "event_threads_values::HasName", tags = "6")] - pub has_name: ::core::option::Option, - #[prost(oneof = "event_threads_values::HasStacktrace", tags = "7")] - pub has_stacktrace: ::core::option::Option, - #[prost(oneof = "event_threads_values::HasState", tags = "8")] - pub has_state: ::core::option::Option, - } - /// Nested message and enum types in `EventThreadsValues`. - pub mod event_threads_values { - /// - /// Represents a collection of locks (java monitor objects) held by a thread. - /// - /// A map of lock object addresses and their respective lock reason/details. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct EventThreadsValuesHeldLocks { - #[prost(string, tag = "5")] - pub r#type: ::prost::alloc::string::String, - #[prost(oneof = "event_threads_values_held_locks::HasAddress", tags = "1")] - pub has_address: - ::core::option::Option, - #[prost(oneof = "event_threads_values_held_locks::HasClassName", tags = "2")] - pub has_class_name: - ::core::option::Option, - #[prost(oneof = "event_threads_values_held_locks::HasPackageName", tags = "3")] - pub has_package_name: - ::core::option::Option, - #[prost(oneof = "event_threads_values_held_locks::HasThreadId", tags = "4")] - pub has_thread_id: - ::core::option::Option, - } - /// Nested message and enum types in `EventThreadsValuesHeldLocks`. - pub mod event_threads_values_held_locks { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasAddress { - #[prost(string, tag = "1")] - Address(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasClassName { - #[prost(string, tag = "2")] - ClassName(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasPackageName { - #[prost(string, tag = "3")] - PackageName(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasThreadId { - #[prost(message, tag = "4")] - ThreadId(::prost_types::Value), - } - } - /// - /// Stack trace containing frames of this exception. - /// - /// The thread that crashed with an exception should not have a stack trace, but instead, the `thread_id` attribute should be set on the exception and Sentry will connect the two. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct EventThreadsValuesStacktrace { - #[prost(message, repeated, tag = "1")] - pub frames: ::prost::alloc::vec::Vec< - event_threads_values_stacktrace::EventThreadsValuesStacktraceFrames, - >, - #[prost(map = "string, string", tag = "4")] - pub registers: ::std::collections::HashMap< - ::prost::alloc::string::String, - ::prost::alloc::string::String, - >, - #[prost( - oneof = "event_threads_values_stacktrace::HasInstructionAddrAdjustment", - tags = "2" - )] - pub has_instruction_addr_adjustment: ::core::option::Option< - event_threads_values_stacktrace::HasInstructionAddrAdjustment, - >, - #[prost(oneof = "event_threads_values_stacktrace::HasLang", tags = "3")] - pub has_lang: ::core::option::Option, - #[prost(oneof = "event_threads_values_stacktrace::HasSnapshot", tags = "5")] - pub has_snapshot: - ::core::option::Option, - } - /// Nested message and enum types in `EventThreadsValuesStacktrace`. - pub mod event_threads_values_stacktrace { - /// - /// Required. A non-empty list of stack frames. The list is ordered from caller to callee, or - /// oldest to youngest. The last frame is the one creating the exception. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct EventThreadsValuesStacktraceFrames { - #[prost(string, repeated, tag = "16")] - pub post_context: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - #[prost(string, repeated, tag = "17")] - pub pre_context: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - #[prost( - oneof = "event_threads_values_stacktrace_frames::HasAbsPath", - tags = "1" - )] - pub has_abs_path: - ::core::option::Option, - #[prost( - oneof = "event_threads_values_stacktrace_frames::HasAddrMode", - tags = "2" - )] - pub has_addr_mode: - ::core::option::Option, - #[prost( - oneof = "event_threads_values_stacktrace_frames::HasColno", - tags = "3" - )] - pub has_colno: - ::core::option::Option, - #[prost( - oneof = "event_threads_values_stacktrace_frames::HasContextLine", - tags = "4" - )] - pub has_context_line: ::core::option::Option< - event_threads_values_stacktrace_frames::HasContextLine, - >, - #[prost( - oneof = "event_threads_values_stacktrace_frames::HasFilename", - tags = "5" - )] - pub has_filename: - ::core::option::Option, - #[prost( - oneof = "event_threads_values_stacktrace_frames::HasFunction", - tags = "6" - )] - pub has_function: - ::core::option::Option, - #[prost( - oneof = "event_threads_values_stacktrace_frames::HasFunctionId", - tags = "7" - )] - pub has_function_id: ::core::option::Option< - event_threads_values_stacktrace_frames::HasFunctionId, - >, - #[prost( - oneof = "event_threads_values_stacktrace_frames::HasImageAddr", - tags = "8" - )] - pub has_image_addr: ::core::option::Option< - event_threads_values_stacktrace_frames::HasImageAddr, - >, - #[prost( - oneof = "event_threads_values_stacktrace_frames::HasInApp", - tags = "9" - )] - pub has_in_app: - ::core::option::Option, - #[prost( - oneof = "event_threads_values_stacktrace_frames::HasInstructionAddr", - tags = "10" - )] - pub has_instruction_addr: ::core::option::Option< - event_threads_values_stacktrace_frames::HasInstructionAddr, - >, - #[prost( - oneof = "event_threads_values_stacktrace_frames::HasLineno", - tags = "11" - )] - pub has_lineno: - ::core::option::Option, - #[prost( - oneof = "event_threads_values_stacktrace_frames::HasLock", - tags = "12" - )] - pub has_lock: - ::core::option::Option, - #[prost( - oneof = "event_threads_values_stacktrace_frames::HasModule", - tags = "13" - )] - pub has_module: - ::core::option::Option, - #[prost( - oneof = "event_threads_values_stacktrace_frames::HasPackage", - tags = "14" - )] - pub has_package: - ::core::option::Option, - #[prost( - oneof = "event_threads_values_stacktrace_frames::HasPlatform", - tags = "15" - )] - pub has_platform: - ::core::option::Option, - #[prost( - oneof = "event_threads_values_stacktrace_frames::HasRawFunction", - tags = "18" - )] - pub has_raw_function: ::core::option::Option< - event_threads_values_stacktrace_frames::HasRawFunction, - >, - #[prost( - oneof = "event_threads_values_stacktrace_frames::HasStackStart", - tags = "19" - )] - pub has_stack_start: ::core::option::Option< - event_threads_values_stacktrace_frames::HasStackStart, - >, - #[prost( - oneof = "event_threads_values_stacktrace_frames::HasSymbol", - tags = "20" - )] - pub has_symbol: - ::core::option::Option, - #[prost( - oneof = "event_threads_values_stacktrace_frames::HasSymbolAddr", - tags = "21" - )] - pub has_symbol_addr: ::core::option::Option< - event_threads_values_stacktrace_frames::HasSymbolAddr, - >, - #[prost( - oneof = "event_threads_values_stacktrace_frames::HasVars", - tags = "22" - )] - pub has_vars: - ::core::option::Option, - } - /// Nested message and enum types in `EventThreadsValuesStacktraceFrames`. - pub mod event_threads_values_stacktrace_frames { - /// - /// A possible lock (java monitor object) held by this frame. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct EventThreadsValuesStacktraceFramesLock { - #[prost(string, tag = "5")] - pub r#type: ::prost::alloc::string::String, - #[prost( - oneof = "event_threads_values_stacktrace_frames_lock::HasAddress", - tags = "1" - )] - pub has_address: ::core::option::Option< - event_threads_values_stacktrace_frames_lock::HasAddress, - >, - #[prost( - oneof = "event_threads_values_stacktrace_frames_lock::HasClassName", - tags = "2" - )] - pub has_class_name: ::core::option::Option< - event_threads_values_stacktrace_frames_lock::HasClassName, - >, - #[prost( - oneof = "event_threads_values_stacktrace_frames_lock::HasPackageName", - tags = "3" - )] - pub has_package_name: ::core::option::Option< - event_threads_values_stacktrace_frames_lock::HasPackageName, - >, - #[prost( - oneof = "event_threads_values_stacktrace_frames_lock::HasThreadId", - tags = "4" - )] - pub has_thread_id: ::core::option::Option< - event_threads_values_stacktrace_frames_lock::HasThreadId, - >, - } - /// Nested message and enum types in `EventThreadsValuesStacktraceFramesLock`. - pub mod event_threads_values_stacktrace_frames_lock { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasAddress { - #[prost(string, tag = "1")] - Address(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasClassName { - #[prost(string, tag = "2")] - ClassName(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasPackageName { - #[prost(string, tag = "3")] - PackageName(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasThreadId { - #[prost(message, tag = "4")] - ThreadId(::prost_types::Value), - } - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasAbsPath { - #[prost(string, tag = "1")] - AbsPath(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasAddrMode { - #[prost(string, tag = "2")] - AddrMode(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasColno { - #[prost(uint64, tag = "3")] - Colno(u64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasContextLine { - #[prost(string, tag = "4")] - ContextLine(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasFilename { - #[prost(string, tag = "5")] - Filename(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasFunction { - #[prost(string, tag = "6")] - Function(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasFunctionId { - #[prost(string, tag = "7")] - FunctionId(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasImageAddr { - #[prost(string, tag = "8")] - ImageAddr(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasInApp { - #[prost(bool, tag = "9")] - InApp(bool), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasInstructionAddr { - #[prost(string, tag = "10")] - InstructionAddr(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasLineno { - #[prost(uint64, tag = "11")] - Lineno(u64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasLock { - #[prost(message, tag = "12")] - Lock(EventThreadsValuesStacktraceFramesLock), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasModule { - #[prost(string, tag = "13")] - Module(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasPackage { - #[prost(string, tag = "14")] - Package(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasPlatform { - #[prost(string, tag = "15")] - Platform(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasRawFunction { - #[prost(string, tag = "18")] - RawFunction(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasStackStart { - #[prost(bool, tag = "19")] - StackStart(bool), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasSymbol { - #[prost(string, tag = "20")] - Symbol(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasSymbolAddr { - #[prost(string, tag = "21")] - SymbolAddr(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasVars { - #[prost(message, tag = "22")] - Vars(::prost_types::Value), - } - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasInstructionAddrAdjustment { - #[prost(string, tag = "2")] - InstructionAddrAdjustment(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasLang { - #[prost(string, tag = "3")] - Lang(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasSnapshot { - #[prost(bool, tag = "5")] - Snapshot(bool), - } - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasCrashed { - #[prost(bool, tag = "1")] - Crashed(bool), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasCurrent { - #[prost(bool, tag = "2")] - Current(bool), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasId { - #[prost(message, tag = "4")] - Id(::prost_types::Value), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasMain { - #[prost(bool, tag = "5")] - Main(bool), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasName { - #[prost(string, tag = "6")] - Name(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasStacktrace { - #[prost(message, tag = "7")] - Stacktrace(EventThreadsValuesStacktrace), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasState { - #[prost(string, tag = "8")] - State(::prost::alloc::string::String), - } - } - } - /// - /// Additional information about the name of the transaction. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct EventTransactionInfo { - #[prost(message, repeated, tag = "1")] - pub changes: ::prost::alloc::vec::Vec, - #[prost(oneof = "event_transaction_info::HasOriginal", tags = "2")] - pub has_original: ::core::option::Option, - #[prost(oneof = "event_transaction_info::HasPropagations", tags = "3")] - pub has_propagations: ::core::option::Option, - #[prost(oneof = "event_transaction_info::HasSource", tags = "4")] - pub has_source: ::core::option::Option, - } - /// Nested message and enum types in `EventTransactionInfo`. - pub mod event_transaction_info { - /// - /// A list of changes prior to the final transaction name. - /// - /// This list must be empty if the transaction name is set at the beginning of the transaction - /// and never changed. There is no placeholder entry for the initial transaction name. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct EventTransactionInfoChanges { - #[prost(oneof = "event_transaction_info_changes::HasPropagations", tags = "1")] - pub has_propagations: - ::core::option::Option, - #[prost(oneof = "event_transaction_info_changes::HasSource", tags = "2")] - pub has_source: ::core::option::Option, - #[prost(oneof = "event_transaction_info_changes::HasTimestamp", tags = "3")] - pub has_timestamp: ::core::option::Option, - } - /// Nested message and enum types in `EventTransactionInfoChanges`. - pub mod event_transaction_info_changes { - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasPropagations { - #[prost(uint64, tag = "1")] - Propagations(u64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasSource { - #[prost(string, tag = "2")] - Source(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasTimestamp { - #[prost(message, tag = "3")] - Timestamp(::prost_types::Value), - } - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasOriginal { - #[prost(string, tag = "2")] - Original(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasPropagations { - #[prost(uint64, tag = "3")] - Propagations(u64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasSource { - #[prost(string, tag = "4")] - Source(::prost::alloc::string::String), - } - } - /// - /// Information about the user who triggered this event. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct EventUser { - #[prost(oneof = "event_user::HasData", tags = "1")] - pub has_data: ::core::option::Option, - #[prost(oneof = "event_user::HasEmail", tags = "2")] - pub has_email: ::core::option::Option, - #[prost(oneof = "event_user::HasGeo", tags = "3")] - pub has_geo: ::core::option::Option, - #[prost(oneof = "event_user::HasId", tags = "4")] - pub has_id: ::core::option::Option, - #[prost(oneof = "event_user::HasIpAddress", tags = "5")] - pub has_ip_address: ::core::option::Option, - #[prost(oneof = "event_user::HasName", tags = "6")] - pub has_name: ::core::option::Option, - #[prost(oneof = "event_user::HasSegment", tags = "7")] - pub has_segment: ::core::option::Option, - #[prost(oneof = "event_user::HasSentryUser", tags = "8")] - pub has_sentry_user: ::core::option::Option, - #[prost(oneof = "event_user::HasUsername", tags = "9")] - pub has_username: ::core::option::Option, - } - /// Nested message and enum types in `EventUser`. - pub mod event_user { - /// - /// Approximate geographical location of the end user or device. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct EventUserGeo { - #[prost(oneof = "event_user_geo::HasCity", tags = "1")] - pub has_city: ::core::option::Option, - #[prost(oneof = "event_user_geo::HasCountryCode", tags = "2")] - pub has_country_code: ::core::option::Option, - #[prost(oneof = "event_user_geo::HasRegion", tags = "3")] - pub has_region: ::core::option::Option, - #[prost(oneof = "event_user_geo::HasSubdivision", tags = "4")] - pub has_subdivision: ::core::option::Option, - } - /// Nested message and enum types in `EventUserGeo`. - pub mod event_user_geo { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasCity { - #[prost(string, tag = "1")] - City(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasCountryCode { - #[prost(string, tag = "2")] - CountryCode(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasRegion { - #[prost(string, tag = "3")] - Region(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasSubdivision { - #[prost(string, tag = "4")] - Subdivision(::prost::alloc::string::String), - } - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasData { - #[prost(message, tag = "1")] - Data(::prost_types::Value), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasEmail { - #[prost(string, tag = "2")] - Email(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasGeo { - #[prost(message, tag = "3")] - Geo(EventUserGeo), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasId { - #[prost(string, tag = "4")] - Id(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasIpAddress { - #[prost(string, tag = "5")] - IpAddress(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasName { - #[prost(string, tag = "6")] - Name(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasSegment { - #[prost(string, tag = "7")] - Segment(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasSentryUser { - #[prost(string, tag = "8")] - SentryUser(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasUsername { - #[prost(string, tag = "9")] - Username(::prost::alloc::string::String), - } - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasBreadcrumbs { - #[prost(message, tag = "1")] - Breadcrumbs(EventBreadcrumbs), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasCulprit { - #[prost(string, tag = "3")] - Culprit(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasDebugMeta { - #[prost(message, tag = "4")] - DebugMeta(EventDebugMeta), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasDist { - #[prost(string, tag = "5")] - Dist(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasEnvironment { - #[prost(string, tag = "6")] - Environment(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasEventId { - #[prost(string, tag = "8")] - EventId(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasException { - #[prost(message, tag = "9")] - Exception(EventException), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasExtra { - #[prost(message, tag = "10")] - Extra(::prost_types::Value), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasLevel { - #[prost(string, tag = "12")] - Level(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasLogentry { - #[prost(message, tag = "13")] - Logentry(EventLogentry), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasLogger { - #[prost(string, tag = "14")] - Logger(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasPlatform { - #[prost(string, tag = "16")] - Platform(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasReceived { - #[prost(message, tag = "17")] - Received(::prost_types::Value), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasRelease { - #[prost(string, tag = "18")] - Release(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasRequest { - #[prost(message, tag = "19")] - Request(EventRequest), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasSdk { - #[prost(message, tag = "20")] - Sdk(EventSdk), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasServerName { - #[prost(string, tag = "21")] - ServerName(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasStacktrace { - #[prost(message, tag = "22")] - Stacktrace(EventStacktrace), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasTags { - #[prost(message, tag = "23")] - Tags(::prost_types::Value), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasThreads { - #[prost(message, tag = "24")] - Threads(EventThreads), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasTimeSpent { - #[prost(uint64, tag = "25")] - TimeSpent(u64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasTimestamp { - #[prost(message, tag = "26")] - Timestamp(::prost_types::Value), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasTransaction { - #[prost(string, tag = "27")] - Transaction(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasTransactionInfo { - #[prost(message, tag = "28")] - TransactionInfo(EventTransactionInfo), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasType { - #[prost(string, tag = "29")] - Type(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasUser { - #[prost(message, tag = "30")] - User(EventUser), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasVersion { - #[prost(string, tag = "31")] - Version(::prost::alloc::string::String), - } -} -/// -/// Application information. -/// -/// App context describes the application. As opposed to the runtime, this is the actual -/// application that was running and carries metadata about the current session. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Appcontext { - #[prost(string, repeated, tag = "10")] - pub view_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - #[prost(oneof = "appcontext::HasAppBuild", tags = "1")] - pub has_app_build: ::core::option::Option, - #[prost(oneof = "appcontext::HasAppIdentifier", tags = "2")] - pub has_app_identifier: ::core::option::Option, - #[prost(oneof = "appcontext::HasAppMemory", tags = "3")] - pub has_app_memory: ::core::option::Option, - #[prost(oneof = "appcontext::HasAppName", tags = "4")] - pub has_app_name: ::core::option::Option, - #[prost(oneof = "appcontext::HasAppStartTime", tags = "5")] - pub has_app_start_time: ::core::option::Option, - #[prost(oneof = "appcontext::HasAppVersion", tags = "6")] - pub has_app_version: ::core::option::Option, - #[prost(oneof = "appcontext::HasBuildType", tags = "7")] - pub has_build_type: ::core::option::Option, - #[prost(oneof = "appcontext::HasDeviceAppHash", tags = "8")] - pub has_device_app_hash: ::core::option::Option, - #[prost(oneof = "appcontext::HasInForeground", tags = "9")] - pub has_in_foreground: ::core::option::Option, -} -/// Nested message and enum types in `Appcontext`. -pub mod appcontext { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasAppBuild { - #[prost(string, tag = "1")] - AppBuild(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasAppIdentifier { - #[prost(string, tag = "2")] - AppIdentifier(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasAppMemory { - #[prost(uint64, tag = "3")] - AppMemory(u64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasAppName { - #[prost(string, tag = "4")] - AppName(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasAppStartTime { - #[prost(string, tag = "5")] - AppStartTime(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasAppVersion { - #[prost(string, tag = "6")] - AppVersion(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasBuildType { - #[prost(string, tag = "7")] - BuildType(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasDeviceAppHash { - #[prost(string, tag = "8")] - DeviceAppHash(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasInForeground { - #[prost(bool, tag = "9")] - InForeground(bool), - } -} -/// -/// Legacy apple debug images (MachO). -/// -/// This was also used for non-apple platforms with similar debug setups. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Appledebugimage { - #[prost(string, tag = "4")] - pub image_addr: ::prost::alloc::string::String, - #[prost(uint64, tag = "5")] - pub image_size: u64, - #[prost(string, tag = "7")] - pub name: ::prost::alloc::string::String, - #[prost(string, tag = "8")] - pub uuid: ::prost::alloc::string::String, - #[prost(oneof = "appledebugimage::HasArch", tags = "1")] - pub has_arch: ::core::option::Option, - #[prost(oneof = "appledebugimage::HasCpuSubtype", tags = "2")] - pub has_cpu_subtype: ::core::option::Option, - #[prost(oneof = "appledebugimage::HasCpuType", tags = "3")] - pub has_cpu_type: ::core::option::Option, - #[prost(oneof = "appledebugimage::HasImageVmaddr", tags = "6")] - pub has_image_vmaddr: ::core::option::Option, -} -/// Nested message and enum types in `Appledebugimage`. -pub mod appledebugimage { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasArch { - #[prost(string, tag = "1")] - Arch(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasCpuSubtype { - #[prost(uint64, tag = "2")] - CpuSubtype(u64), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasCpuType { - #[prost(uint64, tag = "3")] - CpuType(u64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasImageVmaddr { - #[prost(string, tag = "6")] - ImageVmaddr(::prost::alloc::string::String), - } -} -/// -/// The Breadcrumbs Interface specifies a series of application events, or "breadcrumbs", that -/// occurred before an event. -/// -/// An event may contain one or more breadcrumbs in an attribute named `breadcrumbs`. The entries -/// are ordered from oldest to newest. Consequently, the last entry in the list should be the last -/// entry before the event occurred. -/// -/// While breadcrumb attributes are not strictly validated in Sentry, a breadcrumb is most useful -/// when it includes at least a `timestamp` and `type`, `category` or `message`. The rendering of -/// breadcrumbs in Sentry depends on what is provided. -/// -/// The following example illustrates the breadcrumbs part of the event payload and omits other -/// attributes for simplicity. -/// -/// ```json -/// { -/// "breadcrumbs": { -/// "values": [ -/// { -/// "timestamp": "2016-04-20T20:55:53.845Z", -/// "message": "Something happened", -/// "category": "log", -/// "data": { -/// "foo": "bar", -/// "blub": "blah" -/// } -/// }, -/// { -/// "timestamp": "2016-04-20T20:55:53.847Z", -/// "type": "navigation", -/// "data": { -/// "from": "/login", -/// "to": "/dashboard" -/// } -/// } -/// ] -/// } -/// } -/// ``` -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Breadcrumb { - #[prost(oneof = "breadcrumb::HasCategory", tags = "1")] - pub has_category: ::core::option::Option, - #[prost(oneof = "breadcrumb::HasData", tags = "2")] - pub has_data: ::core::option::Option, - #[prost(oneof = "breadcrumb::HasEventId", tags = "3")] - pub has_event_id: ::core::option::Option, - #[prost(oneof = "breadcrumb::HasLevel", tags = "4")] - pub has_level: ::core::option::Option, - #[prost(oneof = "breadcrumb::HasMessage", tags = "5")] - pub has_message: ::core::option::Option, - #[prost(oneof = "breadcrumb::HasTimestamp", tags = "6")] - pub has_timestamp: ::core::option::Option, - #[prost(oneof = "breadcrumb::HasType", tags = "7")] - pub has_type: ::core::option::Option, -} -/// Nested message and enum types in `Breadcrumb`. -pub mod breadcrumb { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasCategory { - #[prost(string, tag = "1")] - Category(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasData { - #[prost(message, tag = "2")] - Data(::prost_types::Value), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasEventId { - #[prost(string, tag = "3")] - EventId(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasLevel { - #[prost(string, tag = "4")] - Level(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasMessage { - #[prost(string, tag = "5")] - Message(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasTimestamp { - #[prost(message, tag = "6")] - Timestamp(::prost_types::Value), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasType { - #[prost(string, tag = "7")] - Type(::prost::alloc::string::String), - } -} -/// -/// Web browser information. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Browsercontext { - #[prost(oneof = "browsercontext::HasName", tags = "1")] - pub has_name: ::core::option::Option, - #[prost(oneof = "browsercontext::HasVersion", tags = "2")] - pub has_version: ::core::option::Option, -} -/// Nested message and enum types in `Browsercontext`. -pub mod browsercontext { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasName { - #[prost(string, tag = "1")] - Name(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasVersion { - #[prost(string, tag = "2")] - Version(::prost::alloc::string::String), - } -} -/// -/// POSIX signal with optional extended data. -/// -/// Error codes set by Linux system calls and some library functions as specified in ISO C99, -/// POSIX.1-2001, and POSIX.1-2008. See -/// [`errno(3)`]() for more information. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Cerror { - #[prost(oneof = "cerror::HasName", tags = "1")] - pub has_name: ::core::option::Option, - #[prost(oneof = "cerror::HasNumber", tags = "2")] - pub has_number: ::core::option::Option, -} -/// Nested message and enum types in `Cerror`. -pub mod cerror { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasName { - #[prost(string, tag = "1")] - Name(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasNumber { - #[prost(int64, tag = "2")] - Number(i64), - } -} -/// -/// The SDK Interface describes the Sentry SDK and its configuration used to capture and transmit an event. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Clientsdkinfo { - #[prost(string, repeated, tag = "1")] - pub integrations: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - #[prost(string, tag = "2")] - pub name: ::prost::alloc::string::String, - #[prost(message, repeated, tag = "3")] - pub packages: ::prost::alloc::vec::Vec, - #[prost(string, tag = "4")] - pub version: ::prost::alloc::string::String, -} -/// Nested message and enum types in `Clientsdkinfo`. -pub mod clientsdkinfo { - /// - /// List of installed and loaded SDK packages. _Optional._ - /// - /// A list of packages that were installed as part of this SDK or the activated integrations. - /// Each package consists of a name in the format `source:identifier` and `version`. If the - /// source is a Git repository, the `source` should be `git`, the identifier should be a - /// checkout link and the version should be a Git reference (branch, tag or SHA). - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct ClientsdkinfoPackages { - #[prost(oneof = "clientsdkinfo_packages::HasName", tags = "1")] - pub has_name: ::core::option::Option, - #[prost(oneof = "clientsdkinfo_packages::HasVersion", tags = "2")] - pub has_version: ::core::option::Option, - } - /// Nested message and enum types in `ClientsdkinfoPackages`. - pub mod clientsdkinfo_packages { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasName { - #[prost(string, tag = "1")] - Name(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasVersion { - #[prost(string, tag = "2")] - Version(::prost::alloc::string::String), - } - } -} -/// -/// An installed and loaded package as part of the Sentry SDK. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Clientsdkpackage { - #[prost(oneof = "clientsdkpackage::HasName", tags = "1")] - pub has_name: ::core::option::Option, - #[prost(oneof = "clientsdkpackage::HasVersion", tags = "2")] - pub has_version: ::core::option::Option, -} -/// Nested message and enum types in `Clientsdkpackage`. -pub mod clientsdkpackage { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasName { - #[prost(string, tag = "1")] - Name(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasVersion { - #[prost(string, tag = "2")] - Version(::prost::alloc::string::String), - } -} -/// -/// The arbitrary data on the trace. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Data { - #[prost(oneof = "data::HasPreviousRoute", tags = "1")] - pub has_previous_route: ::core::option::Option, - #[prost(oneof = "data::HasRoute", tags = "2")] - pub has_route: ::core::option::Option, -} -/// Nested message and enum types in `Data`. -pub mod data { - /// - /// The previous route in the application - /// - /// Set by React Native SDK. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct DataPreviousroute { - #[prost(oneof = "data_previousroute::HasName", tags = "1")] - pub has_name: ::core::option::Option, - #[prost(oneof = "data_previousroute::HasParams", tags = "2")] - pub has_params: ::core::option::Option, - } - /// Nested message and enum types in `DataPreviousroute`. - pub mod data_previousroute { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasName { - #[prost(string, tag = "1")] - Name(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasParams { - #[prost(message, tag = "2")] - Params(::prost_types::Value), - } - } - /// - /// The current route in the application. - /// - /// Set by React Native SDK. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct DataRoute { - #[prost(oneof = "data_route::HasName", tags = "1")] - pub has_name: ::core::option::Option, - #[prost(oneof = "data_route::HasParams", tags = "2")] - pub has_params: ::core::option::Option, - } - /// Nested message and enum types in `DataRoute`. - pub mod data_route { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasName { - #[prost(string, tag = "1")] - Name(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasParams { - #[prost(message, tag = "2")] - Params(::prost_types::Value), - } - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasPreviousRoute { - #[prost(message, tag = "1")] - PreviousRoute(DataPreviousroute), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasRoute { - #[prost(message, tag = "2")] - Route(DataRoute), - } -} -/// -/// Debugging and processing meta information. -/// -/// The debug meta interface carries debug information for processing errors and crash reports. -/// Sentry amends the information in this interface. -/// -/// Example (look at field types to see more detail): -/// -/// ```json -/// { -/// "debug_meta": { -/// "images": \[\], -/// "sdk_info": { -/// "sdk_name": "iOS", -/// "version_major": 10, -/// "version_minor": 3, -/// "version_patchlevel": 0 -/// } -/// } -/// } -/// ``` -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Debugmeta { - #[prost(message, repeated, tag = "1")] - pub images: ::prost::alloc::vec::Vec<::prost_types::Value>, - #[prost(oneof = "debugmeta::HasSdkInfo", tags = "2")] - pub has_sdk_info: ::core::option::Option, -} -/// Nested message and enum types in `Debugmeta`. -pub mod debugmeta { - /// - /// Information about the system SDK (e.g. iOS SDK). - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct DebugmetaSdkInfo { - #[prost(oneof = "debugmeta_sdk_info::HasSdkName", tags = "1")] - pub has_sdk_name: ::core::option::Option, - #[prost(oneof = "debugmeta_sdk_info::HasVersionMajor", tags = "2")] - pub has_version_major: ::core::option::Option, - #[prost(oneof = "debugmeta_sdk_info::HasVersionMinor", tags = "3")] - pub has_version_minor: ::core::option::Option, - #[prost(oneof = "debugmeta_sdk_info::HasVersionPatchlevel", tags = "4")] - pub has_version_patchlevel: - ::core::option::Option, - } - /// Nested message and enum types in `DebugmetaSdkInfo`. - pub mod debugmeta_sdk_info { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasSdkName { - #[prost(string, tag = "1")] - SdkName(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasVersionMajor { - #[prost(uint64, tag = "2")] - VersionMajor(u64), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasVersionMinor { - #[prost(uint64, tag = "3")] - VersionMinor(u64), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasVersionPatchlevel { - #[prost(uint64, tag = "4")] - VersionPatchlevel(u64), - } - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasSdkInfo { - #[prost(message, tag = "2")] - SdkInfo(DebugmetaSdkInfo), - } -} -/// -/// Device information. -/// -/// Device context describes the device that caused the event. This is most appropriate for mobile -/// applications. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Devicecontext { - #[prost(oneof = "devicecontext::HasArch", tags = "1")] - pub has_arch: ::core::option::Option, - #[prost(oneof = "devicecontext::HasBatteryLevel", tags = "2")] - pub has_battery_level: ::core::option::Option, - #[prost(oneof = "devicecontext::HasBatteryStatus", tags = "3")] - pub has_battery_status: ::core::option::Option, - #[prost(oneof = "devicecontext::HasBootTime", tags = "4")] - pub has_boot_time: ::core::option::Option, - #[prost(oneof = "devicecontext::HasBrand", tags = "5")] - pub has_brand: ::core::option::Option, - #[prost(oneof = "devicecontext::HasCharging", tags = "6")] - pub has_charging: ::core::option::Option, - #[prost(oneof = "devicecontext::HasCpuDescription", tags = "7")] - pub has_cpu_description: ::core::option::Option, - #[prost(oneof = "devicecontext::HasDeviceType", tags = "8")] - pub has_device_type: ::core::option::Option, - #[prost(oneof = "devicecontext::HasDeviceUniqueIdentifier", tags = "9")] - pub has_device_unique_identifier: - ::core::option::Option, - #[prost(oneof = "devicecontext::HasExternalFreeStorage", tags = "10")] - pub has_external_free_storage: ::core::option::Option, - #[prost(oneof = "devicecontext::HasExternalStorageSize", tags = "11")] - pub has_external_storage_size: ::core::option::Option, - #[prost(oneof = "devicecontext::HasFamily", tags = "12")] - pub has_family: ::core::option::Option, - #[prost(oneof = "devicecontext::HasFreeMemory", tags = "13")] - pub has_free_memory: ::core::option::Option, - #[prost(oneof = "devicecontext::HasFreeStorage", tags = "14")] - pub has_free_storage: ::core::option::Option, - #[prost(oneof = "devicecontext::HasLocale", tags = "15")] - pub has_locale: ::core::option::Option, - #[prost(oneof = "devicecontext::HasLowMemory", tags = "16")] - pub has_low_memory: ::core::option::Option, - #[prost(oneof = "devicecontext::HasManufacturer", tags = "17")] - pub has_manufacturer: ::core::option::Option, - #[prost(oneof = "devicecontext::HasMemorySize", tags = "18")] - pub has_memory_size: ::core::option::Option, - #[prost(oneof = "devicecontext::HasModel", tags = "19")] - pub has_model: ::core::option::Option, - #[prost(oneof = "devicecontext::HasModelId", tags = "20")] - pub has_model_id: ::core::option::Option, - #[prost(oneof = "devicecontext::HasName", tags = "21")] - pub has_name: ::core::option::Option, - #[prost(oneof = "devicecontext::HasOnline", tags = "22")] - pub has_online: ::core::option::Option, - #[prost(oneof = "devicecontext::HasOrientation", tags = "23")] - pub has_orientation: ::core::option::Option, - #[prost(oneof = "devicecontext::HasProcessorCount", tags = "24")] - pub has_processor_count: ::core::option::Option, - #[prost(oneof = "devicecontext::HasProcessorFrequency", tags = "25")] - pub has_processor_frequency: ::core::option::Option, - #[prost(oneof = "devicecontext::HasScreenDensity", tags = "26")] - pub has_screen_density: ::core::option::Option, - #[prost(oneof = "devicecontext::HasScreenDpi", tags = "27")] - pub has_screen_dpi: ::core::option::Option, - #[prost(oneof = "devicecontext::HasScreenHeightPixels", tags = "28")] - pub has_screen_height_pixels: ::core::option::Option, - #[prost(oneof = "devicecontext::HasScreenResolution", tags = "29")] - pub has_screen_resolution: ::core::option::Option, - #[prost(oneof = "devicecontext::HasScreenWidthPixels", tags = "30")] - pub has_screen_width_pixels: ::core::option::Option, - #[prost(oneof = "devicecontext::HasSimulator", tags = "31")] - pub has_simulator: ::core::option::Option, - #[prost(oneof = "devicecontext::HasStorageSize", tags = "32")] - pub has_storage_size: ::core::option::Option, - #[prost(oneof = "devicecontext::HasSupportsAccelerometer", tags = "33")] - pub has_supports_accelerometer: ::core::option::Option, - #[prost(oneof = "devicecontext::HasSupportsAudio", tags = "34")] - pub has_supports_audio: ::core::option::Option, - #[prost(oneof = "devicecontext::HasSupportsGyroscope", tags = "35")] - pub has_supports_gyroscope: ::core::option::Option, - #[prost(oneof = "devicecontext::HasSupportsLocationService", tags = "36")] - pub has_supports_location_service: - ::core::option::Option, - #[prost(oneof = "devicecontext::HasSupportsVibration", tags = "37")] - pub has_supports_vibration: ::core::option::Option, - #[prost(oneof = "devicecontext::HasTimezone", tags = "38")] - pub has_timezone: ::core::option::Option, - #[prost(oneof = "devicecontext::HasUsableMemory", tags = "39")] - pub has_usable_memory: ::core::option::Option, - #[prost(oneof = "devicecontext::HasUuid", tags = "40")] - pub has_uuid: ::core::option::Option, -} -/// Nested message and enum types in `Devicecontext`. -pub mod devicecontext { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasArch { - #[prost(string, tag = "1")] - Arch(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasBatteryLevel { - #[prost(double, tag = "2")] - BatteryLevel(f64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasBatteryStatus { - #[prost(string, tag = "3")] - BatteryStatus(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasBootTime { - #[prost(string, tag = "4")] - BootTime(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasBrand { - #[prost(string, tag = "5")] - Brand(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasCharging { - #[prost(bool, tag = "6")] - Charging(bool), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasCpuDescription { - #[prost(string, tag = "7")] - CpuDescription(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasDeviceType { - #[prost(string, tag = "8")] - DeviceType(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasDeviceUniqueIdentifier { - #[prost(string, tag = "9")] - DeviceUniqueIdentifier(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasExternalFreeStorage { - #[prost(uint64, tag = "10")] - ExternalFreeStorage(u64), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasExternalStorageSize { - #[prost(uint64, tag = "11")] - ExternalStorageSize(u64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasFamily { - #[prost(string, tag = "12")] - Family(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasFreeMemory { - #[prost(uint64, tag = "13")] - FreeMemory(u64), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasFreeStorage { - #[prost(uint64, tag = "14")] - FreeStorage(u64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasLocale { - #[prost(string, tag = "15")] - Locale(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasLowMemory { - #[prost(bool, tag = "16")] - LowMemory(bool), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasManufacturer { - #[prost(string, tag = "17")] - Manufacturer(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasMemorySize { - #[prost(uint64, tag = "18")] - MemorySize(u64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasModel { - #[prost(string, tag = "19")] - Model(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasModelId { - #[prost(string, tag = "20")] - ModelId(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasName { - #[prost(string, tag = "21")] - Name(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasOnline { - #[prost(bool, tag = "22")] - Online(bool), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasOrientation { - #[prost(string, tag = "23")] - Orientation(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasProcessorCount { - #[prost(uint64, tag = "24")] - ProcessorCount(u64), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasProcessorFrequency { - #[prost(uint64, tag = "25")] - ProcessorFrequency(u64), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasScreenDensity { - #[prost(double, tag = "26")] - ScreenDensity(f64), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasScreenDpi { - #[prost(uint64, tag = "27")] - ScreenDpi(u64), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasScreenHeightPixels { - #[prost(uint64, tag = "28")] - ScreenHeightPixels(u64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasScreenResolution { - #[prost(string, tag = "29")] - ScreenResolution(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasScreenWidthPixels { - #[prost(uint64, tag = "30")] - ScreenWidthPixels(u64), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasSimulator { - #[prost(bool, tag = "31")] - Simulator(bool), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasStorageSize { - #[prost(uint64, tag = "32")] - StorageSize(u64), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasSupportsAccelerometer { - #[prost(bool, tag = "33")] - SupportsAccelerometer(bool), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasSupportsAudio { - #[prost(bool, tag = "34")] - SupportsAudio(bool), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasSupportsGyroscope { - #[prost(bool, tag = "35")] - SupportsGyroscope(bool), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasSupportsLocationService { - #[prost(bool, tag = "36")] - SupportsLocationService(bool), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasSupportsVibration { - #[prost(bool, tag = "37")] - SupportsVibration(bool), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasTimezone { - #[prost(string, tag = "38")] - Timezone(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasUsableMemory { - #[prost(uint64, tag = "39")] - UsableMemory(u64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasUuid { - #[prost(string, tag = "40")] - Uuid(::prost::alloc::string::String), - } -} -/// -/// An event processing error. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Eventprocessingerror { - #[prost(string, tag = "2")] - pub r#type: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub value: ::core::option::Option<::prost_types::Value>, - #[prost(oneof = "eventprocessingerror::HasName", tags = "1")] - pub has_name: ::core::option::Option, -} -/// Nested message and enum types in `Eventprocessingerror`. -pub mod eventprocessingerror { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasName { - #[prost(string, tag = "1")] - Name(::prost::alloc::string::String), - } -} -/// -/// A single exception. -/// -/// Multiple values inside of an [event](#typedef-Event) represent chained exceptions and should be sorted oldest to newest. For example, consider this Python code snippet: -/// -/// ```python -/// try: -/// raise Exception("random boring invariant was not met!") -/// except Exception as e: -/// raise ValueError("something went wrong, help!") from e -/// ``` -/// -/// `Exception` would be described first in the values list, followed by a description of `ValueError`: -/// -/// ```json -/// { -/// "exception": { -/// "values": [ -/// {"type": "Exception": "value": "random boring invariant was not met!"}, -/// {"type": "ValueError", "value": "something went wrong, help!"}, -/// ] -/// } -/// } -/// ``` -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Exception { - #[prost(oneof = "exception::HasMechanism", tags = "1")] - pub has_mechanism: ::core::option::Option, - #[prost(oneof = "exception::HasModule", tags = "2")] - pub has_module: ::core::option::Option, - #[prost(oneof = "exception::HasStacktrace", tags = "3")] - pub has_stacktrace: ::core::option::Option, - #[prost(oneof = "exception::HasThreadId", tags = "4")] - pub has_thread_id: ::core::option::Option, - #[prost(oneof = "exception::HasType", tags = "5")] - pub has_type: ::core::option::Option, - #[prost(oneof = "exception::HasValue", tags = "6")] - pub has_value: ::core::option::Option, -} -/// Nested message and enum types in `Exception`. -pub mod exception { - /// - /// Mechanism by which this exception was generated and handled. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct ExceptionMechanism { - #[prost(string, tag = "11")] - pub r#type: ::prost::alloc::string::String, - #[prost(oneof = "exception_mechanism::HasData", tags = "1")] - pub has_data: ::core::option::Option, - #[prost(oneof = "exception_mechanism::HasDescription", tags = "2")] - pub has_description: ::core::option::Option, - #[prost(oneof = "exception_mechanism::HasExceptionId", tags = "3")] - pub has_exception_id: ::core::option::Option, - #[prost(oneof = "exception_mechanism::HasHandled", tags = "4")] - pub has_handled: ::core::option::Option, - #[prost(oneof = "exception_mechanism::HasHelpLink", tags = "5")] - pub has_help_link: ::core::option::Option, - #[prost(oneof = "exception_mechanism::HasIsExceptionGroup", tags = "6")] - pub has_is_exception_group: - ::core::option::Option, - #[prost(oneof = "exception_mechanism::HasMeta", tags = "7")] - pub has_meta: ::core::option::Option, - #[prost(oneof = "exception_mechanism::HasParentId", tags = "8")] - pub has_parent_id: ::core::option::Option, - #[prost(oneof = "exception_mechanism::HasSource", tags = "9")] - pub has_source: ::core::option::Option, - #[prost(oneof = "exception_mechanism::HasSynthetic", tags = "10")] - pub has_synthetic: ::core::option::Option, - } - /// Nested message and enum types in `ExceptionMechanism`. - pub mod exception_mechanism { - /// - /// Operating system or runtime meta information. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct ExceptionMechanismMeta { - #[prost(oneof = "exception_mechanism_meta::HasErrno", tags = "1")] - pub has_errno: ::core::option::Option, - #[prost(oneof = "exception_mechanism_meta::HasMachException", tags = "2")] - pub has_mach_exception: - ::core::option::Option, - #[prost(oneof = "exception_mechanism_meta::HasNsError", tags = "3")] - pub has_ns_error: ::core::option::Option, - #[prost(oneof = "exception_mechanism_meta::HasSignal", tags = "4")] - pub has_signal: ::core::option::Option, - } - /// Nested message and enum types in `ExceptionMechanismMeta`. - pub mod exception_mechanism_meta { - /// - /// Optional ISO C standard error code. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct ExceptionMechanismMetaErrno { - #[prost(oneof = "exception_mechanism_meta_errno::HasName", tags = "1")] - pub has_name: ::core::option::Option, - #[prost(oneof = "exception_mechanism_meta_errno::HasNumber", tags = "2")] - pub has_number: ::core::option::Option, - } - /// Nested message and enum types in `ExceptionMechanismMetaErrno`. - pub mod exception_mechanism_meta_errno { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasName { - #[prost(string, tag = "1")] - Name(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasNumber { - #[prost(int64, tag = "2")] - Number(i64), - } - } - /// - /// A Mach Exception on Apple systems comprising a code triple and optional descriptions. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct ExceptionMechanismMetaMachException { - #[prost(oneof = "exception_mechanism_meta_mach_exception::HasCode", tags = "1")] - pub has_code: - ::core::option::Option, - #[prost( - oneof = "exception_mechanism_meta_mach_exception::HasException", - tags = "2" - )] - pub has_exception: - ::core::option::Option, - #[prost(oneof = "exception_mechanism_meta_mach_exception::HasName", tags = "3")] - pub has_name: - ::core::option::Option, - #[prost( - oneof = "exception_mechanism_meta_mach_exception::HasSubcode", - tags = "4" - )] - pub has_subcode: - ::core::option::Option, - } - /// Nested message and enum types in `ExceptionMechanismMetaMachException`. - pub mod exception_mechanism_meta_mach_exception { - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasCode { - #[prost(uint64, tag = "1")] - Code(u64), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasException { - #[prost(int64, tag = "2")] - Exception(i64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasName { - #[prost(string, tag = "3")] - Name(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasSubcode { - #[prost(uint64, tag = "4")] - Subcode(u64), - } - } - /// - /// An NSError on Apple systems comprising code and signal. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct ExceptionMechanismMetaNsError { - #[prost(oneof = "exception_mechanism_meta_ns_error::HasCode", tags = "1")] - pub has_code: ::core::option::Option, - #[prost(oneof = "exception_mechanism_meta_ns_error::HasDomain", tags = "2")] - pub has_domain: - ::core::option::Option, - } - /// Nested message and enum types in `ExceptionMechanismMetaNsError`. - pub mod exception_mechanism_meta_ns_error { - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasCode { - #[prost(int64, tag = "1")] - Code(i64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasDomain { - #[prost(string, tag = "2")] - Domain(::prost::alloc::string::String), - } - } - /// - /// Information on the POSIX signal. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct ExceptionMechanismMetaSignal { - #[prost(oneof = "exception_mechanism_meta_signal::HasCode", tags = "1")] - pub has_code: ::core::option::Option, - #[prost(oneof = "exception_mechanism_meta_signal::HasCodeName", tags = "2")] - pub has_code_name: - ::core::option::Option, - #[prost(oneof = "exception_mechanism_meta_signal::HasName", tags = "3")] - pub has_name: ::core::option::Option, - #[prost(oneof = "exception_mechanism_meta_signal::HasNumber", tags = "4")] - pub has_number: ::core::option::Option, - } - /// Nested message and enum types in `ExceptionMechanismMetaSignal`. - pub mod exception_mechanism_meta_signal { - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasCode { - #[prost(int64, tag = "1")] - Code(i64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasCodeName { - #[prost(string, tag = "2")] - CodeName(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasName { - #[prost(string, tag = "3")] - Name(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasNumber { - #[prost(int64, tag = "4")] - Number(i64), - } - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasErrno { - #[prost(message, tag = "1")] - Errno(ExceptionMechanismMetaErrno), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasMachException { - #[prost(message, tag = "2")] - MachException(ExceptionMechanismMetaMachException), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasNsError { - #[prost(message, tag = "3")] - NsError(ExceptionMechanismMetaNsError), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasSignal { - #[prost(message, tag = "4")] - Signal(ExceptionMechanismMetaSignal), - } - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasData { - #[prost(message, tag = "1")] - Data(::prost_types::Value), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasDescription { - #[prost(string, tag = "2")] - Description(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasExceptionId { - #[prost(uint64, tag = "3")] - ExceptionId(u64), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasHandled { - #[prost(bool, tag = "4")] - Handled(bool), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasHelpLink { - #[prost(string, tag = "5")] - HelpLink(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasIsExceptionGroup { - #[prost(bool, tag = "6")] - IsExceptionGroup(bool), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasMeta { - #[prost(message, tag = "7")] - Meta(ExceptionMechanismMeta), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasParentId { - #[prost(uint64, tag = "8")] - ParentId(u64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasSource { - #[prost(string, tag = "9")] - Source(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasSynthetic { - #[prost(bool, tag = "10")] - Synthetic(bool), - } - } - /// - /// Stack trace containing frames of this exception. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct ExceptionStacktrace { - #[prost(message, repeated, tag = "1")] - pub frames: ::prost::alloc::vec::Vec, - #[prost(map = "string, string", tag = "4")] - pub registers: ::std::collections::HashMap< - ::prost::alloc::string::String, - ::prost::alloc::string::String, - >, - #[prost( - oneof = "exception_stacktrace::HasInstructionAddrAdjustment", - tags = "2" - )] - pub has_instruction_addr_adjustment: - ::core::option::Option, - #[prost(oneof = "exception_stacktrace::HasLang", tags = "3")] - pub has_lang: ::core::option::Option, - #[prost(oneof = "exception_stacktrace::HasSnapshot", tags = "5")] - pub has_snapshot: ::core::option::Option, - } - /// Nested message and enum types in `ExceptionStacktrace`. - pub mod exception_stacktrace { - /// - /// Required. A non-empty list of stack frames. The list is ordered from caller to callee, or - /// oldest to youngest. The last frame is the one creating the exception. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct ExceptionStacktraceFrames { - #[prost(string, repeated, tag = "16")] - pub post_context: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - #[prost(string, repeated, tag = "17")] - pub pre_context: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - #[prost(oneof = "exception_stacktrace_frames::HasAbsPath", tags = "1")] - pub has_abs_path: ::core::option::Option, - #[prost(oneof = "exception_stacktrace_frames::HasAddrMode", tags = "2")] - pub has_addr_mode: ::core::option::Option, - #[prost(oneof = "exception_stacktrace_frames::HasColno", tags = "3")] - pub has_colno: ::core::option::Option, - #[prost(oneof = "exception_stacktrace_frames::HasContextLine", tags = "4")] - pub has_context_line: - ::core::option::Option, - #[prost(oneof = "exception_stacktrace_frames::HasFilename", tags = "5")] - pub has_filename: ::core::option::Option, - #[prost(oneof = "exception_stacktrace_frames::HasFunction", tags = "6")] - pub has_function: ::core::option::Option, - #[prost(oneof = "exception_stacktrace_frames::HasFunctionId", tags = "7")] - pub has_function_id: ::core::option::Option, - #[prost(oneof = "exception_stacktrace_frames::HasImageAddr", tags = "8")] - pub has_image_addr: ::core::option::Option, - #[prost(oneof = "exception_stacktrace_frames::HasInApp", tags = "9")] - pub has_in_app: ::core::option::Option, - #[prost(oneof = "exception_stacktrace_frames::HasInstructionAddr", tags = "10")] - pub has_instruction_addr: - ::core::option::Option, - #[prost(oneof = "exception_stacktrace_frames::HasLineno", tags = "11")] - pub has_lineno: ::core::option::Option, - #[prost(oneof = "exception_stacktrace_frames::HasLock", tags = "12")] - pub has_lock: ::core::option::Option, - #[prost(oneof = "exception_stacktrace_frames::HasModule", tags = "13")] - pub has_module: ::core::option::Option, - #[prost(oneof = "exception_stacktrace_frames::HasPackage", tags = "14")] - pub has_package: ::core::option::Option, - #[prost(oneof = "exception_stacktrace_frames::HasPlatform", tags = "15")] - pub has_platform: ::core::option::Option, - #[prost(oneof = "exception_stacktrace_frames::HasRawFunction", tags = "18")] - pub has_raw_function: - ::core::option::Option, - #[prost(oneof = "exception_stacktrace_frames::HasStackStart", tags = "19")] - pub has_stack_start: ::core::option::Option, - #[prost(oneof = "exception_stacktrace_frames::HasSymbol", tags = "20")] - pub has_symbol: ::core::option::Option, - #[prost(oneof = "exception_stacktrace_frames::HasSymbolAddr", tags = "21")] - pub has_symbol_addr: ::core::option::Option, - #[prost(oneof = "exception_stacktrace_frames::HasVars", tags = "22")] - pub has_vars: ::core::option::Option, - } - /// Nested message and enum types in `ExceptionStacktraceFrames`. - pub mod exception_stacktrace_frames { - /// - /// A possible lock (java monitor object) held by this frame. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct ExceptionStacktraceFramesLock { - #[prost(string, tag = "5")] - pub r#type: ::prost::alloc::string::String, - #[prost(oneof = "exception_stacktrace_frames_lock::HasAddress", tags = "1")] - pub has_address: - ::core::option::Option, - #[prost(oneof = "exception_stacktrace_frames_lock::HasClassName", tags = "2")] - pub has_class_name: - ::core::option::Option, - #[prost(oneof = "exception_stacktrace_frames_lock::HasPackageName", tags = "3")] - pub has_package_name: - ::core::option::Option, - #[prost(oneof = "exception_stacktrace_frames_lock::HasThreadId", tags = "4")] - pub has_thread_id: - ::core::option::Option, - } - /// Nested message and enum types in `ExceptionStacktraceFramesLock`. - pub mod exception_stacktrace_frames_lock { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasAddress { - #[prost(string, tag = "1")] - Address(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasClassName { - #[prost(string, tag = "2")] - ClassName(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasPackageName { - #[prost(string, tag = "3")] - PackageName(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasThreadId { - #[prost(message, tag = "4")] - ThreadId(::prost_types::Value), - } - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasAbsPath { - #[prost(string, tag = "1")] - AbsPath(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasAddrMode { - #[prost(string, tag = "2")] - AddrMode(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasColno { - #[prost(uint64, tag = "3")] - Colno(u64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasContextLine { - #[prost(string, tag = "4")] - ContextLine(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasFilename { - #[prost(string, tag = "5")] - Filename(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasFunction { - #[prost(string, tag = "6")] - Function(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasFunctionId { - #[prost(string, tag = "7")] - FunctionId(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasImageAddr { - #[prost(string, tag = "8")] - ImageAddr(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasInApp { - #[prost(bool, tag = "9")] - InApp(bool), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasInstructionAddr { - #[prost(string, tag = "10")] - InstructionAddr(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasLineno { - #[prost(uint64, tag = "11")] - Lineno(u64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasLock { - #[prost(message, tag = "12")] - Lock(ExceptionStacktraceFramesLock), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasModule { - #[prost(string, tag = "13")] - Module(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasPackage { - #[prost(string, tag = "14")] - Package(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasPlatform { - #[prost(string, tag = "15")] - Platform(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasRawFunction { - #[prost(string, tag = "18")] - RawFunction(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasStackStart { - #[prost(bool, tag = "19")] - StackStart(bool), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasSymbol { - #[prost(string, tag = "20")] - Symbol(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasSymbolAddr { - #[prost(string, tag = "21")] - SymbolAddr(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasVars { - #[prost(message, tag = "22")] - Vars(::prost_types::Value), - } - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasInstructionAddrAdjustment { - #[prost(string, tag = "2")] - InstructionAddrAdjustment(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasLang { - #[prost(string, tag = "3")] - Lang(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasSnapshot { - #[prost(bool, tag = "5")] - Snapshot(bool), - } - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasMechanism { - #[prost(message, tag = "1")] - Mechanism(ExceptionMechanism), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasModule { - #[prost(string, tag = "2")] - Module(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasStacktrace { - #[prost(message, tag = "3")] - Stacktrace(ExceptionStacktrace), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasThreadId { - #[prost(message, tag = "4")] - ThreadId(::prost_types::Value), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasType { - #[prost(string, tag = "5")] - Type(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasValue { - #[prost(string, tag = "6")] - Value(::prost::alloc::string::String), - } -} -/// -/// Holds information about a single stacktrace frame. -/// -/// Each object should contain **at least** a `filename`, `function` or `instruction_addr` -/// attribute. All values are optional, but recommended. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Frame { - #[prost(string, repeated, tag = "16")] - pub post_context: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - #[prost(string, repeated, tag = "17")] - pub pre_context: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - #[prost(oneof = "frame::HasAbsPath", tags = "1")] - pub has_abs_path: ::core::option::Option, - #[prost(oneof = "frame::HasAddrMode", tags = "2")] - pub has_addr_mode: ::core::option::Option, - #[prost(oneof = "frame::HasColno", tags = "3")] - pub has_colno: ::core::option::Option, - #[prost(oneof = "frame::HasContextLine", tags = "4")] - pub has_context_line: ::core::option::Option, - #[prost(oneof = "frame::HasFilename", tags = "5")] - pub has_filename: ::core::option::Option, - #[prost(oneof = "frame::HasFunction", tags = "6")] - pub has_function: ::core::option::Option, - #[prost(oneof = "frame::HasFunctionId", tags = "7")] - pub has_function_id: ::core::option::Option, - #[prost(oneof = "frame::HasImageAddr", tags = "8")] - pub has_image_addr: ::core::option::Option, - #[prost(oneof = "frame::HasInApp", tags = "9")] - pub has_in_app: ::core::option::Option, - #[prost(oneof = "frame::HasInstructionAddr", tags = "10")] - pub has_instruction_addr: ::core::option::Option, - #[prost(oneof = "frame::HasLineno", tags = "11")] - pub has_lineno: ::core::option::Option, - #[prost(oneof = "frame::HasLock", tags = "12")] - pub has_lock: ::core::option::Option, - #[prost(oneof = "frame::HasModule", tags = "13")] - pub has_module: ::core::option::Option, - #[prost(oneof = "frame::HasPackage", tags = "14")] - pub has_package: ::core::option::Option, - #[prost(oneof = "frame::HasPlatform", tags = "15")] - pub has_platform: ::core::option::Option, - #[prost(oneof = "frame::HasRawFunction", tags = "18")] - pub has_raw_function: ::core::option::Option, - #[prost(oneof = "frame::HasStackStart", tags = "19")] - pub has_stack_start: ::core::option::Option, - #[prost(oneof = "frame::HasSymbol", tags = "20")] - pub has_symbol: ::core::option::Option, - #[prost(oneof = "frame::HasSymbolAddr", tags = "21")] - pub has_symbol_addr: ::core::option::Option, - #[prost(oneof = "frame::HasVars", tags = "22")] - pub has_vars: ::core::option::Option, -} -/// Nested message and enum types in `Frame`. -pub mod frame { - /// - /// A possible lock (java monitor object) held by this frame. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct FrameLock { - #[prost(string, tag = "5")] - pub r#type: ::prost::alloc::string::String, - #[prost(oneof = "frame_lock::HasAddress", tags = "1")] - pub has_address: ::core::option::Option, - #[prost(oneof = "frame_lock::HasClassName", tags = "2")] - pub has_class_name: ::core::option::Option, - #[prost(oneof = "frame_lock::HasPackageName", tags = "3")] - pub has_package_name: ::core::option::Option, - #[prost(oneof = "frame_lock::HasThreadId", tags = "4")] - pub has_thread_id: ::core::option::Option, - } - /// Nested message and enum types in `FrameLock`. - pub mod frame_lock { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasAddress { - #[prost(string, tag = "1")] - Address(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasClassName { - #[prost(string, tag = "2")] - ClassName(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasPackageName { - #[prost(string, tag = "3")] - PackageName(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasThreadId { - #[prost(message, tag = "4")] - ThreadId(::prost_types::Value), - } - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasAbsPath { - #[prost(string, tag = "1")] - AbsPath(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasAddrMode { - #[prost(string, tag = "2")] - AddrMode(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasColno { - #[prost(uint64, tag = "3")] - Colno(u64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasContextLine { - #[prost(string, tag = "4")] - ContextLine(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasFilename { - #[prost(string, tag = "5")] - Filename(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasFunction { - #[prost(string, tag = "6")] - Function(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasFunctionId { - #[prost(string, tag = "7")] - FunctionId(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasImageAddr { - #[prost(string, tag = "8")] - ImageAddr(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasInApp { - #[prost(bool, tag = "9")] - InApp(bool), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasInstructionAddr { - #[prost(string, tag = "10")] - InstructionAddr(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasLineno { - #[prost(uint64, tag = "11")] - Lineno(u64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasLock { - #[prost(message, tag = "12")] - Lock(FrameLock), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasModule { - #[prost(string, tag = "13")] - Module(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasPackage { - #[prost(string, tag = "14")] - Package(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasPlatform { - #[prost(string, tag = "15")] - Platform(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasRawFunction { - #[prost(string, tag = "18")] - RawFunction(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasStackStart { - #[prost(bool, tag = "19")] - StackStart(bool), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasSymbol { - #[prost(string, tag = "20")] - Symbol(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasSymbolAddr { - #[prost(string, tag = "21")] - SymbolAddr(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasVars { - #[prost(message, tag = "22")] - Vars(::prost_types::Value), - } -} -/// -/// Geographical location of the end user or device. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Geo { - #[prost(oneof = "geo::HasCity", tags = "1")] - pub has_city: ::core::option::Option, - #[prost(oneof = "geo::HasCountryCode", tags = "2")] - pub has_country_code: ::core::option::Option, - #[prost(oneof = "geo::HasRegion", tags = "3")] - pub has_region: ::core::option::Option, - #[prost(oneof = "geo::HasSubdivision", tags = "4")] - pub has_subdivision: ::core::option::Option, -} -/// Nested message and enum types in `Geo`. -pub mod geo { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasCity { - #[prost(string, tag = "1")] - City(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasCountryCode { - #[prost(string, tag = "2")] - CountryCode(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasRegion { - #[prost(string, tag = "3")] - Region(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasSubdivision { - #[prost(string, tag = "4")] - Subdivision(::prost::alloc::string::String), - } -} -/// -/// GPU information. -/// -/// Example: -/// -/// ```json -/// "gpu": { -/// "name": "AMD Radeon Pro 560", -/// "vendor_name": "Apple", -/// "memory_size": 4096, -/// "api_type": "Metal", -/// "multi_threaded_rendering": true, -/// "version": "Metal", -/// "npot_support": "Full" -/// } -/// ``` -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Gpucontext { - #[prost(message, optional, tag = "3")] - pub id: ::core::option::Option<::prost_types::Value>, - #[prost(oneof = "gpucontext::HasApiType", tags = "1")] - pub has_api_type: ::core::option::Option, - #[prost(oneof = "gpucontext::HasGraphicsShaderLevel", tags = "2")] - pub has_graphics_shader_level: ::core::option::Option, - #[prost(oneof = "gpucontext::HasMaxTextureSize", tags = "4")] - pub has_max_texture_size: ::core::option::Option, - #[prost(oneof = "gpucontext::HasMemorySize", tags = "5")] - pub has_memory_size: ::core::option::Option, - #[prost(oneof = "gpucontext::HasMultiThreadedRendering", tags = "6")] - pub has_multi_threaded_rendering: ::core::option::Option, - #[prost(oneof = "gpucontext::HasName", tags = "7")] - pub has_name: ::core::option::Option, - #[prost(oneof = "gpucontext::HasNpotSupport", tags = "8")] - pub has_npot_support: ::core::option::Option, - #[prost(oneof = "gpucontext::HasSupportsComputeShaders", tags = "9")] - pub has_supports_compute_shaders: ::core::option::Option, - #[prost(oneof = "gpucontext::HasSupportsDrawCallInstancing", tags = "10")] - pub has_supports_draw_call_instancing: - ::core::option::Option, - #[prost(oneof = "gpucontext::HasSupportsGeometryShaders", tags = "11")] - pub has_supports_geometry_shaders: - ::core::option::Option, - #[prost(oneof = "gpucontext::HasSupportsRayTracing", tags = "12")] - pub has_supports_ray_tracing: ::core::option::Option, - #[prost(oneof = "gpucontext::HasVendorId", tags = "13")] - pub has_vendor_id: ::core::option::Option, - #[prost(oneof = "gpucontext::HasVendorName", tags = "14")] - pub has_vendor_name: ::core::option::Option, - #[prost(oneof = "gpucontext::HasVersion", tags = "15")] - pub has_version: ::core::option::Option, -} -/// Nested message and enum types in `Gpucontext`. -pub mod gpucontext { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasApiType { - #[prost(string, tag = "1")] - ApiType(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasGraphicsShaderLevel { - #[prost(string, tag = "2")] - GraphicsShaderLevel(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasMaxTextureSize { - #[prost(uint64, tag = "4")] - MaxTextureSize(u64), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasMemorySize { - #[prost(uint64, tag = "5")] - MemorySize(u64), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasMultiThreadedRendering { - #[prost(bool, tag = "6")] - MultiThreadedRendering(bool), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasName { - #[prost(string, tag = "7")] - Name(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasNpotSupport { - #[prost(string, tag = "8")] - NpotSupport(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasSupportsComputeShaders { - #[prost(bool, tag = "9")] - SupportsComputeShaders(bool), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasSupportsDrawCallInstancing { - #[prost(bool, tag = "10")] - SupportsDrawCallInstancing(bool), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasSupportsGeometryShaders { - #[prost(bool, tag = "11")] - SupportsGeometryShaders(bool), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasSupportsRayTracing { - #[prost(bool, tag = "12")] - SupportsRayTracing(bool), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasVendorId { - #[prost(string, tag = "13")] - VendorId(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasVendorName { - #[prost(string, tag = "14")] - VendorName(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasVersion { - #[prost(string, tag = "15")] - Version(::prost::alloc::string::String), - } -} -/// -/// A debug image consisting of source files for a JVM based language. -/// -/// Examples: -/// -/// ```json -/// { -/// "type": "jvm", -/// "debug_id": "395835f4-03e0-4436-80d3-136f0749a893" -/// } -/// ``` -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Jvmdebugimage { - #[prost(string, tag = "1")] - pub debug_id: ::prost::alloc::string::String, -} -/// -/// Represents an instance of a held lock (java monitor object) in a thread. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Lockreason { - #[prost(string, tag = "5")] - pub r#type: ::prost::alloc::string::String, - #[prost(oneof = "lockreason::HasAddress", tags = "1")] - pub has_address: ::core::option::Option, - #[prost(oneof = "lockreason::HasClassName", tags = "2")] - pub has_class_name: ::core::option::Option, - #[prost(oneof = "lockreason::HasPackageName", tags = "3")] - pub has_package_name: ::core::option::Option, - #[prost(oneof = "lockreason::HasThreadId", tags = "4")] - pub has_thread_id: ::core::option::Option, -} -/// Nested message and enum types in `Lockreason`. -pub mod lockreason { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasAddress { - #[prost(string, tag = "1")] - Address(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasClassName { - #[prost(string, tag = "2")] - ClassName(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasPackageName { - #[prost(string, tag = "3")] - PackageName(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasThreadId { - #[prost(message, tag = "4")] - ThreadId(::prost_types::Value), - } -} -/// -/// A log entry message. -/// -/// A log message is similar to the `message` attribute on the event itself but -/// can additionally hold optional parameters. -/// -/// ```json -/// { -/// "message": { -/// "message": "My raw message with interpreted strings like %s", -/// "params": \["this"\] -/// } -/// } -/// ``` -/// -/// ```json -/// { -/// "message": { -/// "message": "My raw message with interpreted strings like {foo}", -/// "params": {"foo": "this"} -/// } -/// } -/// ``` -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Logentry { - #[prost(message, optional, tag = "3")] - pub params: ::core::option::Option<::prost_types::Value>, - #[prost(oneof = "logentry::HasFormatted", tags = "1")] - pub has_formatted: ::core::option::Option, - #[prost(oneof = "logentry::HasMessage", tags = "2")] - pub has_message: ::core::option::Option, -} -/// Nested message and enum types in `Logentry`. -pub mod logentry { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasFormatted { - #[prost(string, tag = "1")] - Formatted(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasMessage { - #[prost(string, tag = "2")] - Message(::prost::alloc::string::String), - } -} -/// -/// Mach exception information. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Machexception { - #[prost(oneof = "machexception::HasCode", tags = "1")] - pub has_code: ::core::option::Option, - #[prost(oneof = "machexception::HasException", tags = "2")] - pub has_exception: ::core::option::Option, - #[prost(oneof = "machexception::HasName", tags = "3")] - pub has_name: ::core::option::Option, - #[prost(oneof = "machexception::HasSubcode", tags = "4")] - pub has_subcode: ::core::option::Option, -} -/// Nested message and enum types in `Machexception`. -pub mod machexception { - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasCode { - #[prost(uint64, tag = "1")] - Code(u64), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasException { - #[prost(int64, tag = "2")] - Exception(i64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasName { - #[prost(string, tag = "3")] - Name(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasSubcode { - #[prost(uint64, tag = "4")] - Subcode(u64), - } -} -/// -/// The mechanism by which an exception was generated and handled. -/// -/// The exception mechanism is an optional field residing in the [exception](#typedef-Exception). -/// It carries additional information about the way the exception was created on the target system. -/// This includes general exception values obtained from the operating system or runtime APIs, as -/// well as mechanism-specific values. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Mechanism { - #[prost(string, tag = "11")] - pub r#type: ::prost::alloc::string::String, - #[prost(oneof = "mechanism::HasData", tags = "1")] - pub has_data: ::core::option::Option, - #[prost(oneof = "mechanism::HasDescription", tags = "2")] - pub has_description: ::core::option::Option, - #[prost(oneof = "mechanism::HasExceptionId", tags = "3")] - pub has_exception_id: ::core::option::Option, - #[prost(oneof = "mechanism::HasHandled", tags = "4")] - pub has_handled: ::core::option::Option, - #[prost(oneof = "mechanism::HasHelpLink", tags = "5")] - pub has_help_link: ::core::option::Option, - #[prost(oneof = "mechanism::HasIsExceptionGroup", tags = "6")] - pub has_is_exception_group: ::core::option::Option, - #[prost(oneof = "mechanism::HasMeta", tags = "7")] - pub has_meta: ::core::option::Option, - #[prost(oneof = "mechanism::HasParentId", tags = "8")] - pub has_parent_id: ::core::option::Option, - #[prost(oneof = "mechanism::HasSource", tags = "9")] - pub has_source: ::core::option::Option, - #[prost(oneof = "mechanism::HasSynthetic", tags = "10")] - pub has_synthetic: ::core::option::Option, -} -/// Nested message and enum types in `Mechanism`. -pub mod mechanism { - /// - /// Operating system or runtime meta information. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct MechanismMeta { - #[prost(oneof = "mechanism_meta::HasErrno", tags = "1")] - pub has_errno: ::core::option::Option, - #[prost(oneof = "mechanism_meta::HasMachException", tags = "2")] - pub has_mach_exception: ::core::option::Option, - #[prost(oneof = "mechanism_meta::HasNsError", tags = "3")] - pub has_ns_error: ::core::option::Option, - #[prost(oneof = "mechanism_meta::HasSignal", tags = "4")] - pub has_signal: ::core::option::Option, - } - /// Nested message and enum types in `MechanismMeta`. - pub mod mechanism_meta { - /// - /// Optional ISO C standard error code. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct MechanismMetaErrno { - #[prost(oneof = "mechanism_meta_errno::HasName", tags = "1")] - pub has_name: ::core::option::Option, - #[prost(oneof = "mechanism_meta_errno::HasNumber", tags = "2")] - pub has_number: ::core::option::Option, - } - /// Nested message and enum types in `MechanismMetaErrno`. - pub mod mechanism_meta_errno { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasName { - #[prost(string, tag = "1")] - Name(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasNumber { - #[prost(int64, tag = "2")] - Number(i64), - } - } - /// - /// A Mach Exception on Apple systems comprising a code triple and optional descriptions. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct MechanismMetaMachException { - #[prost(oneof = "mechanism_meta_mach_exception::HasCode", tags = "1")] - pub has_code: ::core::option::Option, - #[prost(oneof = "mechanism_meta_mach_exception::HasException", tags = "2")] - pub has_exception: ::core::option::Option, - #[prost(oneof = "mechanism_meta_mach_exception::HasName", tags = "3")] - pub has_name: ::core::option::Option, - #[prost(oneof = "mechanism_meta_mach_exception::HasSubcode", tags = "4")] - pub has_subcode: ::core::option::Option, - } - /// Nested message and enum types in `MechanismMetaMachException`. - pub mod mechanism_meta_mach_exception { - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasCode { - #[prost(uint64, tag = "1")] - Code(u64), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasException { - #[prost(int64, tag = "2")] - Exception(i64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasName { - #[prost(string, tag = "3")] - Name(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasSubcode { - #[prost(uint64, tag = "4")] - Subcode(u64), - } - } - /// - /// An NSError on Apple systems comprising code and signal. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct MechanismMetaNsError { - #[prost(oneof = "mechanism_meta_ns_error::HasCode", tags = "1")] - pub has_code: ::core::option::Option, - #[prost(oneof = "mechanism_meta_ns_error::HasDomain", tags = "2")] - pub has_domain: ::core::option::Option, - } - /// Nested message and enum types in `MechanismMetaNsError`. - pub mod mechanism_meta_ns_error { - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasCode { - #[prost(int64, tag = "1")] - Code(i64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasDomain { - #[prost(string, tag = "2")] - Domain(::prost::alloc::string::String), - } - } - /// - /// Information on the POSIX signal. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct MechanismMetaSignal { - #[prost(oneof = "mechanism_meta_signal::HasCode", tags = "1")] - pub has_code: ::core::option::Option, - #[prost(oneof = "mechanism_meta_signal::HasCodeName", tags = "2")] - pub has_code_name: ::core::option::Option, - #[prost(oneof = "mechanism_meta_signal::HasName", tags = "3")] - pub has_name: ::core::option::Option, - #[prost(oneof = "mechanism_meta_signal::HasNumber", tags = "4")] - pub has_number: ::core::option::Option, - } - /// Nested message and enum types in `MechanismMetaSignal`. - pub mod mechanism_meta_signal { - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasCode { - #[prost(int64, tag = "1")] - Code(i64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasCodeName { - #[prost(string, tag = "2")] - CodeName(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasName { - #[prost(string, tag = "3")] - Name(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasNumber { - #[prost(int64, tag = "4")] - Number(i64), - } - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasErrno { - #[prost(message, tag = "1")] - Errno(MechanismMetaErrno), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasMachException { - #[prost(message, tag = "2")] - MachException(MechanismMetaMachException), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasNsError { - #[prost(message, tag = "3")] - NsError(MechanismMetaNsError), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasSignal { - #[prost(message, tag = "4")] - Signal(MechanismMetaSignal), - } - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasData { - #[prost(message, tag = "1")] - Data(::prost_types::Value), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasDescription { - #[prost(string, tag = "2")] - Description(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasExceptionId { - #[prost(uint64, tag = "3")] - ExceptionId(u64), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasHandled { - #[prost(bool, tag = "4")] - Handled(bool), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasHelpLink { - #[prost(string, tag = "5")] - HelpLink(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasIsExceptionGroup { - #[prost(bool, tag = "6")] - IsExceptionGroup(bool), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasMeta { - #[prost(message, tag = "7")] - Meta(MechanismMeta), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasParentId { - #[prost(uint64, tag = "8")] - ParentId(u64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasSource { - #[prost(string, tag = "9")] - Source(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasSynthetic { - #[prost(bool, tag = "10")] - Synthetic(bool), - } -} -/// -/// Operating system or runtime meta information to an exception mechanism. -/// -/// The mechanism metadata usually carries error codes reported by the runtime or operating system, -/// along with a platform-dependent interpretation of these codes. SDKs can safely omit code names -/// and descriptions for well-known error codes, as it will be filled out by Sentry. For -/// proprietary or vendor-specific error codes, adding these values will give additional -/// information to the user. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Mechanismmeta { - #[prost(oneof = "mechanismmeta::HasErrno", tags = "1")] - pub has_errno: ::core::option::Option, - #[prost(oneof = "mechanismmeta::HasMachException", tags = "2")] - pub has_mach_exception: ::core::option::Option, - #[prost(oneof = "mechanismmeta::HasNsError", tags = "3")] - pub has_ns_error: ::core::option::Option, - #[prost(oneof = "mechanismmeta::HasSignal", tags = "4")] - pub has_signal: ::core::option::Option, -} -/// Nested message and enum types in `Mechanismmeta`. -pub mod mechanismmeta { - /// - /// Optional ISO C standard error code. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct MechanismmetaErrno { - #[prost(oneof = "mechanismmeta_errno::HasName", tags = "1")] - pub has_name: ::core::option::Option, - #[prost(oneof = "mechanismmeta_errno::HasNumber", tags = "2")] - pub has_number: ::core::option::Option, - } - /// Nested message and enum types in `MechanismmetaErrno`. - pub mod mechanismmeta_errno { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasName { - #[prost(string, tag = "1")] - Name(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasNumber { - #[prost(int64, tag = "2")] - Number(i64), - } - } - /// - /// A Mach Exception on Apple systems comprising a code triple and optional descriptions. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct MechanismmetaMachException { - #[prost(oneof = "mechanismmeta_mach_exception::HasCode", tags = "1")] - pub has_code: ::core::option::Option, - #[prost(oneof = "mechanismmeta_mach_exception::HasException", tags = "2")] - pub has_exception: ::core::option::Option, - #[prost(oneof = "mechanismmeta_mach_exception::HasName", tags = "3")] - pub has_name: ::core::option::Option, - #[prost(oneof = "mechanismmeta_mach_exception::HasSubcode", tags = "4")] - pub has_subcode: ::core::option::Option, - } - /// Nested message and enum types in `MechanismmetaMachException`. - pub mod mechanismmeta_mach_exception { - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasCode { - #[prost(uint64, tag = "1")] - Code(u64), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasException { - #[prost(int64, tag = "2")] - Exception(i64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasName { - #[prost(string, tag = "3")] - Name(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasSubcode { - #[prost(uint64, tag = "4")] - Subcode(u64), - } - } - /// - /// An NSError on Apple systems comprising code and signal. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct MechanismmetaNsError { - #[prost(oneof = "mechanismmeta_ns_error::HasCode", tags = "1")] - pub has_code: ::core::option::Option, - #[prost(oneof = "mechanismmeta_ns_error::HasDomain", tags = "2")] - pub has_domain: ::core::option::Option, - } - /// Nested message and enum types in `MechanismmetaNsError`. - pub mod mechanismmeta_ns_error { - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasCode { - #[prost(int64, tag = "1")] - Code(i64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasDomain { - #[prost(string, tag = "2")] - Domain(::prost::alloc::string::String), - } - } - /// - /// Information on the POSIX signal. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct MechanismmetaSignal { - #[prost(oneof = "mechanismmeta_signal::HasCode", tags = "1")] - pub has_code: ::core::option::Option, - #[prost(oneof = "mechanismmeta_signal::HasCodeName", tags = "2")] - pub has_code_name: ::core::option::Option, - #[prost(oneof = "mechanismmeta_signal::HasName", tags = "3")] - pub has_name: ::core::option::Option, - #[prost(oneof = "mechanismmeta_signal::HasNumber", tags = "4")] - pub has_number: ::core::option::Option, - } - /// Nested message and enum types in `MechanismmetaSignal`. - pub mod mechanismmeta_signal { - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasCode { - #[prost(int64, tag = "1")] - Code(i64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasCodeName { - #[prost(string, tag = "2")] - CodeName(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasName { - #[prost(string, tag = "3")] - Name(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasNumber { - #[prost(int64, tag = "4")] - Number(i64), - } - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasErrno { - #[prost(message, tag = "1")] - Errno(MechanismmetaErrno), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasMachException { - #[prost(message, tag = "2")] - MachException(MechanismmetaMachException), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasNsError { - #[prost(message, tag = "3")] - NsError(MechanismmetaNsError), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasSignal { - #[prost(message, tag = "4")] - Signal(MechanismmetaSignal), - } -} -/// -/// A generic (new-style) native platform debug information file. -/// -/// The `type` key must be one of: -/// -/// - `macho` -/// - `elf`: ELF images are used on Linux platforms. Their structure is identical to other native images. -/// - `pe` -/// -/// Examples: -/// -/// ```json -/// { -/// "type": "elf", -/// "code_id": "68220ae2c65d65c1b6aaa12fa6765a6ec2f5f434", -/// "code_file": "/lib/x86_64-linux-gnu/libgcc_s.so.1", -/// "debug_id": "e20a2268-5dc6-c165-b6aa-a12fa6765a6e", -/// "image_addr": "0x7f5140527000", -/// "image_size": 90112, -/// "image_vmaddr": "0x40000", -/// "arch": "x86_64" -/// } -/// ``` -/// -/// ```json -/// { -/// "type": "pe", -/// "code_id": "57898e12145000", -/// "code_file": "C:\\Windows\\System32\\dbghelp.dll", -/// "debug_id": "9c2a902b-6fdf-40ad-8308-588a41d572a0-1", -/// "debug_file": "dbghelp.pdb", -/// "image_addr": "0x70850000", -/// "image_size": "1331200", -/// "image_vmaddr": "0x40000", -/// "arch": "x86" -/// } -/// ``` -/// -/// ```json -/// { -/// "type": "macho", -/// "debug_id": "84a04d24-0e60-3810-a8c0-90a65e2df61a", -/// "debug_file": "libDiagnosticMessagesClient.dylib", -/// "code_file": "/usr/lib/libDiagnosticMessagesClient.dylib", -/// "image_addr": "0x7fffe668e000", -/// "image_size": 8192, -/// "image_vmaddr": "0x40000", -/// "arch": "x86_64", -/// } -/// ``` -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Nativedebugimage { - #[prost(string, tag = "2")] - pub code_file: ::prost::alloc::string::String, - #[prost(string, tag = "6")] - pub debug_id: ::prost::alloc::string::String, - #[prost(oneof = "nativedebugimage::HasArch", tags = "1")] - pub has_arch: ::core::option::Option, - #[prost(oneof = "nativedebugimage::HasCodeId", tags = "3")] - pub has_code_id: ::core::option::Option, - #[prost(oneof = "nativedebugimage::HasDebugChecksum", tags = "4")] - pub has_debug_checksum: ::core::option::Option, - #[prost(oneof = "nativedebugimage::HasDebugFile", tags = "5")] - pub has_debug_file: ::core::option::Option, - #[prost(oneof = "nativedebugimage::HasImageAddr", tags = "7")] - pub has_image_addr: ::core::option::Option, - #[prost(oneof = "nativedebugimage::HasImageSize", tags = "8")] - pub has_image_size: ::core::option::Option, - #[prost(oneof = "nativedebugimage::HasImageVmaddr", tags = "9")] - pub has_image_vmaddr: ::core::option::Option, -} -/// Nested message and enum types in `Nativedebugimage`. -pub mod nativedebugimage { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasArch { - #[prost(string, tag = "1")] - Arch(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasCodeId { - #[prost(string, tag = "3")] - CodeId(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasDebugChecksum { - #[prost(string, tag = "4")] - DebugChecksum(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasDebugFile { - #[prost(string, tag = "5")] - DebugFile(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasImageAddr { - #[prost(string, tag = "7")] - ImageAddr(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasImageSize { - #[prost(uint64, tag = "8")] - ImageSize(u64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasImageVmaddr { - #[prost(string, tag = "9")] - ImageVmaddr(::prost::alloc::string::String), - } -} -/// -/// Contains NEL report information. -/// -/// Network Error Logging (NEL) is a browser feature that allows reporting of failed network -/// requests from the client side. See the following resources for more information: -/// -/// - [W3C Editor's Draft]() -/// - [MDN]() -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Nelcontext { - #[prost(oneof = "nelcontext::HasElapsedTime", tags = "1")] - pub has_elapsed_time: ::core::option::Option, - #[prost(oneof = "nelcontext::HasErrorType", tags = "2")] - pub has_error_type: ::core::option::Option, - #[prost(oneof = "nelcontext::HasPhase", tags = "3")] - pub has_phase: ::core::option::Option, - #[prost(oneof = "nelcontext::HasSamplingFraction", tags = "4")] - pub has_sampling_fraction: ::core::option::Option, - #[prost(oneof = "nelcontext::HasServerIp", tags = "5")] - pub has_server_ip: ::core::option::Option, -} -/// Nested message and enum types in `Nelcontext`. -pub mod nelcontext { - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasElapsedTime { - #[prost(uint64, tag = "1")] - ElapsedTime(u64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasErrorType { - #[prost(string, tag = "2")] - ErrorType(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasPhase { - #[prost(message, tag = "3")] - Phase(::prost_types::Value), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasSamplingFraction { - #[prost(double, tag = "4")] - SamplingFraction(f64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasServerIp { - #[prost(string, tag = "5")] - ServerIp(::prost::alloc::string::String), - } -} -/// -/// NSError informaiton. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Nserror { - #[prost(oneof = "nserror::HasCode", tags = "1")] - pub has_code: ::core::option::Option, - #[prost(oneof = "nserror::HasDomain", tags = "2")] - pub has_domain: ::core::option::Option, -} -/// Nested message and enum types in `Nserror`. -pub mod nserror { - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasCode { - #[prost(int64, tag = "1")] - Code(i64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasDomain { - #[prost(string, tag = "2")] - Domain(::prost::alloc::string::String), - } -} -/// -/// Operating system information. -/// -/// OS context describes the operating system on which the event was created. In web contexts, this -/// is the operating system of the browser (generally pulled from the User-Agent string). -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Oscontext { - #[prost(oneof = "oscontext::HasBuild", tags = "1")] - pub has_build: ::core::option::Option, - #[prost(oneof = "oscontext::HasKernelVersion", tags = "2")] - pub has_kernel_version: ::core::option::Option, - #[prost(oneof = "oscontext::HasName", tags = "3")] - pub has_name: ::core::option::Option, - #[prost(oneof = "oscontext::HasRawDescription", tags = "4")] - pub has_raw_description: ::core::option::Option, - #[prost(oneof = "oscontext::HasRooted", tags = "5")] - pub has_rooted: ::core::option::Option, - #[prost(oneof = "oscontext::HasVersion", tags = "6")] - pub has_version: ::core::option::Option, -} -/// Nested message and enum types in `Oscontext`. -pub mod oscontext { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasBuild { - #[prost(string, tag = "1")] - Build(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasKernelVersion { - #[prost(string, tag = "2")] - KernelVersion(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasName { - #[prost(string, tag = "3")] - Name(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasRawDescription { - #[prost(string, tag = "4")] - RawDescription(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasRooted { - #[prost(bool, tag = "5")] - Rooted(bool), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasVersion { - #[prost(string, tag = "6")] - Version(::prost::alloc::string::String), - } -} -/// -/// OpenTelemetry Context -/// -/// If an event has this context, it was generated from an OpenTelemetry signal (trace, metric, log). -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Otelcontext { - #[prost(oneof = "otelcontext::HasAttributes", tags = "1")] - pub has_attributes: ::core::option::Option, - #[prost(oneof = "otelcontext::HasResource", tags = "2")] - pub has_resource: ::core::option::Option, -} -/// Nested message and enum types in `Otelcontext`. -pub mod otelcontext { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasAttributes { - #[prost(message, tag = "1")] - Attributes(::prost_types::Value), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasResource { - #[prost(message, tag = "2")] - Resource(::prost_types::Value), - } -} -/// -/// POSIX signal with optional extended data. -/// -/// On Apple systems, signals also carry a code in addition to the signal number describing the -/// signal in more detail. On Linux, this code does not exist. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Posixsignal { - #[prost(oneof = "posixsignal::HasCode", tags = "1")] - pub has_code: ::core::option::Option, - #[prost(oneof = "posixsignal::HasCodeName", tags = "2")] - pub has_code_name: ::core::option::Option, - #[prost(oneof = "posixsignal::HasName", tags = "3")] - pub has_name: ::core::option::Option, - #[prost(oneof = "posixsignal::HasNumber", tags = "4")] - pub has_number: ::core::option::Option, -} -/// Nested message and enum types in `Posixsignal`. -pub mod posixsignal { - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasCode { - #[prost(int64, tag = "1")] - Code(i64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasCodeName { - #[prost(string, tag = "2")] - CodeName(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasName { - #[prost(string, tag = "3")] - Name(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasNumber { - #[prost(int64, tag = "4")] - Number(i64), - } -} -/// -/// Profile context -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Profilecontext { - #[prost(string, tag = "1")] - pub profile_id: ::prost::alloc::string::String, -} -/// -/// Proguard mapping file. -/// -/// Proguard images refer to `mapping.txt` files generated when Proguard obfuscates function names. The Java SDK integrations assign this file a unique identifier, which has to be included in the list of images. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Proguarddebugimage { - #[prost(string, tag = "1")] - pub uuid: ::prost::alloc::string::String, -} -/// -/// A stack trace of a single thread. -/// -/// A stack trace contains a list of frames, each with various bits (most optional) describing the -/// context of that frame. Frames should be sorted from oldest to newest. -/// -/// For the given example program written in Python: -/// -/// ```python -/// def foo(): -/// my_var = 'foo' -/// raise ValueError() -/// -/// def main(): -/// foo() -/// ``` -/// -/// A minimalistic stack trace for the above program in the correct order: -/// -/// ```json -/// { -/// "frames": [ -/// {"function": "main"}, -/// {"function": "foo"} -/// ] -/// } -/// ``` -/// -/// The top frame fully symbolicated with five lines of source context: -/// -/// ```json -/// { -/// "frames": [{ -/// "in_app": true, -/// "function": "myfunction", -/// "abs_path": "/real/file/name.py", -/// "filename": "file/name.py", -/// "lineno": 3, -/// "vars": { -/// "my_var": "'value'" -/// }, -/// "pre_context": [ -/// "def foo():", -/// " my_var = 'foo'", -/// ], -/// "context_line": " raise ValueError()", -/// "post_context": [ -/// "", -/// "def main():" -/// ], -/// }] -/// } -/// ``` -/// -/// A minimal native stack trace with register values. Note that the `package` event attribute must -/// be "native" for these frames to be symbolicated. -/// -/// ```json -/// { -/// "frames": [ -/// {"instruction_addr": "0x7fff5bf3456c"}, -/// {"instruction_addr": "0x7fff5bf346c0"}, -/// ], -/// "registers": { -/// "rip": "0x00007ff6eef54be2", -/// "rsp": "0x0000003b710cd9e0" -/// } -/// } -/// ``` -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Rawstacktrace { - #[prost(message, repeated, tag = "1")] - pub frames: ::prost::alloc::vec::Vec, - #[prost(map = "string, string", tag = "4")] - pub registers: - ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, - #[prost(oneof = "rawstacktrace::HasInstructionAddrAdjustment", tags = "2")] - pub has_instruction_addr_adjustment: - ::core::option::Option, - #[prost(oneof = "rawstacktrace::HasLang", tags = "3")] - pub has_lang: ::core::option::Option, - #[prost(oneof = "rawstacktrace::HasSnapshot", tags = "5")] - pub has_snapshot: ::core::option::Option, -} -/// Nested message and enum types in `Rawstacktrace`. -pub mod rawstacktrace { - /// - /// Required. A non-empty list of stack frames. The list is ordered from caller to callee, or - /// oldest to youngest. The last frame is the one creating the exception. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct RawstacktraceFrames { - #[prost(string, repeated, tag = "16")] - pub post_context: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - #[prost(string, repeated, tag = "17")] - pub pre_context: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - #[prost(oneof = "rawstacktrace_frames::HasAbsPath", tags = "1")] - pub has_abs_path: ::core::option::Option, - #[prost(oneof = "rawstacktrace_frames::HasAddrMode", tags = "2")] - pub has_addr_mode: ::core::option::Option, - #[prost(oneof = "rawstacktrace_frames::HasColno", tags = "3")] - pub has_colno: ::core::option::Option, - #[prost(oneof = "rawstacktrace_frames::HasContextLine", tags = "4")] - pub has_context_line: ::core::option::Option, - #[prost(oneof = "rawstacktrace_frames::HasFilename", tags = "5")] - pub has_filename: ::core::option::Option, - #[prost(oneof = "rawstacktrace_frames::HasFunction", tags = "6")] - pub has_function: ::core::option::Option, - #[prost(oneof = "rawstacktrace_frames::HasFunctionId", tags = "7")] - pub has_function_id: ::core::option::Option, - #[prost(oneof = "rawstacktrace_frames::HasImageAddr", tags = "8")] - pub has_image_addr: ::core::option::Option, - #[prost(oneof = "rawstacktrace_frames::HasInApp", tags = "9")] - pub has_in_app: ::core::option::Option, - #[prost(oneof = "rawstacktrace_frames::HasInstructionAddr", tags = "10")] - pub has_instruction_addr: ::core::option::Option, - #[prost(oneof = "rawstacktrace_frames::HasLineno", tags = "11")] - pub has_lineno: ::core::option::Option, - #[prost(oneof = "rawstacktrace_frames::HasLock", tags = "12")] - pub has_lock: ::core::option::Option, - #[prost(oneof = "rawstacktrace_frames::HasModule", tags = "13")] - pub has_module: ::core::option::Option, - #[prost(oneof = "rawstacktrace_frames::HasPackage", tags = "14")] - pub has_package: ::core::option::Option, - #[prost(oneof = "rawstacktrace_frames::HasPlatform", tags = "15")] - pub has_platform: ::core::option::Option, - #[prost(oneof = "rawstacktrace_frames::HasRawFunction", tags = "18")] - pub has_raw_function: ::core::option::Option, - #[prost(oneof = "rawstacktrace_frames::HasStackStart", tags = "19")] - pub has_stack_start: ::core::option::Option, - #[prost(oneof = "rawstacktrace_frames::HasSymbol", tags = "20")] - pub has_symbol: ::core::option::Option, - #[prost(oneof = "rawstacktrace_frames::HasSymbolAddr", tags = "21")] - pub has_symbol_addr: ::core::option::Option, - #[prost(oneof = "rawstacktrace_frames::HasVars", tags = "22")] - pub has_vars: ::core::option::Option, - } - /// Nested message and enum types in `RawstacktraceFrames`. - pub mod rawstacktrace_frames { - /// - /// A possible lock (java monitor object) held by this frame. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct RawstacktraceFramesLock { - #[prost(string, tag = "5")] - pub r#type: ::prost::alloc::string::String, - #[prost(oneof = "rawstacktrace_frames_lock::HasAddress", tags = "1")] - pub has_address: ::core::option::Option, - #[prost(oneof = "rawstacktrace_frames_lock::HasClassName", tags = "2")] - pub has_class_name: ::core::option::Option, - #[prost(oneof = "rawstacktrace_frames_lock::HasPackageName", tags = "3")] - pub has_package_name: ::core::option::Option, - #[prost(oneof = "rawstacktrace_frames_lock::HasThreadId", tags = "4")] - pub has_thread_id: ::core::option::Option, - } - /// Nested message and enum types in `RawstacktraceFramesLock`. - pub mod rawstacktrace_frames_lock { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasAddress { - #[prost(string, tag = "1")] - Address(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasClassName { - #[prost(string, tag = "2")] - ClassName(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasPackageName { - #[prost(string, tag = "3")] - PackageName(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasThreadId { - #[prost(message, tag = "4")] - ThreadId(::prost_types::Value), - } - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasAbsPath { - #[prost(string, tag = "1")] - AbsPath(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasAddrMode { - #[prost(string, tag = "2")] - AddrMode(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasColno { - #[prost(uint64, tag = "3")] - Colno(u64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasContextLine { - #[prost(string, tag = "4")] - ContextLine(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasFilename { - #[prost(string, tag = "5")] - Filename(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasFunction { - #[prost(string, tag = "6")] - Function(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasFunctionId { - #[prost(string, tag = "7")] - FunctionId(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasImageAddr { - #[prost(string, tag = "8")] - ImageAddr(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasInApp { - #[prost(bool, tag = "9")] - InApp(bool), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasInstructionAddr { - #[prost(string, tag = "10")] - InstructionAddr(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasLineno { - #[prost(uint64, tag = "11")] - Lineno(u64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasLock { - #[prost(message, tag = "12")] - Lock(RawstacktraceFramesLock), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasModule { - #[prost(string, tag = "13")] - Module(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasPackage { - #[prost(string, tag = "14")] - Package(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasPlatform { - #[prost(string, tag = "15")] - Platform(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasRawFunction { - #[prost(string, tag = "18")] - RawFunction(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasStackStart { - #[prost(bool, tag = "19")] - StackStart(bool), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasSymbol { - #[prost(string, tag = "20")] - Symbol(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasSymbolAddr { - #[prost(string, tag = "21")] - SymbolAddr(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasVars { - #[prost(message, tag = "22")] - Vars(::prost_types::Value), - } - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasInstructionAddrAdjustment { - #[prost(string, tag = "2")] - InstructionAddrAdjustment(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasLang { - #[prost(string, tag = "3")] - Lang(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasSnapshot { - #[prost(bool, tag = "5")] - Snapshot(bool), - } -} -/// -/// Replay context. -/// -/// The replay context contains the replay_id of the session replay if the event -/// occurred during a replay. The replay_id is added onto the dynamic sampling context -/// on the javascript SDK which propagates it through the trace. In relay, we take -/// this value from the DSC and create a context which contains only the replay_id -/// This context is never set on the client for events, only on relay. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Replaycontext { - #[prost(oneof = "replaycontext::HasReplayId", tags = "1")] - pub has_replay_id: ::core::option::Option, -} -/// Nested message and enum types in `Replaycontext`. -pub mod replaycontext { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasReplayId { - #[prost(string, tag = "1")] - ReplayId(::prost::alloc::string::String), - } -} -/// -/// Http request information. -/// -/// The Request interface contains information on a HTTP request related to the event. In client -/// SDKs, this can be an outgoing request, or the request that rendered the current web page. On -/// server SDKs, this could be the incoming web request that is being handled. -/// -/// The data variable should only contain the request body (not the query string). It can either be -/// a dictionary (for standard HTTP requests) or a raw request body. -/// -/// ### Ordered Maps -/// -/// In the Request interface, several attributes can either be declared as string, object, or list -/// of tuples. Sentry attempts to parse structured information from the string representation in -/// such cases. -/// -/// Sometimes, keys can be declared multiple times, or the order of elements matters. In such -/// cases, use the tuple representation over a plain object. -/// -/// Example of request headers as object: -/// -/// ```json -/// { -/// "content-type": "application/json", -/// "accept": "application/json, application/xml" -/// } -/// ``` -/// -/// Example of the same headers as list of tuples: -/// -/// ```json -/// [ -/// \["content-type", "application/json"\], -/// \["accept", "application/json"\], -/// \["accept", "application/xml"\] -/// ] -/// ``` -/// -/// Example of a fully populated request object: -/// -/// ```json -/// { -/// "request": { -/// "method": "POST", -/// "url": " -/// "query_string": "query=foobar&page=2", -/// "data": { -/// "foo": "bar" -/// }, -/// "cookies": "PHPSESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;", -/// "headers": { -/// "content-type": "text/html" -/// }, -/// "env": { -/// "REMOTE_ADDR": "192.168.0.1" -/// } -/// } -/// } -/// ``` -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Request { - #[prost(message, optional, tag = "4")] - pub data: ::core::option::Option<::prost_types::Value>, - #[prost(oneof = "request::HasApiTarget", tags = "1")] - pub has_api_target: ::core::option::Option, - #[prost(oneof = "request::HasBodySize", tags = "2")] - pub has_body_size: ::core::option::Option, - #[prost(oneof = "request::HasCookies", tags = "3")] - pub has_cookies: ::core::option::Option, - #[prost(oneof = "request::HasEnv", tags = "5")] - pub has_env: ::core::option::Option, - #[prost(oneof = "request::HasFragment", tags = "6")] - pub has_fragment: ::core::option::Option, - #[prost(oneof = "request::HasHeaders", tags = "7")] - pub has_headers: ::core::option::Option, - #[prost(oneof = "request::HasInferredContentType", tags = "8")] - pub has_inferred_content_type: ::core::option::Option, - #[prost(oneof = "request::HasMethod", tags = "9")] - pub has_method: ::core::option::Option, - #[prost(oneof = "request::HasProtocol", tags = "10")] - pub has_protocol: ::core::option::Option, - #[prost(oneof = "request::HasQueryString", tags = "11")] - pub has_query_string: ::core::option::Option, - #[prost(oneof = "request::HasUrl", tags = "12")] - pub has_url: ::core::option::Option, -} -/// Nested message and enum types in `Request`. -pub mod request { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasApiTarget { - #[prost(string, tag = "1")] - ApiTarget(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasBodySize { - #[prost(uint64, tag = "2")] - BodySize(u64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasCookies { - #[prost(message, tag = "3")] - Cookies(::prost_types::Value), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasEnv { - #[prost(message, tag = "5")] - Env(::prost_types::Value), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasFragment { - #[prost(string, tag = "6")] - Fragment(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasHeaders { - #[prost(message, tag = "7")] - Headers(::prost_types::Value), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasInferredContentType { - #[prost(string, tag = "8")] - InferredContentType(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasMethod { - #[prost(string, tag = "9")] - Method(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasProtocol { - #[prost(string, tag = "10")] - Protocol(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasQueryString { - #[prost(message, tag = "11")] - QueryString(::prost_types::Value), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasUrl { - #[prost(string, tag = "12")] - Url(::prost::alloc::string::String), - } -} -/// -/// Response interface that contains information on a HTTP response related to the event. -/// -/// The data variable should only contain the response body. It can either be -/// a dictionary (for standard HTTP responses) or a raw response body. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Responsecontext { - #[prost(message, optional, tag = "3")] - pub data: ::core::option::Option<::prost_types::Value>, - #[prost(oneof = "responsecontext::HasBodySize", tags = "1")] - pub has_body_size: ::core::option::Option, - #[prost(oneof = "responsecontext::HasCookies", tags = "2")] - pub has_cookies: ::core::option::Option, - #[prost(oneof = "responsecontext::HasHeaders", tags = "4")] - pub has_headers: ::core::option::Option, - #[prost(oneof = "responsecontext::HasInferredContentType", tags = "5")] - pub has_inferred_content_type: ::core::option::Option, - #[prost(oneof = "responsecontext::HasStatusCode", tags = "6")] - pub has_status_code: ::core::option::Option, -} -/// Nested message and enum types in `Responsecontext`. -pub mod responsecontext { - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasBodySize { - #[prost(uint64, tag = "1")] - BodySize(u64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasCookies { - #[prost(message, tag = "2")] - Cookies(::prost_types::Value), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasHeaders { - #[prost(message, tag = "4")] - Headers(::prost_types::Value), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasInferredContentType { - #[prost(string, tag = "5")] - InferredContentType(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasStatusCode { - #[prost(uint64, tag = "6")] - StatusCode(u64), - } -} -/// -/// The route in the application, set by React Native SDK. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Route { - #[prost(oneof = "route::HasName", tags = "1")] - pub has_name: ::core::option::Option, - #[prost(oneof = "route::HasParams", tags = "2")] - pub has_params: ::core::option::Option, -} -/// Nested message and enum types in `Route`. -pub mod route { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasName { - #[prost(string, tag = "1")] - Name(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasParams { - #[prost(message, tag = "2")] - Params(::prost_types::Value), - } -} -/// -/// Runtime information. -/// -/// Runtime context describes a runtime in more detail. Typically, this context is present in -/// `contexts` multiple times if multiple runtimes are involved (for instance, if you have a -/// JavaScript application running on top of JVM). -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Runtimecontext { - #[prost(oneof = "runtimecontext::HasBuild", tags = "1")] - pub has_build: ::core::option::Option, - #[prost(oneof = "runtimecontext::HasName", tags = "2")] - pub has_name: ::core::option::Option, - #[prost(oneof = "runtimecontext::HasRawDescription", tags = "3")] - pub has_raw_description: ::core::option::Option, - #[prost(oneof = "runtimecontext::HasVersion", tags = "4")] - pub has_version: ::core::option::Option, -} -/// Nested message and enum types in `Runtimecontext`. -pub mod runtimecontext { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasBuild { - #[prost(string, tag = "1")] - Build(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasName { - #[prost(string, tag = "2")] - Name(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasRawDescription { - #[prost(string, tag = "3")] - RawDescription(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasVersion { - #[prost(string, tag = "4")] - Version(::prost::alloc::string::String), - } -} -/// -/// A debug image pointing to a source map. -/// -/// Examples: -/// -/// ```json -/// { -/// "type": "sourcemap", -/// "code_file": " -/// "debug_id": "395835f4-03e0-4436-80d3-136f0749a893" -/// } -/// ``` -/// -/// *Note:** Stack frames and the correlating entries in the debug image here -/// for `code_file`/`abs_path` are not PII stripped as they need to line up -/// perfectly for source map processing. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Sourcemapdebugimage { - #[prost(string, tag = "1")] - pub code_file: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub debug_id: ::prost::alloc::string::String, - #[prost(oneof = "sourcemapdebugimage::HasDebugFile", tags = "2")] - pub has_debug_file: ::core::option::Option, -} -/// Nested message and enum types in `Sourcemapdebugimage`. -pub mod sourcemapdebugimage { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasDebugFile { - #[prost(string, tag = "2")] - DebugFile(::prost::alloc::string::String), - } -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Stacktrace { - #[prost(message, repeated, tag = "1")] - pub frames: ::prost::alloc::vec::Vec, - #[prost(map = "string, string", tag = "4")] - pub registers: - ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, - #[prost(oneof = "stacktrace::HasInstructionAddrAdjustment", tags = "2")] - pub has_instruction_addr_adjustment: - ::core::option::Option, - #[prost(oneof = "stacktrace::HasLang", tags = "3")] - pub has_lang: ::core::option::Option, - #[prost(oneof = "stacktrace::HasSnapshot", tags = "5")] - pub has_snapshot: ::core::option::Option, -} -/// Nested message and enum types in `Stacktrace`. -pub mod stacktrace { - /// - /// Required. A non-empty list of stack frames. The list is ordered from caller to callee, or - /// oldest to youngest. The last frame is the one creating the exception. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct StacktraceFrames { - #[prost(string, repeated, tag = "16")] - pub post_context: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - #[prost(string, repeated, tag = "17")] - pub pre_context: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - #[prost(oneof = "stacktrace_frames::HasAbsPath", tags = "1")] - pub has_abs_path: ::core::option::Option, - #[prost(oneof = "stacktrace_frames::HasAddrMode", tags = "2")] - pub has_addr_mode: ::core::option::Option, - #[prost(oneof = "stacktrace_frames::HasColno", tags = "3")] - pub has_colno: ::core::option::Option, - #[prost(oneof = "stacktrace_frames::HasContextLine", tags = "4")] - pub has_context_line: ::core::option::Option, - #[prost(oneof = "stacktrace_frames::HasFilename", tags = "5")] - pub has_filename: ::core::option::Option, - #[prost(oneof = "stacktrace_frames::HasFunction", tags = "6")] - pub has_function: ::core::option::Option, - #[prost(oneof = "stacktrace_frames::HasFunctionId", tags = "7")] - pub has_function_id: ::core::option::Option, - #[prost(oneof = "stacktrace_frames::HasImageAddr", tags = "8")] - pub has_image_addr: ::core::option::Option, - #[prost(oneof = "stacktrace_frames::HasInApp", tags = "9")] - pub has_in_app: ::core::option::Option, - #[prost(oneof = "stacktrace_frames::HasInstructionAddr", tags = "10")] - pub has_instruction_addr: ::core::option::Option, - #[prost(oneof = "stacktrace_frames::HasLineno", tags = "11")] - pub has_lineno: ::core::option::Option, - #[prost(oneof = "stacktrace_frames::HasLock", tags = "12")] - pub has_lock: ::core::option::Option, - #[prost(oneof = "stacktrace_frames::HasModule", tags = "13")] - pub has_module: ::core::option::Option, - #[prost(oneof = "stacktrace_frames::HasPackage", tags = "14")] - pub has_package: ::core::option::Option, - #[prost(oneof = "stacktrace_frames::HasPlatform", tags = "15")] - pub has_platform: ::core::option::Option, - #[prost(oneof = "stacktrace_frames::HasRawFunction", tags = "18")] - pub has_raw_function: ::core::option::Option, - #[prost(oneof = "stacktrace_frames::HasStackStart", tags = "19")] - pub has_stack_start: ::core::option::Option, - #[prost(oneof = "stacktrace_frames::HasSymbol", tags = "20")] - pub has_symbol: ::core::option::Option, - #[prost(oneof = "stacktrace_frames::HasSymbolAddr", tags = "21")] - pub has_symbol_addr: ::core::option::Option, - #[prost(oneof = "stacktrace_frames::HasVars", tags = "22")] - pub has_vars: ::core::option::Option, - } - /// Nested message and enum types in `StacktraceFrames`. - pub mod stacktrace_frames { - /// - /// A possible lock (java monitor object) held by this frame. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct StacktraceFramesLock { - #[prost(string, tag = "5")] - pub r#type: ::prost::alloc::string::String, - #[prost(oneof = "stacktrace_frames_lock::HasAddress", tags = "1")] - pub has_address: ::core::option::Option, - #[prost(oneof = "stacktrace_frames_lock::HasClassName", tags = "2")] - pub has_class_name: ::core::option::Option, - #[prost(oneof = "stacktrace_frames_lock::HasPackageName", tags = "3")] - pub has_package_name: ::core::option::Option, - #[prost(oneof = "stacktrace_frames_lock::HasThreadId", tags = "4")] - pub has_thread_id: ::core::option::Option, - } - /// Nested message and enum types in `StacktraceFramesLock`. - pub mod stacktrace_frames_lock { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasAddress { - #[prost(string, tag = "1")] - Address(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasClassName { - #[prost(string, tag = "2")] - ClassName(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasPackageName { - #[prost(string, tag = "3")] - PackageName(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasThreadId { - #[prost(message, tag = "4")] - ThreadId(::prost_types::Value), - } - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasAbsPath { - #[prost(string, tag = "1")] - AbsPath(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasAddrMode { - #[prost(string, tag = "2")] - AddrMode(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasColno { - #[prost(uint64, tag = "3")] - Colno(u64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasContextLine { - #[prost(string, tag = "4")] - ContextLine(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasFilename { - #[prost(string, tag = "5")] - Filename(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasFunction { - #[prost(string, tag = "6")] - Function(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasFunctionId { - #[prost(string, tag = "7")] - FunctionId(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasImageAddr { - #[prost(string, tag = "8")] - ImageAddr(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasInApp { - #[prost(bool, tag = "9")] - InApp(bool), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasInstructionAddr { - #[prost(string, tag = "10")] - InstructionAddr(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasLineno { - #[prost(uint64, tag = "11")] - Lineno(u64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasLock { - #[prost(message, tag = "12")] - Lock(StacktraceFramesLock), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasModule { - #[prost(string, tag = "13")] - Module(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasPackage { - #[prost(string, tag = "14")] - Package(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasPlatform { - #[prost(string, tag = "15")] - Platform(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasRawFunction { - #[prost(string, tag = "18")] - RawFunction(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasStackStart { - #[prost(bool, tag = "19")] - StackStart(bool), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasSymbol { - #[prost(string, tag = "20")] - Symbol(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasSymbolAddr { - #[prost(string, tag = "21")] - SymbolAddr(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasVars { - #[prost(message, tag = "22")] - Vars(::prost_types::Value), - } - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasInstructionAddrAdjustment { - #[prost(string, tag = "2")] - InstructionAddrAdjustment(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasLang { - #[prost(string, tag = "3")] - Lang(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasSnapshot { - #[prost(bool, tag = "5")] - Snapshot(bool), - } -} -/// -/// Holds information about the system SDK. -/// -/// This is relevant for iOS and other platforms that have a system -/// SDK. Not to be confused with the client SDK. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Systemsdkinfo { - #[prost(oneof = "systemsdkinfo::HasSdkName", tags = "1")] - pub has_sdk_name: ::core::option::Option, - #[prost(oneof = "systemsdkinfo::HasVersionMajor", tags = "2")] - pub has_version_major: ::core::option::Option, - #[prost(oneof = "systemsdkinfo::HasVersionMinor", tags = "3")] - pub has_version_minor: ::core::option::Option, - #[prost(oneof = "systemsdkinfo::HasVersionPatchlevel", tags = "4")] - pub has_version_patchlevel: ::core::option::Option, -} -/// Nested message and enum types in `Systemsdkinfo`. -pub mod systemsdkinfo { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasSdkName { - #[prost(string, tag = "1")] - SdkName(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasVersionMajor { - #[prost(uint64, tag = "2")] - VersionMajor(u64), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasVersionMinor { - #[prost(uint64, tag = "3")] - VersionMinor(u64), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasVersionPatchlevel { - #[prost(uint64, tag = "4")] - VersionPatchlevel(u64), - } -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Tagentry { - #[prost(oneof = "tagentry::HasA0", tags = "1")] - pub has_a0: ::core::option::Option, - #[prost(oneof = "tagentry::HasA1", tags = "2")] - pub has_a1: ::core::option::Option, -} -/// Nested message and enum types in `Tagentry`. -pub mod tagentry { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasA0 { - #[prost(string, tag = "1")] - A0(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasA1 { - #[prost(string, tag = "2")] - A1(::prost::alloc::string::String), - } -} -/// -/// A process thread of an event. -/// -/// The Threads Interface specifies threads that were running at the time an event happened. These threads can also contain stack traces. -/// -/// An event may contain one or more threads in an attribute named `threads`. -/// -/// The following example illustrates the threads part of the event payload and omits other attributes for simplicity. -/// -/// ```json -/// { -/// "threads": { -/// "values": [ -/// { -/// "id": "0", -/// "name": "main", -/// "crashed": true, -/// "stacktrace": {} -/// } -/// ] -/// } -/// } -/// ``` -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Thread { - #[prost(map = "string, message", tag = "3")] - pub held_locks: - ::std::collections::HashMap<::prost::alloc::string::String, thread::ThreadHeldLocks>, - #[prost(oneof = "thread::HasCrashed", tags = "1")] - pub has_crashed: ::core::option::Option, - #[prost(oneof = "thread::HasCurrent", tags = "2")] - pub has_current: ::core::option::Option, - #[prost(oneof = "thread::HasId", tags = "4")] - pub has_id: ::core::option::Option, - #[prost(oneof = "thread::HasMain", tags = "5")] - pub has_main: ::core::option::Option, - #[prost(oneof = "thread::HasName", tags = "6")] - pub has_name: ::core::option::Option, - #[prost(oneof = "thread::HasStacktrace", tags = "7")] - pub has_stacktrace: ::core::option::Option, - #[prost(oneof = "thread::HasState", tags = "8")] - pub has_state: ::core::option::Option, -} -/// Nested message and enum types in `Thread`. -pub mod thread { - /// - /// Represents a collection of locks (java monitor objects) held by a thread. - /// - /// A map of lock object addresses and their respective lock reason/details. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct ThreadHeldLocks { - #[prost(string, tag = "5")] - pub r#type: ::prost::alloc::string::String, - #[prost(oneof = "thread_held_locks::HasAddress", tags = "1")] - pub has_address: ::core::option::Option, - #[prost(oneof = "thread_held_locks::HasClassName", tags = "2")] - pub has_class_name: ::core::option::Option, - #[prost(oneof = "thread_held_locks::HasPackageName", tags = "3")] - pub has_package_name: ::core::option::Option, - #[prost(oneof = "thread_held_locks::HasThreadId", tags = "4")] - pub has_thread_id: ::core::option::Option, - } - /// Nested message and enum types in `ThreadHeldLocks`. - pub mod thread_held_locks { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasAddress { - #[prost(string, tag = "1")] - Address(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasClassName { - #[prost(string, tag = "2")] - ClassName(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasPackageName { - #[prost(string, tag = "3")] - PackageName(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasThreadId { - #[prost(message, tag = "4")] - ThreadId(::prost_types::Value), - } - } - /// - /// Stack trace containing frames of this exception. - /// - /// The thread that crashed with an exception should not have a stack trace, but instead, the `thread_id` attribute should be set on the exception and Sentry will connect the two. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct ThreadStacktrace { - #[prost(message, repeated, tag = "1")] - pub frames: ::prost::alloc::vec::Vec, - #[prost(map = "string, string", tag = "4")] - pub registers: ::std::collections::HashMap< - ::prost::alloc::string::String, - ::prost::alloc::string::String, - >, - #[prost(oneof = "thread_stacktrace::HasInstructionAddrAdjustment", tags = "2")] - pub has_instruction_addr_adjustment: - ::core::option::Option, - #[prost(oneof = "thread_stacktrace::HasLang", tags = "3")] - pub has_lang: ::core::option::Option, - #[prost(oneof = "thread_stacktrace::HasSnapshot", tags = "5")] - pub has_snapshot: ::core::option::Option, - } - /// Nested message and enum types in `ThreadStacktrace`. - pub mod thread_stacktrace { - /// - /// Required. A non-empty list of stack frames. The list is ordered from caller to callee, or - /// oldest to youngest. The last frame is the one creating the exception. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct ThreadStacktraceFrames { - #[prost(string, repeated, tag = "16")] - pub post_context: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - #[prost(string, repeated, tag = "17")] - pub pre_context: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - #[prost(oneof = "thread_stacktrace_frames::HasAbsPath", tags = "1")] - pub has_abs_path: ::core::option::Option, - #[prost(oneof = "thread_stacktrace_frames::HasAddrMode", tags = "2")] - pub has_addr_mode: ::core::option::Option, - #[prost(oneof = "thread_stacktrace_frames::HasColno", tags = "3")] - pub has_colno: ::core::option::Option, - #[prost(oneof = "thread_stacktrace_frames::HasContextLine", tags = "4")] - pub has_context_line: ::core::option::Option, - #[prost(oneof = "thread_stacktrace_frames::HasFilename", tags = "5")] - pub has_filename: ::core::option::Option, - #[prost(oneof = "thread_stacktrace_frames::HasFunction", tags = "6")] - pub has_function: ::core::option::Option, - #[prost(oneof = "thread_stacktrace_frames::HasFunctionId", tags = "7")] - pub has_function_id: ::core::option::Option, - #[prost(oneof = "thread_stacktrace_frames::HasImageAddr", tags = "8")] - pub has_image_addr: ::core::option::Option, - #[prost(oneof = "thread_stacktrace_frames::HasInApp", tags = "9")] - pub has_in_app: ::core::option::Option, - #[prost(oneof = "thread_stacktrace_frames::HasInstructionAddr", tags = "10")] - pub has_instruction_addr: - ::core::option::Option, - #[prost(oneof = "thread_stacktrace_frames::HasLineno", tags = "11")] - pub has_lineno: ::core::option::Option, - #[prost(oneof = "thread_stacktrace_frames::HasLock", tags = "12")] - pub has_lock: ::core::option::Option, - #[prost(oneof = "thread_stacktrace_frames::HasModule", tags = "13")] - pub has_module: ::core::option::Option, - #[prost(oneof = "thread_stacktrace_frames::HasPackage", tags = "14")] - pub has_package: ::core::option::Option, - #[prost(oneof = "thread_stacktrace_frames::HasPlatform", tags = "15")] - pub has_platform: ::core::option::Option, - #[prost(oneof = "thread_stacktrace_frames::HasRawFunction", tags = "18")] - pub has_raw_function: ::core::option::Option, - #[prost(oneof = "thread_stacktrace_frames::HasStackStart", tags = "19")] - pub has_stack_start: ::core::option::Option, - #[prost(oneof = "thread_stacktrace_frames::HasSymbol", tags = "20")] - pub has_symbol: ::core::option::Option, - #[prost(oneof = "thread_stacktrace_frames::HasSymbolAddr", tags = "21")] - pub has_symbol_addr: ::core::option::Option, - #[prost(oneof = "thread_stacktrace_frames::HasVars", tags = "22")] - pub has_vars: ::core::option::Option, - } - /// Nested message and enum types in `ThreadStacktraceFrames`. - pub mod thread_stacktrace_frames { - /// - /// A possible lock (java monitor object) held by this frame. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct ThreadStacktraceFramesLock { - #[prost(string, tag = "5")] - pub r#type: ::prost::alloc::string::String, - #[prost(oneof = "thread_stacktrace_frames_lock::HasAddress", tags = "1")] - pub has_address: ::core::option::Option, - #[prost(oneof = "thread_stacktrace_frames_lock::HasClassName", tags = "2")] - pub has_class_name: - ::core::option::Option, - #[prost(oneof = "thread_stacktrace_frames_lock::HasPackageName", tags = "3")] - pub has_package_name: - ::core::option::Option, - #[prost(oneof = "thread_stacktrace_frames_lock::HasThreadId", tags = "4")] - pub has_thread_id: - ::core::option::Option, - } - /// Nested message and enum types in `ThreadStacktraceFramesLock`. - pub mod thread_stacktrace_frames_lock { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasAddress { - #[prost(string, tag = "1")] - Address(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasClassName { - #[prost(string, tag = "2")] - ClassName(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasPackageName { - #[prost(string, tag = "3")] - PackageName(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasThreadId { - #[prost(message, tag = "4")] - ThreadId(::prost_types::Value), - } - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasAbsPath { - #[prost(string, tag = "1")] - AbsPath(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasAddrMode { - #[prost(string, tag = "2")] - AddrMode(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasColno { - #[prost(uint64, tag = "3")] - Colno(u64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasContextLine { - #[prost(string, tag = "4")] - ContextLine(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasFilename { - #[prost(string, tag = "5")] - Filename(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasFunction { - #[prost(string, tag = "6")] - Function(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasFunctionId { - #[prost(string, tag = "7")] - FunctionId(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasImageAddr { - #[prost(string, tag = "8")] - ImageAddr(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasInApp { - #[prost(bool, tag = "9")] - InApp(bool), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasInstructionAddr { - #[prost(string, tag = "10")] - InstructionAddr(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasLineno { - #[prost(uint64, tag = "11")] - Lineno(u64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasLock { - #[prost(message, tag = "12")] - Lock(ThreadStacktraceFramesLock), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasModule { - #[prost(string, tag = "13")] - Module(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasPackage { - #[prost(string, tag = "14")] - Package(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasPlatform { - #[prost(string, tag = "15")] - Platform(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasRawFunction { - #[prost(string, tag = "18")] - RawFunction(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasStackStart { - #[prost(bool, tag = "19")] - StackStart(bool), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasSymbol { - #[prost(string, tag = "20")] - Symbol(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasSymbolAddr { - #[prost(string, tag = "21")] - SymbolAddr(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasVars { - #[prost(message, tag = "22")] - Vars(::prost_types::Value), - } - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasInstructionAddrAdjustment { - #[prost(string, tag = "2")] - InstructionAddrAdjustment(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasLang { - #[prost(string, tag = "3")] - Lang(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasSnapshot { - #[prost(bool, tag = "5")] - Snapshot(bool), - } - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasCrashed { - #[prost(bool, tag = "1")] - Crashed(bool), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasCurrent { - #[prost(bool, tag = "2")] - Current(bool), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasId { - #[prost(message, tag = "4")] - Id(::prost_types::Value), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasMain { - #[prost(bool, tag = "5")] - Main(bool), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasName { - #[prost(string, tag = "6")] - Name(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasStacktrace { - #[prost(message, tag = "7")] - Stacktrace(ThreadStacktrace), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasState { - #[prost(string, tag = "8")] - State(::prost::alloc::string::String), - } -} -/// -/// Trace context -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Tracecontext { - #[prost(string, tag = "8")] - pub span_id: ::prost::alloc::string::String, - #[prost(string, tag = "10")] - pub trace_id: ::prost::alloc::string::String, - #[prost(oneof = "tracecontext::HasClientSampleRate", tags = "1")] - pub has_client_sample_rate: ::core::option::Option, - #[prost(oneof = "tracecontext::HasData", tags = "2")] - pub has_data: ::core::option::Option, - #[prost(oneof = "tracecontext::HasExclusiveTime", tags = "3")] - pub has_exclusive_time: ::core::option::Option, - #[prost(oneof = "tracecontext::HasOp", tags = "4")] - pub has_op: ::core::option::Option, - #[prost(oneof = "tracecontext::HasOrigin", tags = "5")] - pub has_origin: ::core::option::Option, - #[prost(oneof = "tracecontext::HasParentSpanId", tags = "6")] - pub has_parent_span_id: ::core::option::Option, - #[prost(oneof = "tracecontext::HasSampled", tags = "7")] - pub has_sampled: ::core::option::Option, - #[prost(oneof = "tracecontext::HasStatus", tags = "9")] - pub has_status: ::core::option::Option, -} -/// Nested message and enum types in `Tracecontext`. -pub mod tracecontext { - /// - /// Arbitrary additional data on a trace. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct TracecontextData { - #[prost(oneof = "tracecontext_data::HasPreviousRoute", tags = "1")] - pub has_previous_route: ::core::option::Option, - #[prost(oneof = "tracecontext_data::HasRoute", tags = "2")] - pub has_route: ::core::option::Option, - } - /// Nested message and enum types in `TracecontextData`. - pub mod tracecontext_data { - /// - /// The previous route in the application - /// - /// Set by React Native SDK. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct TracecontextDataPreviousroute { - #[prost(oneof = "tracecontext_data_previousroute::HasName", tags = "1")] - pub has_name: ::core::option::Option, - #[prost(oneof = "tracecontext_data_previousroute::HasParams", tags = "2")] - pub has_params: ::core::option::Option, - } - /// Nested message and enum types in `TracecontextDataPreviousroute`. - pub mod tracecontext_data_previousroute { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasName { - #[prost(string, tag = "1")] - Name(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasParams { - #[prost(message, tag = "2")] - Params(::prost_types::Value), - } - } - /// - /// The current route in the application. - /// - /// Set by React Native SDK. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct TracecontextDataRoute { - #[prost(oneof = "tracecontext_data_route::HasName", tags = "1")] - pub has_name: ::core::option::Option, - #[prost(oneof = "tracecontext_data_route::HasParams", tags = "2")] - pub has_params: ::core::option::Option, - } - /// Nested message and enum types in `TracecontextDataRoute`. - pub mod tracecontext_data_route { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasName { - #[prost(string, tag = "1")] - Name(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasParams { - #[prost(message, tag = "2")] - Params(::prost_types::Value), - } - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasPreviousRoute { - #[prost(message, tag = "1")] - PreviousRoute(TracecontextDataPreviousroute), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasRoute { - #[prost(message, tag = "2")] - Route(TracecontextDataRoute), - } - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasClientSampleRate { - #[prost(double, tag = "1")] - ClientSampleRate(f64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasData { - #[prost(message, tag = "2")] - Data(TracecontextData), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasExclusiveTime { - #[prost(double, tag = "3")] - ExclusiveTime(f64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasOp { - #[prost(string, tag = "4")] - Op(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasOrigin { - #[prost(string, tag = "5")] - Origin(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasParentSpanId { - #[prost(string, tag = "6")] - ParentSpanId(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasSampled { - #[prost(bool, tag = "7")] - Sampled(bool), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasStatus { - #[prost(string, tag = "9")] - Status(::prost::alloc::string::String), - } -} -/// -/// Additional information about the name of the transaction. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Transactioninfo { - #[prost(message, repeated, tag = "1")] - pub changes: ::prost::alloc::vec::Vec, - #[prost(oneof = "transactioninfo::HasOriginal", tags = "2")] - pub has_original: ::core::option::Option, - #[prost(oneof = "transactioninfo::HasPropagations", tags = "3")] - pub has_propagations: ::core::option::Option, - #[prost(oneof = "transactioninfo::HasSource", tags = "4")] - pub has_source: ::core::option::Option, -} -/// Nested message and enum types in `Transactioninfo`. -pub mod transactioninfo { - /// - /// A list of changes prior to the final transaction name. - /// - /// This list must be empty if the transaction name is set at the beginning of the transaction - /// and never changed. There is no placeholder entry for the initial transaction name. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct TransactioninfoChanges { - #[prost(oneof = "transactioninfo_changes::HasPropagations", tags = "1")] - pub has_propagations: ::core::option::Option, - #[prost(oneof = "transactioninfo_changes::HasSource", tags = "2")] - pub has_source: ::core::option::Option, - #[prost(oneof = "transactioninfo_changes::HasTimestamp", tags = "3")] - pub has_timestamp: ::core::option::Option, - } - /// Nested message and enum types in `TransactioninfoChanges`. - pub mod transactioninfo_changes { - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasPropagations { - #[prost(uint64, tag = "1")] - Propagations(u64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasSource { - #[prost(string, tag = "2")] - Source(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasTimestamp { - #[prost(message, tag = "3")] - Timestamp(::prost_types::Value), - } - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasOriginal { - #[prost(string, tag = "2")] - Original(::prost::alloc::string::String), - } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasPropagations { - #[prost(uint64, tag = "3")] - Propagations(u64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasSource { - #[prost(string, tag = "4")] - Source(::prost::alloc::string::String), - } -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Transactionnamechange { - #[prost(oneof = "transactionnamechange::HasPropagations", tags = "1")] - pub has_propagations: ::core::option::Option, - #[prost(oneof = "transactionnamechange::HasSource", tags = "2")] - pub has_source: ::core::option::Option, - #[prost(oneof = "transactionnamechange::HasTimestamp", tags = "3")] - pub has_timestamp: ::core::option::Option, -} -/// Nested message and enum types in `Transactionnamechange`. -pub mod transactionnamechange { - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum HasPropagations { - #[prost(uint64, tag = "1")] - Propagations(u64), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasSource { - #[prost(string, tag = "2")] - Source(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasTimestamp { - #[prost(message, tag = "3")] - Timestamp(::prost_types::Value), - } -} -/// -/// Information about the user who triggered an event. -/// -/// ```json -/// { -/// "user": { -/// "id": "unique_id", -/// "username": "my_user", -/// "email": "foo@example.com", -/// "ip_address": "127.0.0.1", -/// "subscription": "basic" -/// } -/// } -/// ``` -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct User { - #[prost(oneof = "user::HasData", tags = "1")] - pub has_data: ::core::option::Option, - #[prost(oneof = "user::HasEmail", tags = "2")] - pub has_email: ::core::option::Option, - #[prost(oneof = "user::HasGeo", tags = "3")] - pub has_geo: ::core::option::Option, - #[prost(oneof = "user::HasId", tags = "4")] - pub has_id: ::core::option::Option, - #[prost(oneof = "user::HasIpAddress", tags = "5")] - pub has_ip_address: ::core::option::Option, - #[prost(oneof = "user::HasName", tags = "6")] - pub has_name: ::core::option::Option, - #[prost(oneof = "user::HasSegment", tags = "7")] - pub has_segment: ::core::option::Option, - #[prost(oneof = "user::HasSentryUser", tags = "8")] - pub has_sentry_user: ::core::option::Option, - #[prost(oneof = "user::HasUsername", tags = "9")] - pub has_username: ::core::option::Option, -} -/// Nested message and enum types in `User`. -pub mod user { - /// - /// Approximate geographical location of the end user or device. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct UserGeo { - #[prost(oneof = "user_geo::HasCity", tags = "1")] - pub has_city: ::core::option::Option, - #[prost(oneof = "user_geo::HasCountryCode", tags = "2")] - pub has_country_code: ::core::option::Option, - #[prost(oneof = "user_geo::HasRegion", tags = "3")] - pub has_region: ::core::option::Option, - #[prost(oneof = "user_geo::HasSubdivision", tags = "4")] - pub has_subdivision: ::core::option::Option, - } - /// Nested message and enum types in `UserGeo`. - pub mod user_geo { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasCity { - #[prost(string, tag = "1")] - City(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasCountryCode { - #[prost(string, tag = "2")] - CountryCode(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasRegion { - #[prost(string, tag = "3")] - Region(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasSubdivision { - #[prost(string, tag = "4")] - Subdivision(::prost::alloc::string::String), - } - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasData { - #[prost(message, tag = "1")] - Data(::prost_types::Value), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasEmail { - #[prost(string, tag = "2")] - Email(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasGeo { - #[prost(message, tag = "3")] - Geo(UserGeo), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasId { - #[prost(string, tag = "4")] - Id(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasIpAddress { - #[prost(string, tag = "5")] - IpAddress(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasName { - #[prost(string, tag = "6")] - Name(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasSegment { - #[prost(string, tag = "7")] - Segment(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasSentryUser { - #[prost(string, tag = "8")] - SentryUser(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasUsername { - #[prost(string, tag = "9")] - Username(::prost::alloc::string::String), - } -} -/// -/// Feedback context. -/// -/// This contexts contains user feedback specific attributes. -/// We don't PII scrub contact_email as that is provided by the user. -/// TODO(jferg): rename to FeedbackContext once old UserReport logic is deprecated. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Userreportv2Context { - #[prost(oneof = "userreportv2_context::HasContactEmail", tags = "1")] - pub has_contact_email: ::core::option::Option, - #[prost(oneof = "userreportv2_context::HasMessage", tags = "2")] - pub has_message: ::core::option::Option, -} -/// Nested message and enum types in `Userreportv2Context`. -pub mod userreportv2_context { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasContactEmail { - #[prost(string, tag = "1")] - ContactEmail(::prost::alloc::string::String), - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum HasMessage { - #[prost(string, tag = "2")] - Message(::prost::alloc::string::String), - } -} diff --git a/sentry_protos/src/sentry_protos.seer.v1.rs b/sentry_protos/src/sentry_protos.seer.v1.rs deleted file mode 100644 index b4c191751c1..00000000000 --- a/sentry_protos/src/sentry_protos.seer.v1.rs +++ /dev/null @@ -1,309 +0,0 @@ -// This file is @generated by prost-build. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SentryEventData { - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - #[prost(message, repeated, tag = "2")] - pub entries: ::prost::alloc::vec::Vec<::prost_types::Value>, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct IssueDetails { - #[prost(uint64, tag = "1")] - pub id: u64, - #[prost(string, tag = "2")] - pub title: ::prost::alloc::string::String, - /// optional - #[prost(string, tag = "3")] - pub short_id: ::prost::alloc::string::String, - #[prost(message, repeated, tag = "4")] - pub events: ::prost::alloc::vec::Vec, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SummarizeRequest { - #[prost(uint64, tag = "1")] - pub group_id: u64, - #[prost(uint64, tag = "2")] - pub organization_id: u64, - #[prost(string, tag = "3")] - pub organization_slug: ::prost::alloc::string::String, - #[prost(uint64, tag = "4")] - pub project_id: u64, - #[prost(message, repeated, tag = "5")] - pub connected_issues: ::prost::alloc::vec::Vec, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SummarizeResponse { - #[prost(uint64, tag = "1")] - pub group_id: u64, - #[prost(string, tag = "2")] - pub headline: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub summary: ::prost::alloc::string::String, - #[prost(string, tag = "4")] - pub impact: ::prost::alloc::string::String, -} -/// Generated client implementations. -pub mod issue_summary_service_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; - use tonic::codegen::*; - #[derive(Debug, Clone)] - pub struct IssueSummaryServiceClient { - inner: tonic::client::Grpc, - } - impl IssueSummaryServiceClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: TryInto, - D::Error: Into, - { - let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; - Ok(Self::new(conn)) - } - } - impl IssueSummaryServiceClient - where - T: tonic::client::GrpcService, - T::Error: Into, - T::ResponseBody: Body + std::marker::Send + 'static, - ::Error: Into + std::marker::Send, - { - pub fn new(inner: T) -> Self { - let inner = tonic::client::Grpc::new(inner); - Self { inner } - } - pub fn with_origin(inner: T, origin: Uri) -> Self { - let inner = tonic::client::Grpc::with_origin(inner, origin); - Self { inner } - } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> IssueSummaryServiceClient> - where - F: tonic::service::Interceptor, - T::ResponseBody: Default, - T: tonic::codegen::Service< - http::Request, - Response = http::Response< - >::ResponseBody, - >, - >, - >>::Error: - Into + std::marker::Send + std::marker::Sync, - { - IssueSummaryServiceClient::new(InterceptedService::new(inner, interceptor)) - } - /// Compress requests with the given encoding. - /// - /// This requires the server to support it otherwise it might respond with an - /// error. - #[must_use] - pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.send_compressed(encoding); - self - } - /// Enable decompressing responses. - #[must_use] - pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.accept_compressed(encoding); - self - } - /// Limits the maximum size of a decoded message. - /// - /// Default: `4MB` - #[must_use] - pub fn max_decoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_decoding_message_size(limit); - self - } - /// Limits the maximum size of an encoded message. - /// - /// Default: `usize::MAX` - #[must_use] - pub fn max_encoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_encoding_message_size(limit); - self - } - pub async fn summarize( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/sentry_protos.seer.v1.IssueSummaryService/Summarize", - ); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "sentry_protos.seer.v1.IssueSummaryService", - "Summarize", - )); - self.inner.unary(req, path, codec).await - } - } -} -/// Generated server implementations. -pub mod issue_summary_service_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - /// Generated trait containing gRPC methods that should be implemented for use with IssueSummaryServiceServer. - #[async_trait] - pub trait IssueSummaryService: std::marker::Send + std::marker::Sync + 'static { - async fn summarize( - &self, - request: tonic::Request, - ) -> std::result::Result, tonic::Status>; - } - #[derive(Debug)] - pub struct IssueSummaryServiceServer { - inner: Arc, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - max_decoding_message_size: Option, - max_encoding_message_size: Option, - } - impl IssueSummaryServiceServer { - pub fn new(inner: T) -> Self { - Self::from_arc(Arc::new(inner)) - } - pub fn from_arc(inner: Arc) -> Self { - Self { - inner, - accept_compression_encodings: Default::default(), - send_compression_encodings: Default::default(), - max_decoding_message_size: None, - max_encoding_message_size: None, - } - } - pub fn with_interceptor(inner: T, interceptor: F) -> InterceptedService - where - F: tonic::service::Interceptor, - { - InterceptedService::new(Self::new(inner), interceptor) - } - /// Enable decompressing requests with the given encoding. - #[must_use] - pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.accept_compression_encodings.enable(encoding); - self - } - /// Compress responses with the given encoding, if the client supports it. - #[must_use] - pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.send_compression_encodings.enable(encoding); - self - } - /// Limits the maximum size of a decoded message. - /// - /// Default: `4MB` - #[must_use] - pub fn max_decoding_message_size(mut self, limit: usize) -> Self { - self.max_decoding_message_size = Some(limit); - self - } - /// Limits the maximum size of an encoded message. - /// - /// Default: `usize::MAX` - #[must_use] - pub fn max_encoding_message_size(mut self, limit: usize) -> Self { - self.max_encoding_message_size = Some(limit); - self - } - } - impl tonic::codegen::Service> for IssueSummaryServiceServer - where - T: IssueSummaryService, - B: Body + std::marker::Send + 'static, - B::Error: Into + std::marker::Send + 'static, - { - type Response = http::Response; - type Error = std::convert::Infallible; - type Future = BoxFuture; - fn poll_ready( - &mut self, - _cx: &mut Context<'_>, - ) -> Poll> { - Poll::Ready(Ok(())) - } - fn call(&mut self, req: http::Request) -> Self::Future { - match req.uri().path() { - "/sentry_protos.seer.v1.IssueSummaryService/Summarize" => { - #[allow(non_camel_case_types)] - struct SummarizeSvc(pub Arc); - impl - tonic::server::UnaryService for SummarizeSvc - { - type Response = super::SummarizeResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::summarize(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let method = SummarizeSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - _ => Box::pin(async move { - Ok(http::Response::builder() - .status(200) - .header("grpc-status", tonic::Code::Unimplemented as i32) - .header( - http::header::CONTENT_TYPE, - tonic::metadata::GRPC_CONTENT_TYPE, - ) - .body(empty_body()) - .unwrap()) - }), - } - } - } - impl Clone for IssueSummaryServiceServer { - fn clone(&self) -> Self { - let inner = self.inner.clone(); - Self { - inner, - accept_compression_encodings: self.accept_compression_encodings, - send_compression_encodings: self.send_compression_encodings, - max_decoding_message_size: self.max_decoding_message_size, - max_encoding_message_size: self.max_encoding_message_size, - } - } - } - /// Generated gRPC service name - pub const SERVICE_NAME: &str = "sentry_protos.seer.v1.IssueSummaryService"; - impl tonic::server::NamedService for IssueSummaryServiceServer { - const NAME: &'static str = SERVICE_NAME; - } -} diff --git a/sentry_protos/src/sentry_protos.sentry.v1.rs b/sentry_protos/src/sentry_protos.sentry.v1.rs deleted file mode 100644 index 5f925d36341..00000000000 --- a/sentry_protos/src/sentry_protos.sentry.v1.rs +++ /dev/null @@ -1,521 +0,0 @@ -// This file is @generated by prost-build. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct RetryState { - /// Current attempt number - #[prost(int32, tag = "1")] - pub attempts: i32, - /// The classname or adapter type for the retry policy - #[prost(string, tag = "2")] - pub kind: ::prost::alloc::string::String, - /// After this attempt the task should be discarded - #[prost(int32, optional, tag = "3")] - pub discard_after_attempt: ::core::option::Option, - /// After this attempt the task should be put in the dead-letter-queue. - #[prost(int32, optional, tag = "4")] - pub deadletter_after_attempt: ::core::option::Option, - /// Whether a task should be executed at most once. - #[prost(bool, optional, tag = "5")] - pub at_most_once: ::core::option::Option, -} -/// Task message that is stored in Kafka. -/// Once consumed, TaskActivations are wrapped with InflightActivation to track -/// additional state -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TaskActivation { - /// A GUID for the task. Used to update tasks - #[prost(string, tag = "1")] - pub id: ::prost::alloc::string::String, - /// The task namespace - #[prost(string, tag = "2")] - pub namespace: ::prost::alloc::string::String, - /// The name of the task. This name is resolved within the worker - #[prost(string, tag = "3")] - pub taskname: ::prost::alloc::string::String, - /// An opaque parameter collection. Could be JSON or protobuf encoded - #[prost(string, tag = "4")] - pub parameters: ::prost::alloc::string::String, - /// A map of headers for the task. - #[prost(map = "string, string", tag = "5")] - pub headers: - ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, - /// The timestamp a task was stored in Kafka - #[prost(message, optional, tag = "6")] - pub received_at: ::core::option::Option<::prost_types::Timestamp>, - /// Unused. Use expires instead. - #[deprecated] - #[prost(message, optional, tag = "7")] - pub deadline: ::core::option::Option<::prost_types::Timestamp>, - /// Retry state - #[prost(message, optional, tag = "8")] - pub retry_state: ::core::option::Option, - /// The duration in seconds that a worker has to complete task execution. - /// When an activation is moved from pending -> processing a result is expected - /// in this many seconds. - #[prost(uint64, tag = "9")] - pub processing_deadline_duration: u64, - /// The duration in seconds that a task has to start execution. - /// After received_at + expires has passed an activation is expired and will not be executed. - #[prost(uint64, optional, tag = "10")] - pub expires: ::core::option::Option, - /// The duration in seconds that a task must wait to begin execution after it is emitted. - /// After received_at + delay has passed, the activation will become pending. - #[prost(uint64, optional, tag = "11")] - pub delay: ::core::option::Option, -} -/// Once a TaskActivation has been received by the task consumer it is wrapped -/// with InflightActivation so that processing state can be tracked. -/// This proto might not be used as InflightActivations don't need to cross -/// process boundaries. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct InflightActivation { - /// The TaskActivation being tracked. - #[prost(message, optional, tag = "1")] - pub activation: ::core::option::Option, - /// The current status - #[prost(enumeration = "TaskActivationStatus", tag = "2")] - pub status: i32, - /// The original offset that the WorkerTask message had - /// Used to find contiguous blocks of completed tasks so that offsets - /// can be commit to Kafka - #[prost(int64, tag = "3")] - pub offset: i64, - /// The timestamp this task was added to PendingTask storage - #[prost(message, optional, tag = "4")] - pub added_at: ::core::option::Option<::prost_types::Timestamp>, - /// The timestamp that this task expires and should be deadlettered. - #[prost(message, optional, tag = "5")] - pub deadletter_at: ::core::option::Option<::prost_types::Timestamp>, - /// The timestamp that processing is expected to be complete by. - /// If processing is not complete by this time, a retry will be attempted. - #[prost(message, optional, tag = "6")] - pub processing_deadline: ::core::option::Option<::prost_types::Timestamp>, -} -/// ////////////////////////// -/// RPC messages and services -/// ////////////////////////// -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Error { - /// Taken directly from the grpc docs. - #[prost(int32, tag = "1")] - pub code: i32, - #[prost(string, tag = "2")] - pub message: ::prost::alloc::string::String, - /// A list of messages that carry any error details. - #[prost(message, repeated, tag = "3")] - pub details: ::prost::alloc::vec::Vec<::prost_types::Any>, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetTaskRequest { - #[prost(string, optional, tag = "1")] - pub namespace: ::core::option::Option<::prost::alloc::string::String>, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetTaskResponse { - /// If there are no tasks available, these will be empty - #[prost(message, optional, tag = "1")] - pub task: ::core::option::Option, - #[prost(message, optional, tag = "3")] - pub error: ::core::option::Option, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct FetchNextTask { - #[prost(string, optional, tag = "1")] - pub namespace: ::core::option::Option<::prost::alloc::string::String>, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SetTaskStatusRequest { - #[prost(string, tag = "1")] - pub id: ::prost::alloc::string::String, - #[prost(enumeration = "TaskActivationStatus", tag = "3")] - pub status: i32, - /// If fetch_next is provided, receive a new task in the response - #[deprecated] - #[prost(bool, optional, tag = "4")] - pub fetch_next: ::core::option::Option, - #[deprecated] - #[prost(string, optional, tag = "5")] - pub fetch_next_namespace: ::core::option::Option<::prost::alloc::string::String>, - #[prost(message, optional, tag = "6")] - pub fetch_next_task: ::core::option::Option, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SetTaskStatusResponse { - /// The next task the worker should execute. Requires fetch_next to be set on the request. - #[prost(message, optional, tag = "1")] - pub task: ::core::option::Option, - #[prost(message, optional, tag = "3")] - pub error: ::core::option::Option, -} -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum TaskActivationStatus { - Unspecified = 0, - Pending = 1, - Processing = 2, - Failure = 3, - Retry = 4, - Complete = 5, -} -impl TaskActivationStatus { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - TaskActivationStatus::Unspecified => "TASK_ACTIVATION_STATUS_UNSPECIFIED", - TaskActivationStatus::Pending => "TASK_ACTIVATION_STATUS_PENDING", - TaskActivationStatus::Processing => "TASK_ACTIVATION_STATUS_PROCESSING", - TaskActivationStatus::Failure => "TASK_ACTIVATION_STATUS_FAILURE", - TaskActivationStatus::Retry => "TASK_ACTIVATION_STATUS_RETRY", - TaskActivationStatus::Complete => "TASK_ACTIVATION_STATUS_COMPLETE", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "TASK_ACTIVATION_STATUS_UNSPECIFIED" => Some(Self::Unspecified), - "TASK_ACTIVATION_STATUS_PENDING" => Some(Self::Pending), - "TASK_ACTIVATION_STATUS_PROCESSING" => Some(Self::Processing), - "TASK_ACTIVATION_STATUS_FAILURE" => Some(Self::Failure), - "TASK_ACTIVATION_STATUS_RETRY" => Some(Self::Retry), - "TASK_ACTIVATION_STATUS_COMPLETE" => Some(Self::Complete), - _ => None, - } - } -} -/// Generated client implementations. -pub mod consumer_service_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; - use tonic::codegen::*; - #[derive(Debug, Clone)] - pub struct ConsumerServiceClient { - inner: tonic::client::Grpc, - } - impl ConsumerServiceClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: TryInto, - D::Error: Into, - { - let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; - Ok(Self::new(conn)) - } - } - impl ConsumerServiceClient - where - T: tonic::client::GrpcService, - T::Error: Into, - T::ResponseBody: Body + std::marker::Send + 'static, - ::Error: Into + std::marker::Send, - { - pub fn new(inner: T) -> Self { - let inner = tonic::client::Grpc::new(inner); - Self { inner } - } - pub fn with_origin(inner: T, origin: Uri) -> Self { - let inner = tonic::client::Grpc::with_origin(inner, origin); - Self { inner } - } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> ConsumerServiceClient> - where - F: tonic::service::Interceptor, - T::ResponseBody: Default, - T: tonic::codegen::Service< - http::Request, - Response = http::Response< - >::ResponseBody, - >, - >, - >>::Error: - Into + std::marker::Send + std::marker::Sync, - { - ConsumerServiceClient::new(InterceptedService::new(inner, interceptor)) - } - /// Compress requests with the given encoding. - /// - /// This requires the server to support it otherwise it might respond with an - /// error. - #[must_use] - pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.send_compressed(encoding); - self - } - /// Enable decompressing responses. - #[must_use] - pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.accept_compressed(encoding); - self - } - /// Limits the maximum size of a decoded message. - /// - /// Default: `4MB` - #[must_use] - pub fn max_decoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_decoding_message_size(limit); - self - } - /// Limits the maximum size of an encoded message. - /// - /// Default: `usize::MAX` - #[must_use] - pub fn max_encoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_encoding_message_size(limit); - self - } - /// Fetch a new task activation to process. - pub async fn get_task( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/sentry_protos.sentry.v1.ConsumerService/GetTask", - ); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "sentry_protos.sentry.v1.ConsumerService", - "GetTask", - )); - self.inner.unary(req, path, codec).await - } - /// Update the state of a task with execution results. - pub async fn set_task_status( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/sentry_protos.sentry.v1.ConsumerService/SetTaskStatus", - ); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "sentry_protos.sentry.v1.ConsumerService", - "SetTaskStatus", - )); - self.inner.unary(req, path, codec).await - } - } -} -/// Generated server implementations. -pub mod consumer_service_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - /// Generated trait containing gRPC methods that should be implemented for use with ConsumerServiceServer. - #[async_trait] - pub trait ConsumerService: std::marker::Send + std::marker::Sync + 'static { - /// Fetch a new task activation to process. - async fn get_task( - &self, - request: tonic::Request, - ) -> std::result::Result, tonic::Status>; - /// Update the state of a task with execution results. - async fn set_task_status( - &self, - request: tonic::Request, - ) -> std::result::Result, tonic::Status>; - } - #[derive(Debug)] - pub struct ConsumerServiceServer { - inner: Arc, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - max_decoding_message_size: Option, - max_encoding_message_size: Option, - } - impl ConsumerServiceServer { - pub fn new(inner: T) -> Self { - Self::from_arc(Arc::new(inner)) - } - pub fn from_arc(inner: Arc) -> Self { - Self { - inner, - accept_compression_encodings: Default::default(), - send_compression_encodings: Default::default(), - max_decoding_message_size: None, - max_encoding_message_size: None, - } - } - pub fn with_interceptor(inner: T, interceptor: F) -> InterceptedService - where - F: tonic::service::Interceptor, - { - InterceptedService::new(Self::new(inner), interceptor) - } - /// Enable decompressing requests with the given encoding. - #[must_use] - pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.accept_compression_encodings.enable(encoding); - self - } - /// Compress responses with the given encoding, if the client supports it. - #[must_use] - pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.send_compression_encodings.enable(encoding); - self - } - /// Limits the maximum size of a decoded message. - /// - /// Default: `4MB` - #[must_use] - pub fn max_decoding_message_size(mut self, limit: usize) -> Self { - self.max_decoding_message_size = Some(limit); - self - } - /// Limits the maximum size of an encoded message. - /// - /// Default: `usize::MAX` - #[must_use] - pub fn max_encoding_message_size(mut self, limit: usize) -> Self { - self.max_encoding_message_size = Some(limit); - self - } - } - impl tonic::codegen::Service> for ConsumerServiceServer - where - T: ConsumerService, - B: Body + std::marker::Send + 'static, - B::Error: Into + std::marker::Send + 'static, - { - type Response = http::Response; - type Error = std::convert::Infallible; - type Future = BoxFuture; - fn poll_ready( - &mut self, - _cx: &mut Context<'_>, - ) -> Poll> { - Poll::Ready(Ok(())) - } - fn call(&mut self, req: http::Request) -> Self::Future { - match req.uri().path() { - "/sentry_protos.sentry.v1.ConsumerService/GetTask" => { - #[allow(non_camel_case_types)] - struct GetTaskSvc(pub Arc); - impl tonic::server::UnaryService for GetTaskSvc { - type Response = super::GetTaskResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::get_task(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let method = GetTaskSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/sentry_protos.sentry.v1.ConsumerService/SetTaskStatus" => { - #[allow(non_camel_case_types)] - struct SetTaskStatusSvc(pub Arc); - impl - tonic::server::UnaryService - for SetTaskStatusSvc - { - type Response = super::SetTaskStatusResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::set_task_status(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let method = SetTaskStatusSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - _ => Box::pin(async move { - Ok(http::Response::builder() - .status(200) - .header("grpc-status", tonic::Code::Unimplemented as i32) - .header( - http::header::CONTENT_TYPE, - tonic::metadata::GRPC_CONTENT_TYPE, - ) - .body(empty_body()) - .unwrap()) - }), - } - } - } - impl Clone for ConsumerServiceServer { - fn clone(&self) -> Self { - let inner = self.inner.clone(); - Self { - inner, - accept_compression_encodings: self.accept_compression_encodings, - send_compression_encodings: self.send_compression_encodings, - max_decoding_message_size: self.max_decoding_message_size, - max_encoding_message_size: self.max_encoding_message_size, - } - } - } - /// Generated gRPC service name - pub const SERVICE_NAME: &str = "sentry_protos.sentry.v1.ConsumerService"; - impl tonic::server::NamedService for ConsumerServiceServer { - const NAME: &'static str = SERVICE_NAME; - } -} diff --git a/sentry_protos/src/sentry_protos.snuba.v1.rs b/sentry_protos/src/sentry_protos.snuba.v1.rs deleted file mode 100644 index 1891230ac21..00000000000 --- a/sentry_protos/src/sentry_protos.snuba.v1.rs +++ /dev/null @@ -1,1822 +0,0 @@ -// This file is @generated by prost-build. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct AttributeKey { - #[prost(enumeration = "attribute_key::Type", tag = "1")] - pub r#type: i32, - /// the name of the trace item attribute, everything that sentry sends by default is prefixed with - /// `sentry.` to allow users to send attributes of the same name. - /// Exampe: `sentry.duration`, `sentry.span_id` etc - #[prost(string, tag = "2")] - pub name: ::prost::alloc::string::String, -} -/// Nested message and enum types in `AttributeKey`. -pub mod attribute_key { - /// this mostly reflects what types are able to be ingested, see eap_spans consumer for ingest details - #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] - #[repr(i32)] - pub enum Type { - /// protobuf requirement, do not send this - Unspecified = 0, - String = 1, - Boolean = 2, - /// deprecated, use TYPE_DOUBLE instead - Float = 3, - /// note: all numbers are stored as float64, so massive integers can be rounded. USE STRING FOR IDS. - Int = 4, - Double = 5, - } - impl Type { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - Type::Unspecified => "TYPE_UNSPECIFIED", - Type::String => "TYPE_STRING", - Type::Boolean => "TYPE_BOOLEAN", - Type::Float => "TYPE_FLOAT", - Type::Int => "TYPE_INT", - Type::Double => "TYPE_DOUBLE", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "TYPE_UNSPECIFIED" => Some(Self::Unspecified), - "TYPE_STRING" => Some(Self::String), - "TYPE_BOOLEAN" => Some(Self::Boolean), - "TYPE_FLOAT" => Some(Self::Float), - "TYPE_INT" => Some(Self::Int), - "TYPE_DOUBLE" => Some(Self::Double), - _ => None, - } - } - } -} -/// custom mappings of column values -/// -/// for example, `project_name` is changeable by the user and not stored in EAP, -/// but sorting by it may be desired. So something like this might be done: -/// -/// ORDER BY sentry.project_name -/// VirtualColumnContext( -/// from_column_name="sentry.project_id", -/// to_column_name="sentry.project_name", -/// value_map={"1": "sentry", "2": "snuba"}, -/// ) -/// -/// in this example `sentry.project_name` is a virtual column created by mapping -/// values from the real column `sentry.project_id` to new values. project_id of 1 -/// gets mapped to project_name="sentry" etc. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct VirtualColumnContext { - #[prost(string, tag = "1")] - pub from_column_name: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub to_column_name: ::prost::alloc::string::String, - #[prost(map = "string, string", tag = "3")] - pub value_map: - ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, - #[prost(string, tag = "4")] - pub default_value: ::prost::alloc::string::String, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct StrArray { - #[prost(string, repeated, tag = "1")] - pub values: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct IntArray { - #[prost(int64, repeated, tag = "1")] - pub values: ::prost::alloc::vec::Vec, -} -/// DEPRECATED, use DoubleArray instead -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct FloatArray { - #[prost(float, repeated, tag = "1")] - pub values: ::prost::alloc::vec::Vec, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DoubleArray { - #[prost(double, repeated, tag = "1")] - pub values: ::prost::alloc::vec::Vec, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct AttributeValue { - /// true if the value is null - #[prost(bool, tag = "11")] - pub is_null: bool, - #[prost( - oneof = "attribute_value::Value", - tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10" - )] - pub value: ::core::option::Option, -} -/// Nested message and enum types in `AttributeValue`. -pub mod attribute_value { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum Value { - #[prost(bool, tag = "1")] - ValBool(bool), - #[prost(string, tag = "2")] - ValStr(::prost::alloc::string::String), - /// deprecated, use val_double instead - #[prost(float, tag = "3")] - ValFloat(f32), - #[prost(int64, tag = "4")] - ValInt(i64), - /// set to true if value is null - #[prost(bool, tag = "5")] - ValNull(bool), - #[prost(message, tag = "6")] - ValStrArray(super::StrArray), - #[prost(message, tag = "7")] - ValIntArray(super::IntArray), - /// deprecated, use val_double_array instead - #[prost(message, tag = "8")] - ValFloatArray(super::FloatArray), - #[prost(double, tag = "9")] - ValDouble(f64), - #[prost(message, tag = "10")] - ValDoubleArray(super::DoubleArray), - } -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct AttributeAggregation { - #[prost(enumeration = "Function", tag = "1")] - pub aggregate: i32, - #[prost(message, optional, tag = "2")] - pub key: ::core::option::Option, - #[prost(string, tag = "3")] - pub label: ::prost::alloc::string::String, - #[prost(enumeration = "ExtrapolationMode", tag = "4")] - pub extrapolation_mode: i32, -} -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum Function { - Unspecified = 0, - Sum = 1, - Average = 2, - Count = 3, - P50 = 4, - P75 = 12, - P90 = 5, - P95 = 6, - P99 = 7, - Avg = 8, - Max = 9, - Min = 10, - Uniq = 11, -} -impl Function { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - Function::Unspecified => "FUNCTION_UNSPECIFIED", - Function::Sum => "FUNCTION_SUM", - Function::Average => "FUNCTION_AVERAGE", - Function::Count => "FUNCTION_COUNT", - Function::P50 => "FUNCTION_P50", - Function::P75 => "FUNCTION_P75", - Function::P90 => "FUNCTION_P90", - Function::P95 => "FUNCTION_P95", - Function::P99 => "FUNCTION_P99", - Function::Avg => "FUNCTION_AVG", - Function::Max => "FUNCTION_MAX", - Function::Min => "FUNCTION_MIN", - Function::Uniq => "FUNCTION_UNIQ", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "FUNCTION_UNSPECIFIED" => Some(Self::Unspecified), - "FUNCTION_SUM" => Some(Self::Sum), - "FUNCTION_AVERAGE" => Some(Self::Average), - "FUNCTION_COUNT" => Some(Self::Count), - "FUNCTION_P50" => Some(Self::P50), - "FUNCTION_P75" => Some(Self::P75), - "FUNCTION_P90" => Some(Self::P90), - "FUNCTION_P95" => Some(Self::P95), - "FUNCTION_P99" => Some(Self::P99), - "FUNCTION_AVG" => Some(Self::Avg), - "FUNCTION_MAX" => Some(Self::Max), - "FUNCTION_MIN" => Some(Self::Min), - "FUNCTION_UNIQ" => Some(Self::Uniq), - _ => None, - } - } -} -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum ExtrapolationMode { - Unspecified = 0, - None = 1, - SampleWeighted = 2, -} -impl ExtrapolationMode { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - ExtrapolationMode::Unspecified => "EXTRAPOLATION_MODE_UNSPECIFIED", - ExtrapolationMode::None => "EXTRAPOLATION_MODE_NONE", - ExtrapolationMode::SampleWeighted => "EXTRAPOLATION_MODE_SAMPLE_WEIGHTED", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "EXTRAPOLATION_MODE_UNSPECIFIED" => Some(Self::Unspecified), - "EXTRAPOLATION_MODE_NONE" => Some(Self::None), - "EXTRAPOLATION_MODE_SAMPLE_WEIGHTED" => Some(Self::SampleWeighted), - _ => None, - } - } -} -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum Reliability { - Unspecified = 0, - Low = 1, - High = 2, -} -impl Reliability { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - Reliability::Unspecified => "RELIABILITY_UNSPECIFIED", - Reliability::Low => "RELIABILITY_LOW", - Reliability::High => "RELIABILITY_HIGH", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "RELIABILITY_UNSPECIFIED" => Some(Self::Unspecified), - "RELIABILITY_LOW" => Some(Self::Low), - "RELIABILITY_HIGH" => Some(Self::High), - _ => None, - } - } -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct AndFilter { - #[prost(message, repeated, tag = "1")] - pub filters: ::prost::alloc::vec::Vec, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct OrFilter { - #[prost(message, repeated, tag = "1")] - pub filters: ::prost::alloc::vec::Vec, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct NotFilter { - #[prost(message, repeated, tag = "1")] - pub filters: ::prost::alloc::vec::Vec, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ComparisonFilter { - #[prost(message, optional, tag = "1")] - pub key: ::core::option::Option, - #[prost(enumeration = "comparison_filter::Op", tag = "2")] - pub op: i32, - #[prost(message, optional, tag = "3")] - pub value: ::core::option::Option, - /// optional, if set will ignore case for string comparisons - #[prost(bool, tag = "4")] - pub ignore_case: bool, -} -/// Nested message and enum types in `ComparisonFilter`. -pub mod comparison_filter { - #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] - #[repr(i32)] - pub enum Op { - Unspecified = 0, - LessThan = 1, - GreaterThan = 2, - LessThanOrEquals = 3, - GreaterThanOrEquals = 4, - Equals = 5, - NotEquals = 6, - /// string only - Like = 7, - /// string only - NotLike = 8, - /// array only - In = 9, - /// array only - NotIn = 10, - } - impl Op { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - Op::Unspecified => "OP_UNSPECIFIED", - Op::LessThan => "OP_LESS_THAN", - Op::GreaterThan => "OP_GREATER_THAN", - Op::LessThanOrEquals => "OP_LESS_THAN_OR_EQUALS", - Op::GreaterThanOrEquals => "OP_GREATER_THAN_OR_EQUALS", - Op::Equals => "OP_EQUALS", - Op::NotEquals => "OP_NOT_EQUALS", - Op::Like => "OP_LIKE", - Op::NotLike => "OP_NOT_LIKE", - Op::In => "OP_IN", - Op::NotIn => "OP_NOT_IN", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "OP_UNSPECIFIED" => Some(Self::Unspecified), - "OP_LESS_THAN" => Some(Self::LessThan), - "OP_GREATER_THAN" => Some(Self::GreaterThan), - "OP_LESS_THAN_OR_EQUALS" => Some(Self::LessThanOrEquals), - "OP_GREATER_THAN_OR_EQUALS" => Some(Self::GreaterThanOrEquals), - "OP_EQUALS" => Some(Self::Equals), - "OP_NOT_EQUALS" => Some(Self::NotEquals), - "OP_LIKE" => Some(Self::Like), - "OP_NOT_LIKE" => Some(Self::NotLike), - "OP_IN" => Some(Self::In), - "OP_NOT_IN" => Some(Self::NotIn), - _ => None, - } - } - } -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ExistsFilter { - #[prost(message, optional, tag = "1")] - pub key: ::core::option::Option, -} -/// a condition used to filter for matching "trace items" -/// -/// ex: "exists span.duration" would mean -/// "only give me trace items that have the attribute 'span.duration'" -/// -/// ( traces contain trace items, -/// eg. trace items are: span, replay, error, etc, -/// trace items contain attributes like 'span.duration' ) -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TraceItemFilter { - #[prost(oneof = "trace_item_filter::Value", tags = "1, 2, 3, 4, 5")] - pub value: ::core::option::Option, -} -/// Nested message and enum types in `TraceItemFilter`. -pub mod trace_item_filter { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum Value { - #[prost(message, tag = "1")] - AndFilter(super::AndFilter), - #[prost(message, tag = "2")] - OrFilter(super::OrFilter), - #[prost(message, tag = "3")] - NotFilter(super::NotFilter), - #[prost(message, tag = "4")] - ComparisonFilter(super::ComparisonFilter), - #[prost(message, tag = "5")] - ExistsFilter(super::ExistsFilter), - } -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct AttributeConditionalAggregation { - #[prost(enumeration = "Function", tag = "1")] - pub aggregate: i32, - #[prost(message, optional, tag = "2")] - pub key: ::core::option::Option, - #[prost(string, tag = "3")] - pub label: ::prost::alloc::string::String, - #[prost(enumeration = "ExtrapolationMode", tag = "4")] - pub extrapolation_mode: i32, - #[prost(message, optional, tag = "5")] - pub filter: ::core::option::Option, -} -#[derive(Clone, Copy, PartialEq, ::prost::Message)] -pub struct DownsampledStorageConfig { - #[prost(enumeration = "downsampled_storage_config::Mode", tag = "1")] - pub mode: i32, -} -/// Nested message and enum types in `DownsampledStorageConfig`. -pub mod downsampled_storage_config { - #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] - #[repr(i32)] - pub enum Mode { - Unspecified = 0, - /// deprecated, treated as NORMAL mode - Preflight = 1, - /// deprecated, treated as NORMAL mode - BestEffort = 2, - /// NORMAL queries are served faster and should not time out - /// EAP will route to whatever tier it needs to in order to facilitate this - /// The return payload from EAP will inform the client if there is a higher fidelity tier to scan - Normal = 3, - /// HIGHEST_ACCURACY queries go straight to tier 1 - HighestAccuracy = 4, - } - impl Mode { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - Mode::Unspecified => "MODE_UNSPECIFIED", - Mode::Preflight => "MODE_PREFLIGHT", - Mode::BestEffort => "MODE_BEST_EFFORT", - Mode::Normal => "MODE_NORMAL", - Mode::HighestAccuracy => "MODE_HIGHEST_ACCURACY", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "MODE_UNSPECIFIED" => Some(Self::Unspecified), - "MODE_PREFLIGHT" => Some(Self::Preflight), - "MODE_BEST_EFFORT" => Some(Self::BestEffort), - "MODE_NORMAL" => Some(Self::Normal), - "MODE_HIGHEST_ACCURACY" => Some(Self::HighestAccuracy), - _ => None, - } - } - } -} -#[derive(Clone, Copy, PartialEq, ::prost::Message)] -pub struct DownsampledStorageMeta { - /// deprecated, only use can_go_to_higher_accuracy_tier - #[prost(enumeration = "downsampled_storage_meta::SelectedTier", tag = "1")] - pub tier: i32, - /// how many rows did the estimator think this query would scan - /// 0 means the estimator was not run - /// deprecated, only use can_go_to_higher_accuracy_tier - #[prost(uint64, tag = "2")] - pub estimated_num_rows: u64, - /// if there exists a higher accuracy tier that this query could route to - /// note that if this query goes to a higher accuracy tier, it could potentially time out - #[prost(bool, tag = "3")] - pub can_go_to_higher_accuracy_tier: bool, -} -/// Nested message and enum types in `DownsampledStorageMeta`. -pub mod downsampled_storage_meta { - #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] - #[repr(i32)] - pub enum SelectedTier { - Unspecified = 0, - SelectedTier1 = 1, - SelectedTier8 = 2, - SelectedTier64 = 3, - SelectedTier512 = 4, - } - impl SelectedTier { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - SelectedTier::Unspecified => "SELECTED_TIER_UNSPECIFIED", - SelectedTier::SelectedTier1 => "SELECTED_TIER_1", - SelectedTier::SelectedTier8 => "SELECTED_TIER_8", - SelectedTier::SelectedTier64 => "SELECTED_TIER_64", - SelectedTier::SelectedTier512 => "SELECTED_TIER_512", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "SELECTED_TIER_UNSPECIFIED" => Some(Self::Unspecified), - "SELECTED_TIER_1" => Some(Self::SelectedTier1), - "SELECTED_TIER_8" => Some(Self::SelectedTier8), - "SELECTED_TIER_64" => Some(Self::SelectedTier64), - "SELECTED_TIER_512" => Some(Self::SelectedTier512), - _ => None, - } - } - } -} -#[derive(Clone, Copy, PartialEq, ::prost::Message)] -pub struct Literal { - #[prost(oneof = "literal::Value", tags = "1")] - pub value: ::core::option::Option, -} -/// Nested message and enum types in `Literal`. -pub mod literal { - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum Value { - #[prost(double, tag = "1")] - ValDouble(f64), - } -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct RequestMeta { - /// id of the organization we are querying data for - #[prost(uint64, tag = "1")] - pub organization_id: u64, - /// used for logging and metrics, ex: "snuba_admin", "eap", "replays", etc - #[prost(string, tag = "2")] - pub cogs_category: ::prost::alloc::string::String, - /// identifier for where the request is coming from - /// ex: "api.profiling.landing-chart", "api.replay.details-page" - #[prost(string, tag = "3")] - pub referrer: ::prost::alloc::string::String, - /// ids of the projects we are querying data for - #[prost(uint64, repeated, tag = "4")] - pub project_ids: ::prost::alloc::vec::Vec, - /// start timestamp we want to query data for - #[prost(message, optional, tag = "5")] - pub start_timestamp: ::core::option::Option<::prost_types::Timestamp>, - /// end timestamp we want to query data for - #[prost(message, optional, tag = "6")] - pub end_timestamp: ::core::option::Option<::prost_types::Timestamp>, - /// DEPRECATED (not implemented) - use trace_item_type instead - #[deprecated] - #[prost(enumeration = "TraceItemName", tag = "7")] - pub trace_item_name: i32, - /// the type of the trace item you are querying - #[prost(enumeration = "TraceItemType", tag = "8")] - pub trace_item_type: i32, - /// whether to include debug information in the response - #[prost(bool, tag = "10")] - pub debug: bool, - /// a unique identifier for the request, user doesnt need to set this - #[prost(string, tag = "11")] - pub request_id: ::prost::alloc::string::String, - /// how to query the downsampled storages - #[prost(message, optional, tag = "12")] - pub downsampled_storage_config: ::core::option::Option, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ResponseMeta { - /// id of the request that this response relates to - #[prost(string, tag = "1")] - pub request_id: ::prost::alloc::string::String, - /// Optional field that is included only if debug is true - #[prost(message, repeated, tag = "2")] - pub query_info: ::prost::alloc::vec::Vec, - /// metadata of how the query interacted wit the downsampled storages - #[prost(message, optional, tag = "3")] - pub downsampled_storage_meta: ::core::option::Option, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct PageToken { - #[prost(oneof = "page_token::Value", tags = "1, 2")] - pub value: ::core::option::Option, -} -/// Nested message and enum types in `PageToken`. -pub mod page_token { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum Value { - /// standard limit/offset pagination - #[prost(uint64, tag = "1")] - Offset(u64), - /// Instead of using offset (which requires all the scanning and ordering), - /// the server sends back a filter clause to be added on to the filter conditions - /// which skips the previous results altogether, avoiding extra scanning and sorting - #[prost(message, tag = "2")] - FilterOffset(super::TraceItemFilter), - } -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryStats { - #[prost(int64, tag = "1")] - pub rows_read: i64, - #[prost(int64, tag = "2")] - pub columns_read: i64, - #[prost(int32, tag = "4")] - pub blocks: i32, - #[prost(int64, tag = "5")] - pub progress_bytes: i64, - #[prost(int32, tag = "8")] - pub max_threads: i32, - #[prost(message, optional, tag = "11")] - pub timing_marks: ::core::option::Option, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryMetadata { - #[prost(string, tag = "1")] - pub sql: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub status: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub clickhouse_table: ::prost::alloc::string::String, - #[prost(bool, tag = "4")] - pub r#final: bool, - #[prost(string, tag = "6")] - pub query_id: ::prost::alloc::string::String, - #[prost(bool, tag = "7")] - pub consistent: bool, - #[prost(bool, tag = "9")] - pub cache_hit: bool, - #[prost(string, tag = "10")] - pub cluster_name: ::prost::alloc::string::String, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TimingMarks { - #[prost(int64, tag = "1")] - pub duration_ms: i64, - #[prost(map = "string, int64", tag = "2")] - pub marks_ms: ::std::collections::HashMap<::prost::alloc::string::String, i64>, - #[prost(map = "string, string", tag = "3")] - pub tags: - ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, - #[prost(int64, tag = "4")] - pub timestamp: i64, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryInfo { - #[prost(message, optional, tag = "1")] - pub stats: ::core::option::Option, - #[prost(message, optional, tag = "2")] - pub metadata: ::core::option::Option, - #[prost(string, tag = "3")] - pub trace_logs: ::prost::alloc::string::String, -} -/// DEPRECATED: use TraceItemType instead -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum TraceItemName { - Unspecified = 0, - EapSpans = 1, - EapErrors = 2, -} -impl TraceItemName { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - TraceItemName::Unspecified => "TRACE_ITEM_NAME_UNSPECIFIED", - TraceItemName::EapSpans => "TRACE_ITEM_NAME_EAP_SPANS", - TraceItemName::EapErrors => "TRACE_ITEM_NAME_EAP_ERRORS", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "TRACE_ITEM_NAME_UNSPECIFIED" => Some(Self::Unspecified), - "TRACE_ITEM_NAME_EAP_SPANS" => Some(Self::EapSpans), - "TRACE_ITEM_NAME_EAP_ERRORS" => Some(Self::EapErrors), - _ => None, - } - } -} -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum TraceItemType { - Unspecified = 0, - Span = 1, - Error = 2, - Log = 3, - UptimeCheck = 4, -} -impl TraceItemType { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - TraceItemType::Unspecified => "TRACE_ITEM_TYPE_UNSPECIFIED", - TraceItemType::Span => "TRACE_ITEM_TYPE_SPAN", - TraceItemType::Error => "TRACE_ITEM_TYPE_ERROR", - TraceItemType::Log => "TRACE_ITEM_TYPE_LOG", - TraceItemType::UptimeCheck => "TRACE_ITEM_TYPE_UPTIME_CHECK", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "TRACE_ITEM_TYPE_UNSPECIFIED" => Some(Self::Unspecified), - "TRACE_ITEM_TYPE_SPAN" => Some(Self::Span), - "TRACE_ITEM_TYPE_ERROR" => Some(Self::Error), - "TRACE_ITEM_TYPE_LOG" => Some(Self::Log), - "TRACE_ITEM_TYPE_UPTIME_CHECK" => Some(Self::UptimeCheck), - _ => None, - } - } -} -/// This is a request to the TimeSeries endpoint, -/// it is used to do a timeseries aggregation of a given attribute -/// across traces. -/// -/// ex: avg(span.duration) group by db.system -/// this (conceptually) will return a 2d graph where y-axis is avg(span.duration), -/// x-axis is time, and there is a separate line/function on the graph for each db.system value -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TimeSeriesRequest { - /// metadata about the request - /// used to filter time range, organization, project, etc. - #[prost(message, optional, tag = "1")] - pub meta: ::core::option::Option, - /// filters out spans (TraceItems) that dont meet the criteria - /// ex: avg(span.duration) where span.environment = 'production' - #[prost(message, optional, tag = "2")] - pub filter: ::core::option::Option, - /// deprecated, please use expressions instead - #[deprecated] - #[prost(message, repeated, tag = "3")] - pub aggregations: ::prost::alloc::vec::Vec, - /// the actual aggregation to compute ex: avg(span.duration) or avg(span.duration) / sum(span.duration) - #[prost(message, repeated, tag = "6")] - pub expressions: ::prost::alloc::vec::Vec, - /// the level of detail in the timeseries graph, - /// low granularity is very detailed, high is less detail. - /// ex: if granularity is 1s you will have a data point every 1s, - /// if its 1m you have a data point every 1m - /// tip: for performance, if the query is is over a large time period you should - /// have high granularity - #[prost(uint64, tag = "4")] - pub granularity_secs: u64, - /// attribute key to group by - /// ex: span.environment might give 3 timeseries lines, - /// one for prod, one for dev etc - #[prost(message, repeated, tag = "5")] - pub group_by: ::prost::alloc::vec::Vec, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Expression { - #[prost(string, tag = "3")] - pub label: ::prost::alloc::string::String, - #[prost(oneof = "expression::Expression", tags = "1, 2, 4, 5")] - pub expression: ::core::option::Option, -} -/// Nested message and enum types in `Expression`. -pub mod expression { - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct BinaryFormula { - #[prost(enumeration = "binary_formula::Op", tag = "1")] - pub op: i32, - #[prost(message, optional, boxed, tag = "2")] - pub left: ::core::option::Option<::prost::alloc::boxed::Box>, - #[prost(message, optional, boxed, tag = "3")] - pub right: ::core::option::Option<::prost::alloc::boxed::Box>, - /// optional, if the formula evalutates to null this value is returned - /// formula can evaluate to null if an attribute is missing for example - #[prost(oneof = "binary_formula::DefaultValue", tags = "4, 5")] - pub default_value: ::core::option::Option, - } - /// Nested message and enum types in `BinaryFormula`. - pub mod binary_formula { - #[derive( - Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration, - )] - #[repr(i32)] - pub enum Op { - Unspecified = 0, - Divide = 1, - Multiply = 2, - Add = 3, - Subtract = 4, - } - impl Op { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - Op::Unspecified => "OP_UNSPECIFIED", - Op::Divide => "OP_DIVIDE", - Op::Multiply => "OP_MULTIPLY", - Op::Add => "OP_ADD", - Op::Subtract => "OP_SUBTRACT", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "OP_UNSPECIFIED" => Some(Self::Unspecified), - "OP_DIVIDE" => Some(Self::Divide), - "OP_MULTIPLY" => Some(Self::Multiply), - "OP_ADD" => Some(Self::Add), - "OP_SUBTRACT" => Some(Self::Subtract), - _ => None, - } - } - } - /// optional, if the formula evalutates to null this value is returned - /// formula can evaluate to null if an attribute is missing for example - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum DefaultValue { - #[prost(double, tag = "4")] - DefaultValueDouble(f64), - #[prost(int64, tag = "5")] - DefaultValueInt64(i64), - } - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum Expression { - #[prost(message, tag = "1")] - Aggregation(super::AttributeAggregation), - #[prost(message, tag = "2")] - Formula(::prost::alloc::boxed::Box), - #[prost(message, tag = "4")] - ConditionalAggregation(super::AttributeConditionalAggregation), - #[prost(message, tag = "5")] - Literal(super::Literal), - } -} -#[derive(Clone, Copy, PartialEq, ::prost::Message)] -pub struct DataPoint { - #[prost(float, tag = "1")] - pub data: f32, - /// false if this datapoint is empty, true otherwise. - /// optional, if not set assume true. - /// used for sparse time series - #[prost(bool, tag = "2")] - pub data_present: bool, - /// only set for extrapolated data points, 0 otherwise - /// the extrapolated avg sampling rate for this data point - #[prost(float, tag = "3")] - pub avg_sampling_rate: f32, - /// deprecated - #[deprecated] - #[prost(bool, tag = "4")] - pub is_reliable: bool, - /// the reliability of the data value based on math based on confidence intervals and sample size - #[prost(enumeration = "Reliability", tag = "5")] - pub reliability: i32, - /// the sample count for this data point - #[prost(int64, tag = "6")] - pub sample_count: i64, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TimeSeries { - #[prost(string, tag = "1")] - pub label: ::prost::alloc::string::String, - /// the names and values of the attribute keys which - /// were in the group by - #[prost(map = "string, string", tag = "2")] - pub group_by_attributes: - ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, - /// time bucket for each data point in the timeseries - #[prost(message, repeated, tag = "3")] - pub buckets: ::prost::alloc::vec::Vec<::prost_types::Timestamp>, - #[prost(message, repeated, tag = "4")] - pub data_points: ::prost::alloc::vec::Vec, - /// number of events used to calculate this timeseries - #[prost(uint64, tag = "5")] - pub num_events: u64, - /// deprecated - #[deprecated] - #[prost(float, tag = "6")] - pub avg_sampling_rate: f32, -} -/// This is the response from the TimeSeries endpoint, -/// it is the counterpart of TimeSeriesRequest -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TimeSeriesResponse { - #[prost(message, repeated, tag = "1")] - pub result_timeseries: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "5")] - pub meta: ::core::option::Option, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CreateSubscriptionRequest { - #[prost(message, optional, tag = "1")] - pub time_series_request: ::core::option::Option, - #[prost(uint32, tag = "2")] - pub time_window_secs: u32, - #[prost(uint32, tag = "3")] - pub resolution_secs: u32, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CreateSubscriptionResponse { - #[prost(string, tag = "1")] - pub subscription_id: ::prost::alloc::string::String, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TracePageToken { - /// This class exists to avoid circular imports with the PageToken class - /// The next version of the proto will have a PageToken class that can be used - /// for all endpoints, and this class can be removed. - #[prost(oneof = "trace_page_token::Value", tags = "1, 2, 3")] - pub value: ::core::option::Option, -} -/// Nested message and enum types in `TracePageToken`. -pub mod trace_page_token { - /// This class exists to avoid circular imports with the PageToken class - /// The next version of the proto will have a PageToken class that can be used - /// for all endpoints, and this class can be removed. - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum Value { - #[prost(uint64, tag = "1")] - Offset(u64), - /// Instead of using offset (which requires all the scanning and ordering), - /// the server sends back a filter clause to be added on to the filter conditions - /// which skips the previous results altogether, avoiding extra scanning and sorting - #[prost(message, tag = "2")] - EventFilter(super::EventFilter), - #[prost(message, tag = "3")] - TraceFilter(super::TraceFilter), - } -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct FindTracesRequest { - #[prost(message, optional, tag = "1")] - pub meta: ::core::option::Option, - #[prost(message, optional, tag = "2")] - pub filter: ::core::option::Option, - #[prost(message, optional, tag = "3")] - pub page_token: ::core::option::Option, - #[prost(enumeration = "TraceOrderBy", tag = "4")] - pub order_by: i32, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TraceResponse { - #[prost(string, tag = "1")] - pub trace_id: ::prost::alloc::string::String, - #[prost(message, optional, tag = "5")] - pub start_timestamp: ::core::option::Option<::prost_types::Timestamp>, - #[prost(message, optional, tag = "6")] - pub end_timestamp: ::core::option::Option<::prost_types::Timestamp>, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct FindTracesResponse { - #[prost(message, repeated, tag = "1")] - pub traces: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "2")] - pub page_token: ::core::option::Option, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct EventFilter { - #[prost(enumeration = "TraceItemName", tag = "1")] - pub trace_item_name: i32, - #[prost(message, optional, tag = "2")] - pub filter: ::core::option::Option, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct AndTraceFilter { - #[prost(message, repeated, tag = "1")] - pub filters: ::prost::alloc::vec::Vec, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct OrTraceFilter { - #[prost(message, repeated, tag = "1")] - pub filters: ::prost::alloc::vec::Vec, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct NotTraceFilter { - #[prost(message, repeated, tag = "1")] - pub filters: ::prost::alloc::vec::Vec, -} -/// Represents a set of conditions for finding particular events -/// in a trace. Each EventFilter is meant to find one particular -/// type of event. Those can then be combined to find traces that -/// contain different combinations of events. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TraceFilter { - #[prost(oneof = "trace_filter::Filter", tags = "1, 2, 3, 4")] - pub filter: ::core::option::Option, -} -/// Nested message and enum types in `TraceFilter`. -pub mod trace_filter { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum Filter { - #[prost(message, tag = "1")] - AndFilter(super::AndTraceFilter), - #[prost(message, tag = "2")] - OrFilter(super::OrTraceFilter), - #[prost(message, tag = "3")] - NotFilter(super::NotTraceFilter), - #[prost(message, tag = "4")] - EventFilter(super::EventFilter), - } -} -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum TraceOrderBy { - Unspecified = 0, - EndTime = 1, - TraceDuration = 2, -} -impl TraceOrderBy { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - TraceOrderBy::Unspecified => "TRACE_ORDER_BY_UNSPECIFIED", - TraceOrderBy::EndTime => "TRACE_ORDER_BY_END_TIME", - TraceOrderBy::TraceDuration => "TRACE_ORDER_BY_TRACE_DURATION", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "TRACE_ORDER_BY_UNSPECIFIED" => Some(Self::Unspecified), - "TRACE_ORDER_BY_END_TIME" => Some(Self::EndTime), - "TRACE_ORDER_BY_TRACE_DURATION" => Some(Self::TraceDuration), - _ => None, - } - } -} -/// GetTraceRequest lets you query a trace by trace_id, returning all its items. -/// -/// Each item will return every attributes by default or you can pass a list of -/// attributes to return for each item type. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetTraceRequest { - #[prost(message, optional, tag = "1")] - pub meta: ::core::option::Option, - #[prost(string, tag = "2")] - pub trace_id: ::prost::alloc::string::String, - /// A list of items and their attributes to return in the response. - #[prost(message, repeated, tag = "3")] - pub items: ::prost::alloc::vec::Vec, -} -/// Nested message and enum types in `GetTraceRequest`. -pub mod get_trace_request { - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct TraceItem { - /// DEPRECATED: use item_type instead - #[deprecated] - #[prost(enumeration = "super::TraceItemName", tag = "1")] - pub r#type: i32, - /// If attributes is empty, all attributes will be returned for this type. - #[prost(message, repeated, tag = "2")] - pub attributes: ::prost::alloc::vec::Vec, - #[prost(enumeration = "super::TraceItemType", tag = "3")] - pub item_type: i32, - } -} -/// GetTraceResponse returns a trace and all its items. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetTraceResponse { - #[prost(string, tag = "1")] - pub trace_id: ::prost::alloc::string::String, - #[prost(message, optional, tag = "2")] - pub meta: ::core::option::Option, - #[prost(message, repeated, tag = "3")] - pub item_groups: ::prost::alloc::vec::Vec, -} -/// Nested message and enum types in `GetTraceResponse`. -pub mod get_trace_response { - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Item { - #[prost(string, tag = "1")] - pub id: ::prost::alloc::string::String, - #[prost(message, optional, tag = "2")] - pub timestamp: ::core::option::Option<::prost_types::Timestamp>, - #[prost(message, repeated, tag = "3")] - pub attributes: ::prost::alloc::vec::Vec, - } - /// Nested message and enum types in `Item`. - pub mod item { - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Attribute { - #[prost(message, optional, tag = "1")] - pub key: ::core::option::Option, - #[prost(message, optional, tag = "2")] - pub value: ::core::option::Option, - } - } - /// ItemGroup is a list of items of a specific type. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct ItemGroup { - /// DEPRECATED: use item_type instead - #[deprecated] - #[prost(enumeration = "super::TraceItemName", tag = "1")] - pub r#type: i32, - #[prost(message, repeated, tag = "2")] - pub items: ::prost::alloc::vec::Vec, - #[prost(enumeration = "super::TraceItemType", tag = "3")] - pub item_type: i32, - } -} -/// TraceAttribute represents the attribute of a trace. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TraceAttribute { - #[prost(enumeration = "trace_attribute::Key", tag = "1")] - pub key: i32, - #[prost(message, optional, tag = "2")] - pub value: ::core::option::Option, - /// AttributeKey.Type will specify the type of the attribute we return. - /// It does not need to be sent when requesting an attribute. - #[prost(enumeration = "attribute_key::Type", tag = "3")] - pub r#type: i32, -} -/// Nested message and enum types in `TraceAttribute`. -pub mod trace_attribute { - /// Key lists the available trace attribute keys you can query. - #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] - #[repr(i32)] - pub enum Key { - Unspecified = 0, - TraceId = 1, - /// KEY_START_TIMESTAMP will return the earliest timestamp seen in the trace. - StartTimestamp = 2, - /// KEY_ROOT_SPAN_NAME will return the name of the root (segment) span of - /// the trace. - RootSpanName = 3, - /// KEY_TOTAL_ITEM_COUNT will return the count of all the items in a trace, - /// regardless of the conditions applied. - TotalItemCount = 4, - /// KEY_FILTERED_ITEM_COUNT will return the count of items where the filters - /// apply. - /// For example, in a trace with 5 items (1 http.server span, 4 db spans), - /// if we query for traces with span.op == "db", this will return 4. - FilteredItemCount = 5, - /// KEY_ROOT_SPAN_DURATION_MS will return the duration of the root span in - /// milliseconds. - RootSpanDurationMs = 6, - /// KEY_ROOT_SPAN_PROJECT_ID returns the project ID associated with the root - /// span. - RootSpanProjectId = 7, - /// KEY_EARLIEST_SPAN_NAME returns the name of the earliest span of a trace, - /// regardless if it's a root span or not - EarliestSpanName = 8, - /// KEY_EARLIEST_FRONTEND_SPAN returns the name of the earliest span emitted - /// by the frontend (for example, span op being `pageload` or `navigation`). - EarliestFrontendSpan = 9, - /// KEY_END_TIMESTAMP will return the latest timestamp seen in the trace. - EndTimestamp = 10, - /// KEY_EARLIEST_SPAN_PROJECT_ID returns the project ID associated with the earliest span. - EarliestSpanProjectId = 11, - /// KEY_EARLIEST_SPAN_DURATION_MS will return the duration of the earliest span in milliseconds. - EarliestSpanDurationMs = 12, - /// KEY_EARLIEST_FRONTEND_SPAN_PROJECT_ID returns the project ID associated with the earliest frontend span. - EarliestFrontendSpanProjectId = 13, - /// KEY_EARLIEST_FRONTEND_SPAN_DURATION_MS will return the duration of the earliest frontend span in milliseconds. - EarliestFrontendSpanDurationMs = 14, - } - impl Key { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - Key::Unspecified => "KEY_UNSPECIFIED", - Key::TraceId => "KEY_TRACE_ID", - Key::StartTimestamp => "KEY_START_TIMESTAMP", - Key::RootSpanName => "KEY_ROOT_SPAN_NAME", - Key::TotalItemCount => "KEY_TOTAL_ITEM_COUNT", - Key::FilteredItemCount => "KEY_FILTERED_ITEM_COUNT", - Key::RootSpanDurationMs => "KEY_ROOT_SPAN_DURATION_MS", - Key::RootSpanProjectId => "KEY_ROOT_SPAN_PROJECT_ID", - Key::EarliestSpanName => "KEY_EARLIEST_SPAN_NAME", - Key::EarliestFrontendSpan => "KEY_EARLIEST_FRONTEND_SPAN", - Key::EndTimestamp => "KEY_END_TIMESTAMP", - Key::EarliestSpanProjectId => "KEY_EARLIEST_SPAN_PROJECT_ID", - Key::EarliestSpanDurationMs => "KEY_EARLIEST_SPAN_DURATION_MS", - Key::EarliestFrontendSpanProjectId => "KEY_EARLIEST_FRONTEND_SPAN_PROJECT_ID", - Key::EarliestFrontendSpanDurationMs => "KEY_EARLIEST_FRONTEND_SPAN_DURATION_MS", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "KEY_UNSPECIFIED" => Some(Self::Unspecified), - "KEY_TRACE_ID" => Some(Self::TraceId), - "KEY_START_TIMESTAMP" => Some(Self::StartTimestamp), - "KEY_ROOT_SPAN_NAME" => Some(Self::RootSpanName), - "KEY_TOTAL_ITEM_COUNT" => Some(Self::TotalItemCount), - "KEY_FILTERED_ITEM_COUNT" => Some(Self::FilteredItemCount), - "KEY_ROOT_SPAN_DURATION_MS" => Some(Self::RootSpanDurationMs), - "KEY_ROOT_SPAN_PROJECT_ID" => Some(Self::RootSpanProjectId), - "KEY_EARLIEST_SPAN_NAME" => Some(Self::EarliestSpanName), - "KEY_EARLIEST_FRONTEND_SPAN" => Some(Self::EarliestFrontendSpan), - "KEY_END_TIMESTAMP" => Some(Self::EndTimestamp), - "KEY_EARLIEST_SPAN_PROJECT_ID" => Some(Self::EarliestSpanProjectId), - "KEY_EARLIEST_SPAN_DURATION_MS" => Some(Self::EarliestSpanDurationMs), - "KEY_EARLIEST_FRONTEND_SPAN_PROJECT_ID" => { - Some(Self::EarliestFrontendSpanProjectId) - } - "KEY_EARLIEST_FRONTEND_SPAN_DURATION_MS" => { - Some(Self::EarliestFrontendSpanDurationMs) - } - _ => None, - } - } - } -} -/// GetTracesRequest lets you query traces with various attributes. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetTracesRequest { - #[prost(message, optional, tag = "1")] - pub meta: ::core::option::Option, - #[prost(message, optional, tag = "2")] - pub page_token: ::core::option::Option, - #[prost(uint32, tag = "3")] - pub limit: u32, - /// List of filters on items of the trace we'll use when querying. - #[prost(message, repeated, tag = "4")] - pub filters: ::prost::alloc::vec::Vec, - /// List of attributes we'd like to order by. - #[prost(message, repeated, tag = "5")] - pub order_by: ::prost::alloc::vec::Vec, - /// List of attributes we want to query. - #[prost(message, repeated, tag = "6")] - pub attributes: ::prost::alloc::vec::Vec, -} -/// Nested message and enum types in `GetTracesRequest`. -pub mod get_traces_request { - #[derive(Clone, Copy, PartialEq, ::prost::Message)] - pub struct OrderBy { - #[prost(enumeration = "super::trace_attribute::Key", tag = "1")] - pub key: i32, - #[prost(bool, tag = "2")] - pub descending: bool, - } - /// TraceFilter specifies conditions to apply on the items contained in a trace. - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct TraceFilter { - /// DEPRECATED: use item_type - #[deprecated] - #[prost(enumeration = "super::TraceItemName", tag = "1")] - pub item_name: i32, - #[prost(message, optional, tag = "2")] - pub filter: ::core::option::Option, - /// the item type we will apply the filter condition on. - #[prost(enumeration = "super::TraceItemType", tag = "3")] - pub item_type: i32, - } -} -/// GetTracesResponse contains a list of traces returned by the request. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetTracesResponse { - #[prost(message, optional, tag = "1")] - pub page_token: ::core::option::Option, - #[prost(message, optional, tag = "2")] - pub meta: ::core::option::Option, - /// List of traces matching conditions. - #[prost(message, repeated, tag = "3")] - pub traces: ::prost::alloc::vec::Vec, -} -/// Nested message and enum types in `GetTracesResponse`. -pub mod get_traces_response { - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Trace { - /// List of attributes queried. - #[prost(message, repeated, tag = "1")] - pub attributes: ::prost::alloc::vec::Vec, - } -} -/// TraceItemAttributeNamesRequest is a request to the TraceItemAttributeNames endpoint, -/// it returns the names of all queryable "TraceItemAttributes" that exist in the given projects, -/// date range, and other filters. -/// -/// TraceItem are things like: span, error, log, replay -/// TraceItemAttributes could be things like: sentry.duration,user_id cart_total, etc. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TraceItemAttributeNamesRequest { - /// metadata about the request - /// this is where you specify organization, project, time range etc. - #[prost(message, optional, tag = "1")] - pub meta: ::core::option::Option, - /// maximum number of attributes to return - #[prost(uint32, tag = "2")] - pub limit: u32, - /// offset is deprecated, please use `page_token` instead - #[deprecated] - #[prost(uint32, tag = "3")] - pub offset: u32, - /// The type of the attributes to return, must be specified, - /// only TYPE_STRING and TYPE_FLOAT are supported, anything else will return empty response - #[prost(enumeration = "attribute_key::Type", tag = "5")] - pub r#type: i32, - /// optionalfilter to only return attribute names that match the given substring - #[prost(string, tag = "6")] - pub value_substring_match: ::prost::alloc::string::String, - /// optional, used for pagination, the next page token will be returned in the response - #[prost(message, optional, tag = "7")] - pub page_token: ::core::option::Option, - /// A filter to only get relevant attribute keys - /// including this makes sure that only attribute keys are returned - /// which *intersect* with the ones specified in the filter. - /// This is a BEST-EFFORT operation. If no co-occurring keys are found within - /// 1 second, the endpoint returns without taking the intersecing attributes into account - #[prost(message, optional, tag = "8")] - pub intersecting_attributes_filter: ::core::option::Option, -} -/// TraceItemAttributeNamesResponse is the response returned by the TraceItemAttributeNames endpoint. -/// It is the counterpart to TraceItemAttributeNamesRequest. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TraceItemAttributeNamesResponse { - /// all attributes that matched the filters in the request - #[prost(message, repeated, tag = "1")] - pub attributes: ::prost::alloc::vec::Vec, - /// page token for the next page of results - #[prost(message, optional, tag = "2")] - pub page_token: ::core::option::Option, - /// metadata about the response - #[prost(message, optional, tag = "3")] - pub meta: ::core::option::Option, -} -/// Nested message and enum types in `TraceItemAttributeNamesResponse`. -pub mod trace_item_attribute_names_response { - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Attribute { - #[prost(string, tag = "1")] - pub name: ::prost::alloc::string::String, - #[prost(enumeration = "super::attribute_key::Type", tag = "2")] - pub r#type: i32, - } -} -/// TraceItemAttributeValuesRequest is a request to the TraceItemAttributeValues endpoint, -/// it returns the set of all possible values for the given attribute key, across the given -/// organization, project_id, timerange etc (specified in meta). -/// -/// This endpoint only supports string values, it does not make sense -/// to get all the possible values of a numerical attribute -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TraceItemAttributeValuesRequest { - /// metadata about the request - /// this is where you specify organization, project, time range etc. - #[prost(message, optional, tag = "1")] - pub meta: ::core::option::Option, - /// attribute you want the values of - #[prost(message, optional, tag = "2")] - pub key: ::core::option::Option, - /// deprecated, please use the `key` field instead - #[deprecated] - #[prost(string, tag = "3")] - pub name: ::prost::alloc::string::String, - /// a substring of the value being searched for, - /// only values matching this substring will be returned. - /// only strict substring supported, no regex - #[prost(string, tag = "4")] - pub value_substring_match: ::prost::alloc::string::String, - /// max number of values to return - #[prost(uint32, tag = "5")] - pub limit: u32, - /// optional, used for pagination, the next page token will be returned in the response - #[prost(message, optional, tag = "6")] - pub page_token: ::core::option::Option, -} -/// TraceItemAttributeValuesResponse is a response from the TraceItemAttributeValues endpoint -/// it is the counterpart to TraceItemAttributesRequest -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TraceItemAttributeValuesResponse { - /// all the values that matched the criteria specified in the request - #[prost(string, repeated, tag = "1")] - pub values: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// page token for the next page of results - #[prost(message, optional, tag = "6")] - pub page_token: ::core::option::Option, - /// metadata about the response - #[prost(message, optional, tag = "7")] - pub meta: ::core::option::Option, -} -/// This is a request to the TraceItemDetails endpoint, -/// it is used to query for TraceItems (ex. spans or logs) -/// it returns all of the information for a specific trace item. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TraceItemDetailsRequest { - #[prost(message, optional, tag = "1")] - pub meta: ::core::option::Option, - /// required: the ID (hex string) of the item you are looking for - #[prost(string, tag = "2")] - pub item_id: ::prost::alloc::string::String, - /// required: the trace ID of the item. - #[prost(string, tag = "4")] - pub trace_id: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub filter: ::core::option::Option, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TraceItemDetailsAttribute { - #[prost(string, tag = "1")] - pub name: ::prost::alloc::string::String, - #[prost(message, optional, tag = "2")] - pub value: ::core::option::Option, -} -/// this is a response from the TraceItemDetails endpoint -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TraceItemDetailsResponse { - #[prost(string, tag = "1")] - pub item_id: ::prost::alloc::string::String, - #[prost(message, optional, tag = "2")] - pub timestamp: ::core::option::Option<::prost_types::Timestamp>, - #[prost(message, repeated, tag = "3")] - pub attributes: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "4")] - pub meta: ::core::option::Option, -} -#[derive(Clone, Copy, PartialEq, ::prost::Message)] -pub struct AttributeDistributionsRequest { - /// max_buckets and limit wouldn't apply to other stats types (like totals) - #[prost(uint32, tag = "1")] - pub max_buckets: u32, - #[prost(uint32, tag = "2")] - pub max_attributes: u32, -} -#[derive(Clone, Copy, PartialEq, ::prost::Message)] -pub struct StatsType { - #[prost(oneof = "stats_type::Type", tags = "1")] - pub r#type: ::core::option::Option, -} -/// Nested message and enum types in `StatsType`. -pub mod stats_type { - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum Type { - #[prost(message, tag = "1")] - AttributeDistributions(super::AttributeDistributionsRequest), - } -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TraceItemStatsRequest { - #[prost(message, optional, tag = "1")] - pub meta: ::core::option::Option, - /// same filter applies to all stats types requested - #[prost(message, optional, tag = "2")] - pub filter: ::core::option::Option, - #[prost(message, repeated, tag = "3")] - pub stats_types: ::prost::alloc::vec::Vec, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct AttributeDistribution { - #[prost(string, tag = "1")] - pub attribute_name: ::prost::alloc::string::String, - #[prost(message, repeated, tag = "2")] - pub buckets: ::prost::alloc::vec::Vec, -} -/// Nested message and enum types in `AttributeDistribution`. -pub mod attribute_distribution { - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Bucket { - #[prost(string, tag = "1")] - pub label: ::prost::alloc::string::String, - #[prost(float, tag = "2")] - pub value: f32, - } -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct AttributeDistributions { - #[prost(message, repeated, tag = "1")] - pub attributes: ::prost::alloc::vec::Vec, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TraceItemStatsResult { - #[prost(oneof = "trace_item_stats_result::Result", tags = "1")] - pub result: ::core::option::Option, -} -/// Nested message and enum types in `TraceItemStatsResult`. -pub mod trace_item_stats_result { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum Result { - #[prost(message, tag = "1")] - AttributeDistributions(super::AttributeDistributions), - } -} -/// this is a response from the TraceItemStats endpoint -/// it is the counterpart to TraceItemStatsRequest -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TraceItemStatsResponse { - #[prost(message, repeated, tag = "1")] - pub results: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "2")] - pub page_token: ::core::option::Option, - #[prost(message, optional, tag = "3")] - pub meta: ::core::option::Option, -} -/// This is a request to the TraceItemTable endpoint, -/// it is used to query for TraceItems (ex. spans) -/// it returns tabular data where each row is a TraceItem, -/// and the columns are the attributes of the TraceItem -/// it can also be used for aggregations -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TraceItemTableRequest { - #[prost(message, optional, tag = "1")] - pub meta: ::core::option::Option, - /// the columns or aggregations you want to get - #[prost(message, repeated, tag = "2")] - pub columns: ::prost::alloc::vec::Vec, - /// filter out trace items you dont want - #[prost(message, optional, tag = "3")] - pub filter: ::core::option::Option, - #[prost(message, repeated, tag = "4")] - pub order_by: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "5")] - pub group_by: ::prost::alloc::vec::Vec, - #[prost(uint32, tag = "6")] - pub limit: u32, - /// optional, used for pagination, the next page token will be returned in the response - #[prost(message, optional, tag = "7")] - pub page_token: ::core::option::Option, - #[prost(message, repeated, tag = "8")] - pub virtual_column_contexts: ::prost::alloc::vec::Vec, - /// optional, filter out results of aggregates, same as SQL HAVING - #[prost(message, optional, tag = "9")] - pub aggregation_filter: ::core::option::Option, -} -/// Nested message and enum types in `TraceItemTableRequest`. -pub mod trace_item_table_request { - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct OrderBy { - #[prost(message, optional, tag = "1")] - pub column: ::core::option::Option, - #[prost(bool, tag = "2")] - pub descending: bool, - } -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct AggregationAndFilter { - #[prost(message, repeated, tag = "1")] - pub filters: ::prost::alloc::vec::Vec, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct AggregationOrFilter { - #[prost(message, repeated, tag = "1")] - pub filters: ::prost::alloc::vec::Vec, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct AggregationComparisonFilter { - /// deprecated as columns should always be aggregated in a post aggregation filter - #[deprecated] - #[prost(message, optional, tag = "1")] - pub column: ::core::option::Option, - #[prost(enumeration = "aggregation_comparison_filter::Op", tag = "2")] - pub op: i32, - /// since only aggregated columns are supported, the value should be numeric - #[deprecated] - #[prost(message, optional, tag = "3")] - pub value: ::core::option::Option, - #[prost(double, tag = "5")] - pub val: f64, - #[prost(message, optional, tag = "4")] - pub aggregation: ::core::option::Option, - #[prost(message, optional, tag = "6")] - pub conditional_aggregation: ::core::option::Option, -} -/// Nested message and enum types in `AggregationComparisonFilter`. -pub mod aggregation_comparison_filter { - #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] - #[repr(i32)] - pub enum Op { - Unspecified = 0, - LessThan = 1, - GreaterThan = 2, - LessThanOrEquals = 3, - GreaterThanOrEquals = 4, - Equals = 5, - NotEquals = 6, - } - impl Op { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - Op::Unspecified => "OP_UNSPECIFIED", - Op::LessThan => "OP_LESS_THAN", - Op::GreaterThan => "OP_GREATER_THAN", - Op::LessThanOrEquals => "OP_LESS_THAN_OR_EQUALS", - Op::GreaterThanOrEquals => "OP_GREATER_THAN_OR_EQUALS", - Op::Equals => "OP_EQUALS", - Op::NotEquals => "OP_NOT_EQUALS", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "OP_UNSPECIFIED" => Some(Self::Unspecified), - "OP_LESS_THAN" => Some(Self::LessThan), - "OP_GREATER_THAN" => Some(Self::GreaterThan), - "OP_LESS_THAN_OR_EQUALS" => Some(Self::LessThanOrEquals), - "OP_GREATER_THAN_OR_EQUALS" => Some(Self::GreaterThanOrEquals), - "OP_EQUALS" => Some(Self::Equals), - "OP_NOT_EQUALS" => Some(Self::NotEquals), - _ => None, - } - } - } -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct AggregationFilter { - #[prost(oneof = "aggregation_filter::Value", tags = "1, 2, 3")] - pub value: ::core::option::Option, -} -/// Nested message and enum types in `AggregationFilter`. -pub mod aggregation_filter { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum Value { - #[prost(message, tag = "1")] - AndFilter(super::AggregationAndFilter), - #[prost(message, tag = "2")] - OrFilter(super::AggregationOrFilter), - #[prost(message, tag = "3")] - ComparisonFilter(super::AggregationComparisonFilter), - } -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Column { - #[prost(string, tag = "3")] - pub label: ::prost::alloc::string::String, - #[prost(oneof = "column::Column", tags = "1, 2, 5, 4, 6")] - pub column: ::core::option::Option, -} -/// Nested message and enum types in `Column`. -pub mod column { - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct BinaryFormula { - #[prost(enumeration = "binary_formula::Op", tag = "1")] - pub op: i32, - #[prost(message, optional, boxed, tag = "2")] - pub left: ::core::option::Option<::prost::alloc::boxed::Box>, - #[prost(message, optional, boxed, tag = "3")] - pub right: ::core::option::Option<::prost::alloc::boxed::Box>, - /// optional, if the formula evalutates to null this value is returned - /// formula can evaluate to null if an attribute is missing for example - #[prost(oneof = "binary_formula::DefaultValue", tags = "4, 5")] - pub default_value: ::core::option::Option, - } - /// Nested message and enum types in `BinaryFormula`. - pub mod binary_formula { - #[derive( - Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration, - )] - #[repr(i32)] - pub enum Op { - Unspecified = 0, - Divide = 1, - Multiply = 2, - Add = 3, - Subtract = 4, - } - impl Op { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - Op::Unspecified => "OP_UNSPECIFIED", - Op::Divide => "OP_DIVIDE", - Op::Multiply => "OP_MULTIPLY", - Op::Add => "OP_ADD", - Op::Subtract => "OP_SUBTRACT", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "OP_UNSPECIFIED" => Some(Self::Unspecified), - "OP_DIVIDE" => Some(Self::Divide), - "OP_MULTIPLY" => Some(Self::Multiply), - "OP_ADD" => Some(Self::Add), - "OP_SUBTRACT" => Some(Self::Subtract), - _ => None, - } - } - } - /// optional, if the formula evalutates to null this value is returned - /// formula can evaluate to null if an attribute is missing for example - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] - pub enum DefaultValue { - #[prost(double, tag = "4")] - DefaultValueDouble(f64), - #[prost(int64, tag = "5")] - DefaultValueInt64(i64), - } - } - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum Column { - #[prost(message, tag = "1")] - Key(super::AttributeKey), - #[prost(message, tag = "2")] - Aggregation(super::AttributeAggregation), - #[prost(message, tag = "5")] - ConditionalAggregation(super::AttributeConditionalAggregation), - #[prost(message, tag = "4")] - Formula(::prost::alloc::boxed::Box), - #[prost(message, tag = "6")] - Literal(super::Literal), - } -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TraceItemColumnValues { - #[prost(string, tag = "1")] - pub attribute_name: ::prost::alloc::string::String, - #[prost(message, repeated, tag = "2")] - pub results: ::prost::alloc::vec::Vec, - /// reliability of the values based on confidence interval and sample size math - #[prost(enumeration = "Reliability", repeated, tag = "3")] - pub reliabilities: ::prost::alloc::vec::Vec, -} -/// this is a response from the TraceItemTable endpoint -/// it is the counterpart to TraceItemTableRequest -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TraceItemTableResponse { - /// the rows - #[prost(message, repeated, tag = "1")] - pub column_values: ::prost::alloc::vec::Vec, - /// page token for the next page of results - #[prost(message, optional, tag = "2")] - pub page_token: ::core::option::Option, - #[prost(message, optional, tag = "3")] - pub meta: ::core::option::Option, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CreateTraceItemTableSubscriptionRequest { - #[prost(message, optional, tag = "1")] - pub table_request: ::core::option::Option, - #[prost(uint64, tag = "2")] - pub project_id: u64, - #[prost(uint32, tag = "3")] - pub time_window: u32, - #[prost(uint32, tag = "4")] - pub resolution: u32, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CreateTraceItemTableSubscriptionResponse { - #[prost(string, tag = "1")] - pub subscription_id: ::prost::alloc::string::String, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Error { - /// The HTTP status code corresponding to this error - #[prost(int32, tag = "1")] - pub code: i32, - /// The developer-facing message - #[prost(string, tag = "2")] - pub message: ::prost::alloc::string::String, - /// Additional error information - #[prost(message, repeated, tag = "3")] - pub details: ::prost::alloc::vec::Vec<::prost_types::Any>, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct AnyValue { - #[prost(oneof = "any_value::Value", tags = "1, 2, 3, 4, 5, 6, 7")] - pub value: ::core::option::Option, -} -/// Nested message and enum types in `AnyValue`. -pub mod any_value { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum Value { - #[prost(string, tag = "1")] - StringValue(::prost::alloc::string::String), - #[prost(bool, tag = "2")] - BoolValue(bool), - #[prost(int64, tag = "3")] - IntValue(i64), - #[prost(double, tag = "4")] - DoubleValue(f64), - #[prost(message, tag = "5")] - ArrayValue(super::ArrayValue), - #[prost(message, tag = "6")] - KvlistValue(super::KeyValueList), - #[prost(bytes, tag = "7")] - BytesValue(::prost::alloc::vec::Vec), - } -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ArrayValue { - #[prost(message, repeated, tag = "1")] - pub values: ::prost::alloc::vec::Vec, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct KeyValueList { - #[prost(message, repeated, tag = "1")] - pub values: ::prost::alloc::vec::Vec, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct KeyValue { - #[prost(string, tag = "1")] - pub key: ::prost::alloc::string::String, - #[prost(message, optional, tag = "2")] - pub value: ::core::option::Option, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TraceItem { - #[prost(uint64, tag = "1")] - pub organization_id: u64, - #[prost(uint64, tag = "2")] - pub project_id: u64, - #[prost(string, tag = "3")] - pub trace_id: ::prost::alloc::string::String, - /// item_id as bytes, little endian - #[prost(bytes = "vec", tag = "4")] - pub item_id: ::prost::alloc::vec::Vec, - #[prost(enumeration = "TraceItemType", tag = "5")] - pub item_type: i32, - #[prost(message, optional, tag = "6")] - pub timestamp: ::core::option::Option<::prost_types::Timestamp>, - #[prost(map = "string, message", tag = "7")] - pub attributes: ::std::collections::HashMap<::prost::alloc::string::String, AnyValue>, - #[prost(double, tag = "8")] - pub client_sample_rate: f64, - #[prost(double, tag = "9")] - pub server_sample_rate: f64, - /// Internal fields - #[prost(uint32, tag = "100")] - pub retention_days: u32, - #[prost(message, optional, tag = "101")] - pub received: ::core::option::Option<::prost_types::Timestamp>, -} diff --git a/sentry_protos/src/sentry_protos.taskbroker.v1.rs b/sentry_protos/src/sentry_protos.taskbroker.v1.rs deleted file mode 100644 index ec640b1f630..00000000000 --- a/sentry_protos/src/sentry_protos.taskbroker.v1.rs +++ /dev/null @@ -1,495 +0,0 @@ -// This file is @generated by prost-build. -#[derive(Clone, Copy, PartialEq, ::prost::Message)] -pub struct RetryState { - /// Current attempt number - #[prost(uint32, tag = "1")] - pub attempts: u32, - /// After this number of attempts, the task is either discarded or deadlettered. - #[prost(uint32, tag = "2")] - pub max_attempts: u32, - /// The action to take after the max_attempts is exceeded. - #[prost(enumeration = "OnAttemptsExceeded", tag = "3")] - pub on_attempts_exceeded: i32, - /// Whether a task should be executed at most once. - #[prost(bool, optional, tag = "4")] - pub at_most_once: ::core::option::Option, -} -/// Task message that is stored in Kafka and shared over RPC. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TaskActivation { - /// A GUID for the task. Used to update tasks - #[prost(string, tag = "1")] - pub id: ::prost::alloc::string::String, - /// The task namespace - #[prost(string, tag = "2")] - pub namespace: ::prost::alloc::string::String, - /// The name of the task. This name is resolved within the worker - #[prost(string, tag = "3")] - pub taskname: ::prost::alloc::string::String, - /// An opaque parameter collection. Could be JSON or protobuf encoded - #[prost(string, tag = "4")] - pub parameters: ::prost::alloc::string::String, - /// A map of headers for the task. - #[prost(map = "string, string", tag = "5")] - pub headers: - ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, - /// The timestamp a task was stored in Kafka - #[prost(message, optional, tag = "6")] - pub received_at: ::core::option::Option<::prost_types::Timestamp>, - /// Retry state - #[prost(message, optional, tag = "7")] - pub retry_state: ::core::option::Option, - /// The duration in seconds that a worker has to complete task execution. - /// When an activation is moved from pending -> processing a result is expected - /// in this many seconds. - #[prost(uint64, tag = "8")] - pub processing_deadline_duration: u64, - /// The duration in seconds that a task has to start execution. - /// After received_at + expires has passed an activation is expired and will not be executed. - #[prost(uint64, optional, tag = "9")] - pub expires: ::core::option::Option, - /// The duration in seconds that a task must wait to begin execution after it is emitted. - /// After received_at + delay has passed, the activation will become pending. - #[prost(uint64, optional, tag = "11")] - pub delay: ::core::option::Option, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetTaskRequest { - #[prost(string, optional, tag = "1")] - pub namespace: ::core::option::Option<::prost::alloc::string::String>, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetTaskResponse { - /// If there are no tasks available, this will be empty - #[prost(message, optional, tag = "1")] - pub task: ::core::option::Option, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct FetchNextTask { - #[prost(string, optional, tag = "1")] - pub namespace: ::core::option::Option<::prost::alloc::string::String>, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SetTaskStatusRequest { - #[prost(string, tag = "1")] - pub id: ::prost::alloc::string::String, - #[prost(enumeration = "TaskActivationStatus", tag = "2")] - pub status: i32, - /// If fetch_next is provided, receive a new task in the response - #[prost(message, optional, tag = "3")] - pub fetch_next_task: ::core::option::Option, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SetTaskStatusResponse { - /// The next task the worker should execute. Requires fetch_next to be set on the request. - #[prost(message, optional, tag = "1")] - pub task: ::core::option::Option, -} -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum OnAttemptsExceeded { - Unspecified = 0, - Discard = 1, - Deadletter = 2, -} -impl OnAttemptsExceeded { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - OnAttemptsExceeded::Unspecified => "ON_ATTEMPTS_EXCEEDED_UNSPECIFIED", - OnAttemptsExceeded::Discard => "ON_ATTEMPTS_EXCEEDED_DISCARD", - OnAttemptsExceeded::Deadletter => "ON_ATTEMPTS_EXCEEDED_DEADLETTER", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "ON_ATTEMPTS_EXCEEDED_UNSPECIFIED" => Some(Self::Unspecified), - "ON_ATTEMPTS_EXCEEDED_DISCARD" => Some(Self::Discard), - "ON_ATTEMPTS_EXCEEDED_DEADLETTER" => Some(Self::Deadletter), - _ => None, - } - } -} -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum TaskActivationStatus { - Unspecified = 0, - Pending = 1, - Processing = 2, - Failure = 3, - Retry = 4, - Complete = 5, -} -impl TaskActivationStatus { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - TaskActivationStatus::Unspecified => "TASK_ACTIVATION_STATUS_UNSPECIFIED", - TaskActivationStatus::Pending => "TASK_ACTIVATION_STATUS_PENDING", - TaskActivationStatus::Processing => "TASK_ACTIVATION_STATUS_PROCESSING", - TaskActivationStatus::Failure => "TASK_ACTIVATION_STATUS_FAILURE", - TaskActivationStatus::Retry => "TASK_ACTIVATION_STATUS_RETRY", - TaskActivationStatus::Complete => "TASK_ACTIVATION_STATUS_COMPLETE", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "TASK_ACTIVATION_STATUS_UNSPECIFIED" => Some(Self::Unspecified), - "TASK_ACTIVATION_STATUS_PENDING" => Some(Self::Pending), - "TASK_ACTIVATION_STATUS_PROCESSING" => Some(Self::Processing), - "TASK_ACTIVATION_STATUS_FAILURE" => Some(Self::Failure), - "TASK_ACTIVATION_STATUS_RETRY" => Some(Self::Retry), - "TASK_ACTIVATION_STATUS_COMPLETE" => Some(Self::Complete), - _ => None, - } - } -} -/// Generated client implementations. -pub mod consumer_service_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; - use tonic::codegen::*; - /// ////////////////////////// - /// RPC messages and services - /// ////////////////////////// - #[derive(Debug, Clone)] - pub struct ConsumerServiceClient { - inner: tonic::client::Grpc, - } - impl ConsumerServiceClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: TryInto, - D::Error: Into, - { - let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; - Ok(Self::new(conn)) - } - } - impl ConsumerServiceClient - where - T: tonic::client::GrpcService, - T::Error: Into, - T::ResponseBody: Body + std::marker::Send + 'static, - ::Error: Into + std::marker::Send, - { - pub fn new(inner: T) -> Self { - let inner = tonic::client::Grpc::new(inner); - Self { inner } - } - pub fn with_origin(inner: T, origin: Uri) -> Self { - let inner = tonic::client::Grpc::with_origin(inner, origin); - Self { inner } - } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> ConsumerServiceClient> - where - F: tonic::service::Interceptor, - T::ResponseBody: Default, - T: tonic::codegen::Service< - http::Request, - Response = http::Response< - >::ResponseBody, - >, - >, - >>::Error: - Into + std::marker::Send + std::marker::Sync, - { - ConsumerServiceClient::new(InterceptedService::new(inner, interceptor)) - } - /// Compress requests with the given encoding. - /// - /// This requires the server to support it otherwise it might respond with an - /// error. - #[must_use] - pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.send_compressed(encoding); - self - } - /// Enable decompressing responses. - #[must_use] - pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.accept_compressed(encoding); - self - } - /// Limits the maximum size of a decoded message. - /// - /// Default: `4MB` - #[must_use] - pub fn max_decoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_decoding_message_size(limit); - self - } - /// Limits the maximum size of an encoded message. - /// - /// Default: `usize::MAX` - #[must_use] - pub fn max_encoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_encoding_message_size(limit); - self - } - /// Fetch a new task activation to process. - pub async fn get_task( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/sentry_protos.taskbroker.v1.ConsumerService/GetTask", - ); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "sentry_protos.taskbroker.v1.ConsumerService", - "GetTask", - )); - self.inner.unary(req, path, codec).await - } - /// Update the state of a task with execution results. - pub async fn set_task_status( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/sentry_protos.taskbroker.v1.ConsumerService/SetTaskStatus", - ); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "sentry_protos.taskbroker.v1.ConsumerService", - "SetTaskStatus", - )); - self.inner.unary(req, path, codec).await - } - } -} -/// Generated server implementations. -pub mod consumer_service_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - /// Generated trait containing gRPC methods that should be implemented for use with ConsumerServiceServer. - #[async_trait] - pub trait ConsumerService: std::marker::Send + std::marker::Sync + 'static { - /// Fetch a new task activation to process. - async fn get_task( - &self, - request: tonic::Request, - ) -> std::result::Result, tonic::Status>; - /// Update the state of a task with execution results. - async fn set_task_status( - &self, - request: tonic::Request, - ) -> std::result::Result, tonic::Status>; - } - /// ////////////////////////// - /// RPC messages and services - /// ////////////////////////// - #[derive(Debug)] - pub struct ConsumerServiceServer { - inner: Arc, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - max_decoding_message_size: Option, - max_encoding_message_size: Option, - } - impl ConsumerServiceServer { - pub fn new(inner: T) -> Self { - Self::from_arc(Arc::new(inner)) - } - pub fn from_arc(inner: Arc) -> Self { - Self { - inner, - accept_compression_encodings: Default::default(), - send_compression_encodings: Default::default(), - max_decoding_message_size: None, - max_encoding_message_size: None, - } - } - pub fn with_interceptor(inner: T, interceptor: F) -> InterceptedService - where - F: tonic::service::Interceptor, - { - InterceptedService::new(Self::new(inner), interceptor) - } - /// Enable decompressing requests with the given encoding. - #[must_use] - pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.accept_compression_encodings.enable(encoding); - self - } - /// Compress responses with the given encoding, if the client supports it. - #[must_use] - pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.send_compression_encodings.enable(encoding); - self - } - /// Limits the maximum size of a decoded message. - /// - /// Default: `4MB` - #[must_use] - pub fn max_decoding_message_size(mut self, limit: usize) -> Self { - self.max_decoding_message_size = Some(limit); - self - } - /// Limits the maximum size of an encoded message. - /// - /// Default: `usize::MAX` - #[must_use] - pub fn max_encoding_message_size(mut self, limit: usize) -> Self { - self.max_encoding_message_size = Some(limit); - self - } - } - impl tonic::codegen::Service> for ConsumerServiceServer - where - T: ConsumerService, - B: Body + std::marker::Send + 'static, - B::Error: Into + std::marker::Send + 'static, - { - type Response = http::Response; - type Error = std::convert::Infallible; - type Future = BoxFuture; - fn poll_ready( - &mut self, - _cx: &mut Context<'_>, - ) -> Poll> { - Poll::Ready(Ok(())) - } - fn call(&mut self, req: http::Request) -> Self::Future { - match req.uri().path() { - "/sentry_protos.taskbroker.v1.ConsumerService/GetTask" => { - #[allow(non_camel_case_types)] - struct GetTaskSvc(pub Arc); - impl tonic::server::UnaryService for GetTaskSvc { - type Response = super::GetTaskResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::get_task(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let method = GetTaskSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/sentry_protos.taskbroker.v1.ConsumerService/SetTaskStatus" => { - #[allow(non_camel_case_types)] - struct SetTaskStatusSvc(pub Arc); - impl - tonic::server::UnaryService - for SetTaskStatusSvc - { - type Response = super::SetTaskStatusResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::set_task_status(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let method = SetTaskStatusSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - _ => Box::pin(async move { - Ok(http::Response::builder() - .status(200) - .header("grpc-status", tonic::Code::Unimplemented as i32) - .header( - http::header::CONTENT_TYPE, - tonic::metadata::GRPC_CONTENT_TYPE, - ) - .body(empty_body()) - .unwrap()) - }), - } - } - } - impl Clone for ConsumerServiceServer { - fn clone(&self) -> Self { - let inner = self.inner.clone(); - Self { - inner, - accept_compression_encodings: self.accept_compression_encodings, - send_compression_encodings: self.send_compression_encodings, - max_decoding_message_size: self.max_decoding_message_size, - max_encoding_message_size: self.max_encoding_message_size, - } - } - } - /// Generated gRPC service name - pub const SERVICE_NAME: &str = "sentry_protos.taskbroker.v1.ConsumerService"; - impl tonic::server::NamedService for ConsumerServiceServer { - const NAME: &'static str = SERVICE_NAME; - } -} From 8d21e2b7e884961c600f4eec6bdf2c429285741f Mon Sep 17 00:00:00 2001 From: Pierre Massat Date: Tue, 6 May 2025 16:30:04 -0400 Subject: [PATCH 10/37] Enable type_generation for sentry-kafka-schemas --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index b5a93453f68..a4dd5b8b890 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -160,7 +160,7 @@ reqwest = "0.12.9" rmp-serde = "1.3.0" sentry = "0.36.0" sentry-core = "0.36.0" -sentry-kafka-schemas = { version = "1.2.2", default-features = false } +sentry-kafka-schemas = { version = "1.2.2", features = ["type_generation"] } sentry-release-parser = { version = "1.3.2", default-features = false } sentry-types = "0.36.0" sentry_protos = "0.1.74" From d57223f295842fae086d9af10b11b4e155f91f98 Mon Sep 17 00:00:00 2001 From: Pierre Massat Date: Tue, 6 May 2025 16:34:26 -0400 Subject: [PATCH 11/37] Install protoc to all workflows needing it --- .github/workflows/build_binary.yml | 20 ++++++++++++++++++++ .github/workflows/ci.yml | 25 ++++++++++++++++++++----- 2 files changed, 40 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_binary.yml b/.github/workflows/build_binary.yml index c86a789d356..2d3275c9f5d 100644 --- a/.github/workflows/build_binary.yml +++ b/.github/workflows/build_binary.yml @@ -23,6 +23,11 @@ jobs: apt-get update apt-get install -y --no-install-recommends git ca-certificates gcc libc6-dev curl make zip + - name: Install protoc + uses: arduino/setup-protoc@v3 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/checkout@v4 with: submodules: recursive @@ -64,6 +69,11 @@ jobs: with: submodules: recursive + - name: Install protoc + uses: arduino/setup-protoc@v3 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + - name: Install Rust Toolchain run: rustup toolchain install stable --profile minimal --no-self-update @@ -96,6 +106,11 @@ jobs: with: submodules: recursive + - name: Install protoc + uses: arduino/setup-protoc@v3 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + - name: Install Rust Toolchain run: rustup toolchain install stable --profile minimal --no-self-update @@ -127,6 +142,11 @@ jobs: with: submodules: recursive + - name: Install protoc + uses: arduino/setup-protoc@v3 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + - name: Install Rust Toolchain run: rustup toolchain install stable --profile minimal --no-self-update diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ff62872fb55..6eed61871f8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,6 +29,11 @@ jobs: sudo apt-get update sudo apt-get install -y libcurl4-openssl-dev + - name: Install protoc + uses: arduino/setup-protoc@v3 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/checkout@v4 with: submodules: recursive @@ -37,11 +42,6 @@ jobs: with: python-version: "3.11" - - name: Install Protoc - uses: arduino/setup-protoc@v3 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - - name: Install Rust Toolchain run: | rustup toolchain install stable --profile minimal --no-self-update @@ -68,6 +68,11 @@ jobs: sudo apt-get update sudo apt-get install -y libcurl4-openssl-dev + - name: Install protoc + uses: arduino/setup-protoc@v3 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/checkout@v4 with: submodules: recursive @@ -157,6 +162,11 @@ jobs: sudo apt-get update sudo apt-get install -y libcurl4-openssl-dev + - name: Install protoc + uses: arduino/setup-protoc@v3 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/checkout@v4 with: submodules: recursive @@ -713,6 +723,11 @@ jobs: sudo apt-get update sudo apt-get install -y libcurl4-openssl-dev + - name: Install protoc + uses: arduino/setup-protoc@v3 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/checkout@v4 with: submodules: recursive From a4dbeb842d40b2d544d4878e87f1eb8571bb0152 Mon Sep 17 00:00:00 2001 From: Pierre Massat Date: Tue, 6 May 2025 16:45:57 -0400 Subject: [PATCH 12/37] Add missing workflows --- .github/workflows/ci.yml | 10 ++++++++++ .github/workflows/deploy.yml | 5 +++++ 2 files changed, 15 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6eed61871f8..da72f53fa7f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -123,6 +123,11 @@ jobs: with: submodules: recursive + - name: Install protoc + uses: arduino/setup-protoc@v3 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + - name: Install Rust Toolchain run: rustup toolchain install stable --profile minimal --no-self-update @@ -295,6 +300,11 @@ jobs: with: submodules: recursive + - name: Install protoc + uses: arduino/setup-protoc@v3 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + - uses: dtolnay/rust-toolchain@stable - uses: swatinem/rust-cache@v2 with: diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 2c12e8507b7..da3c9296e49 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -23,6 +23,11 @@ jobs: sudo apt-get update sudo apt-get install -y libcurl4-openssl-dev + - name: Install protoc + uses: arduino/setup-protoc@v3 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/checkout@v4 with: submodules: recursive From ad279991d46c56b710b067ec4888e67770a69259 Mon Sep 17 00:00:00 2001 From: Pierre Massat Date: Tue, 6 May 2025 16:52:52 -0400 Subject: [PATCH 13/37] Add a CHANGELOG entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d7053a8c8e..a07c7d101fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ - Remove threads with 1 non-idle sample in profiling chunks. ([#4694](https://github.com/getsentry/relay/pull/4694)) - Migrate all Rust workspace crates to edition 2024. ([#4705](https://github.com/getsentry/relay/pull/4705)) +- Produce logs to the items topic. ([#4707](https://github.com/getsentry/relay/pull/4707)) ## 25.4.0 From 095c26f5a0f580ff529051ef3be9e5e279e2051f Mon Sep 17 00:00:00 2001 From: Pierre Massat Date: Tue, 6 May 2025 19:43:30 -0400 Subject: [PATCH 14/37] Fix some tests --- relay-server/src/services/store.rs | 28 ++- requirements-dev.txt | 4 +- tests/integration/fixtures/processing.py | 18 +- tests/integration/test_ourlogs.py | 256 +++++++++++++++-------- 4 files changed, 209 insertions(+), 97 deletions(-) diff --git a/relay-server/src/services/store.rs b/relay-server/src/services/store.rs index 7e5f3a9d106..090ad26d901 100644 --- a/relay-server/src/services/store.rs +++ b/relay-server/src/services/store.rs @@ -1007,13 +1007,18 @@ impl StoreService { ) .to_le_bytes() .to_vec(); + let received_nanos = if let Some(received) = received_at.timestamp_nanos_opt() { + received % 1_000_000_000 + } else { + 0 + }; let mut trace_item = TraceItem { item_type: TraceItemType::Log.into(), organization_id: scoping.organization_id.value(), project_id: scoping.project_id.value(), received: Some(Timestamp { seconds: safe_timestamp(received_at) as i64, - nanos: 0, + nanos: received_nanos as i32, }), retention_days: retention_days.into(), timestamp: Some(Timestamp { @@ -1030,7 +1035,13 @@ impl StoreService { trace_item.attributes.insert( "sentry.timestamp_precise".to_string(), AnyValue { - value: Some(Value::IntValue(log.timestamp_nanos as i64)), + value: Some(Value::StringValue(log.timestamp_nanos.to_string())), + }, + ); + trace_item.attributes.insert( + "sentry.timestamp_nanos".to_string(), + AnyValue { + value: Some(Value::StringValue(log.timestamp_nanos.to_string())), }, ); trace_item.attributes.insert( @@ -1056,6 +1067,15 @@ impl StoreService { }, ); + if let Some(span_id) = log.span_id { + trace_item.attributes.insert( + "sentry.span_id".to_string(), + AnyValue { + value: Some(Value::StringValue(span_id.to_string())), + }, + ); + } + for (name, attribute) in log.attributes.unwrap_or_default() { if let Some(attribute_value) = attribute { if let Some(v) = attribute_value.value { @@ -1079,6 +1099,7 @@ impl StoreService { } } } + let mut message = Vec::new(); if trace_item.encode(&mut message).is_err() { @@ -1615,7 +1636,8 @@ struct LogKafkaMessage<'a> { retention_days: u16, #[serde(default)] received: u64, - body: &'a RawValue, + #[serde(default)] + body: Cow<'a, str>, trace_id: EventId, #[serde(default, skip_serializing_if = "Option::is_none")] diff --git a/requirements-dev.txt b/requirements-dev.txt index 94723628b8e..c9e183bf72b 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -11,7 +11,7 @@ flake8==7.0.0 confluent-kafka==2.1.1 flask==3.0.3 msgpack==1.1.0 -opentelemetry-proto==1.22.0 +opentelemetry-proto==1.32.1 pytest-localserver==0.8.1 pytest-sentry==0.3.0 pytest-xdist==3.5.0 @@ -23,6 +23,7 @@ sentry_sdk==2.10.0 setuptools==70.0.0 werkzeug==3.0.6 zstandard==0.18.0 +sentry_protos==0.1.74 # typing things mypy==1.10.0 @@ -30,3 +31,4 @@ types-pyyaml==6.0.12.10 types-redis==4.5.1.3 types-requests==2.30.0.0 types-setuptools==69.0.0.0 +types-protobuf==5.27.0.20240626 diff --git a/tests/integration/fixtures/processing.py b/tests/integration/fixtures/processing.py index f2d0a3faa90..3f264eef41c 100644 --- a/tests/integration/fixtures/processing.py +++ b/tests/integration/fixtures/processing.py @@ -8,6 +8,7 @@ from copy import deepcopy from sentry_relay.consts import DataCategory +from sentry_protos.snuba.v1.trace_item_pb2 import TraceItem @pytest.fixture @@ -60,11 +61,11 @@ def inner(options=None): "metrics_generic": metrics_topic, "replay_events": get_topic_name("replay_events"), "replay_recordings": get_topic_name("replay_recordings"), - "ourlogs": get_topic_name("ourlogs"), "monitors": get_topic_name("monitors"), "spans": get_topic_name("spans"), "profiles": get_topic_name("profiles"), "feedback": get_topic_name("feedback"), + "items": get_topic_name("items"), } if processing.get("redis") is None: @@ -351,7 +352,7 @@ def spans_consumer(consumer_fixture): @pytest.fixture def ourlogs_consumer(consumer_fixture): - yield from consumer_fixture(OurLogsConsumer, "ourlogs") + yield from consumer_fixture(OurLogsConsumer, "items") @pytest.fixture @@ -520,14 +521,23 @@ def get_ourlog(self): assert message is not None assert message.error() is None - return json.loads(message.value()) + trace_item = TraceItem() + trace_item.ParseFromString(message.value()) + + return trace_item def get_ourlogs(self): ourlogs = [] + for message in self.poll_many(): assert message is not None assert message.error() is None - ourlogs.append(json.loads(message.value())) + + trace_item = TraceItem() + trace_item.ParseFromString(message.value()) + + ourlogs.append(trace_item) + return ourlogs diff --git a/tests/integration/test_ourlogs.py b/tests/integration/test_ourlogs.py index 4b822d7bf21..59b65dd3505 100644 --- a/tests/integration/test_ourlogs.py +++ b/tests/integration/test_ourlogs.py @@ -1,9 +1,15 @@ import json + from datetime import datetime, timedelta, timezone from sentry_sdk.envelope import Envelope, Item, PayloadRef from sentry_relay.consts import DataCategory +from sentry_protos.snuba.v1.trace_item_pb2 import TraceItem, AnyValue +from sentry_protos.snuba.v1.request_common_pb2 import TraceItemType +from google.protobuf.timestamp_pb2 import Timestamp +from google.protobuf.json_format import MessageToDict + from .asserts.time import time_within_delta @@ -87,37 +93,52 @@ def test_ourlog_extraction_with_otel_logs( envelope = envelope_with_otel_logs(start) relay.send_envelope(project_id, envelope) - ourlogs = ourlogs_consumer.get_ourlogs() - expected = { - "organization_id": 1, - "project_id": 42, - "retention_days": 90, - "timestamp_nanos": int(start.timestamp() * 1e9), - "observed_timestamp_nanos": time_within_delta(start, expect_resolution="ns"), - "trace_id": "5b8efff798038103d269b633813fc60c", - "body": "Example log record", - "trace_flags": 0, - "span_id": "eee19b7ec3c1b174", - "severity_text": "Information", - "severity_number": 10, - "received": time_within_delta(start, expect_resolution="s"), - "attributes": { - "string.attribute": {"string_value": "some string"}, - "boolean.attribute": {"bool_value": True}, - "int.attribute": {"int_value": 10}, - "double.attribute": {"double_value": 637.704}, - "sentry.severity_number": {"int_value": 10}, - "sentry.severity_text": {"string_value": "Information"}, - "sentry.timestamp_nanos": { - "string_value": str(int(start.timestamp() * 1e9)) - }, - "sentry.trace_flags": {"int_value": 0}, + timestamp_nanos = int(start.timestamp() * 1e9) + timestamp_proto = Timestamp() + timestamp_proto.FromNanoseconds(timestamp_nanos) + + received_nanos = int(start.timestamp() * 1e6) * 1000 + received_proto = Timestamp() + received_proto.FromNanoseconds(received_nanos) + + expected_log = TraceItem( + organization_id=1, + project_id=project_id, + timestamp=timestamp_proto, + trace_id="5b8efff798038103d269b633813fc60c", + item_id=timestamp_nanos.to_bytes( + length=16, + byteorder="little", + signed=False, + ), + item_type=TraceItemType.TRACE_ITEM_TYPE_LOG, + attributes={ + "boolean.attribute": AnyValue(bool_value=True), + "double.attribute": AnyValue(double_value=637.704), + "int.attribute": AnyValue(int_value=10), + "string.attribute": AnyValue(string_value="some string"), + "sentry.body": AnyValue(string_value="Example log record"), + "sentry.severity_number": AnyValue(int_value=10), + "sentry.severity_text": AnyValue(string_value="Information"), + "sentry.span_id": AnyValue(string_value="eee19b7ec3c1b174"), + "sentry.timestamp_nanos": AnyValue(string_value=str(timestamp_nanos)), + "sentry.timestamp_precise": AnyValue(string_value=str(timestamp_nanos)), + "sentry.trace_flags": AnyValue(int_value=0), }, - } + received=received_proto, + retention_days=90, + client_sample_rate=1.0, + server_sample_rate=1.0, + ) - del ourlogs[0]["attributes"]["sentry.observed_timestamp_nanos"] + logs = ourlogs_consumer.get_ourlogs() - assert ourlogs == [expected] + # reset and remove values changing values + logs[0].received = start + expected_log.item_id = logs[0].item_id + del logs[0].attributes["sentry.observed_timestamp_nanos"] + + assert [MessageToDict(log) for log in logs] == [MessageToDict(expected_log)] ourlogs_consumer.assert_empty() @@ -241,53 +262,82 @@ def test_ourlog_extraction_with_sentry_logs( ) relay.send_envelope(project_id, envelope) - ourlogs = ourlogs_consumer.get_ourlogs() - assert ourlogs == [ - { - "organization_id": 1, - "project_id": 42, - "retention_days": 90, - "timestamp_nanos": time_within_delta(start, expect_resolution="ns"), - "observed_timestamp_nanos": time_within_delta( - start, expect_resolution="ns" + timestamp_nanos = int(start.timestamp() * 1e9) + timestamp_proto = Timestamp() + timestamp_proto.FromNanoseconds(timestamp_nanos) + + received_nanos = int(start.timestamp() * 1e6) * 1000 + received_proto = Timestamp() + received_proto.FromNanoseconds(received_nanos) + + expected_logs = [ + TraceItem( + organization_id=1, + project_id=project_id, + timestamp=timestamp_proto, + trace_id="5b8efff798038103d269b633813fc60c", + item_id=timestamp_nanos.to_bytes( + length=16, + byteorder="little", + signed=False, ), - "received": time_within_delta(start, expect_resolution="s"), - "trace_id": "5b8efff798038103d269b633813fc60c", - "span_id": "eee19b7ec3c1b175", - "body": "This is really bad", - "severity_text": "error", - "severity_number": 17, - "attributes": { - "sentry.severity_number": {"int_value": 17}, - "sentry.severity_text": {"string_value": "error"}, + item_type=TraceItemType.TRACE_ITEM_TYPE_LOG, + attributes={ + "sentry.body": AnyValue(string_value="This is really bad"), + "sentry.severity_number": AnyValue(int_value=17), + "sentry.severity_text": AnyValue(string_value="error"), + "sentry.span_id": AnyValue(string_value="eee19b7ec3c1b174"), }, - }, - { - "organization_id": 1, - "project_id": 42, - "retention_days": 90, - "timestamp_nanos": time_within_delta(start, expect_resolution="ns"), - "observed_timestamp_nanos": time_within_delta( - start, expect_resolution="ns" + received=received_proto, + retention_days=90, + client_sample_rate=1.0, + server_sample_rate=1.0, + ), + TraceItem( + organization_id=1, + project_id=project_id, + timestamp=timestamp_proto, + trace_id="5b8efff798038103d269b633813fc60c", + item_id=timestamp_nanos.to_bytes( + length=16, + byteorder="little", + signed=False, ), - "received": time_within_delta(start, expect_resolution="s"), - "trace_id": "5b8efff798038103d269b633813fc60c", - "body": "Example log record", - "span_id": "eee19b7ec3c1b174", - "severity_text": "info", - "severity_number": 9, - "attributes": { - "boolean.attribute": {"bool_value": True}, - "double.attribute": {"double_value": 1.23}, - "integer.attribute": {"int_value": 42}, - "string.attribute": {"string_value": "some string"}, - "valid_string_with_other": {"string_value": "test"}, - "pii": {"string_value": "[creditcard]"}, - "sentry.severity_number": {"int_value": 9}, - "sentry.severity_text": {"string_value": "info"}, + item_type=TraceItemType.TRACE_ITEM_TYPE_LOG, + attributes={ + "boolean.attribute": AnyValue(bool_value=True), + "double.attribute": AnyValue(double_value=1.23), + "integer.attribute": AnyValue(int_value=42), + "pii": AnyValue(string_value="4242 4242 4242 4242"), + "sentry.body": AnyValue(string_value="Example log record"), + "sentry.severity_number": AnyValue(int_value=10), + "sentry.severity_text": AnyValue(string_value="info"), + "sentry.span_id": AnyValue(string_value="eee19b7ec3c1b174"), + "sentry.timestamp_nanos": AnyValue(string_value=str(timestamp_nanos)), + "sentry.timestamp_precise": AnyValue(string_value=str(timestamp_nanos)), + "sentry.trace_flags": AnyValue(int_value=0), + "string.attribute": AnyValue(string_value="some string"), }, - }, + received=received_proto, + retention_days=90, + client_sample_rate=1.0, + server_sample_rate=1.0, + ), + ] + + logs = ourlogs_consumer.get_ourlogs() + + # reset and remove values changing values + for log in logs: + log.received = start + + for expected_log in expected_logs: + expected_log.item_id = logs[0].item_id + + assert [MessageToDict(log) for log in logs] == [ + MessageToDict(expected_log) for expected_log in expected_logs ] + ourlogs_consumer.assert_empty() @@ -296,7 +346,6 @@ def test_ourlog_extraction_with_sentry_logs_with_missing_fields( relay_with_processing, ourlogs_consumer, ): - ourlogs_consumer = ourlogs_consumer() project_id = 42 project_config = mini_sentry.add_full_project_config(project_id) @@ -318,24 +367,53 @@ def test_ourlog_extraction_with_sentry_logs_with_missing_fields( ) relay.send_envelope(project_id, envelope) - ourlogs = ourlogs_consumer.get_ourlogs() - expected = { - "organization_id": 1, - "project_id": 42, - "retention_days": 90, - "timestamp_nanos": time_within_delta(start, expect_resolution="ns"), - "observed_timestamp_nanos": time_within_delta(start, expect_resolution="ns"), - "received": time_within_delta(start, expect_resolution="s"), - "trace_id": "5b8efff798038103d269b633813fc60c", - "body": "Example log record 2", - "severity_text": "warn", - "severity_number": 13, - "attributes": { - "sentry.severity_number": {"int_value": 13}, - "sentry.severity_text": {"string_value": "warn"}, - }, - } - assert ourlogs == [expected] + timestamp_nanos = int(start.timestamp() * 1e9) + timestamp_proto = Timestamp() + timestamp_proto.FromNanoseconds(timestamp_nanos) + + received_nanos = int(start.timestamp() * 1e6) * 1000 + received_proto = Timestamp() + received_proto.FromNanoseconds(received_nanos) + + expected_logs = [ + TraceItem( + organization_id=1, + project_id=project_id, + timestamp=timestamp_proto, + trace_id="5b8efff798038103d269b633813fc60c", + item_id=timestamp_nanos.to_bytes( + length=16, + byteorder="little", + signed=False, + ), + item_type=TraceItemType.TRACE_ITEM_TYPE_LOG, + attributes={ + "sentry.body": AnyValue(string_value="Example log record 2"), + "sentry.severity_number": AnyValue(int_value=13), + "sentry.severity_text": AnyValue(string_value="warn"), + "sentry.timestamp_nanos": AnyValue(string_value=str(timestamp_nanos)), + "sentry.timestamp_precise": AnyValue(string_value=str(timestamp_nanos)), + }, + received=received_proto, + retention_days=90, + client_sample_rate=1.0, + server_sample_rate=1.0, + ), + ] + + logs = ourlogs_consumer.get_ourlogs() + + # reset and remove values changing values + for log in logs: + log.received = start + + for expected_log in expected_logs: + expected_log.item_id = logs[0].item_id + + assert [MessageToDict(log) for log in logs] == [ + MessageToDict(expected_log) for expected_log in expected_logs + ] + ourlogs_consumer.assert_empty() From 90462cc5375c2366e885d17aedd9dd003ab8558d Mon Sep 17 00:00:00 2001 From: Pierre Massat Date: Wed, 7 May 2025 17:47:22 -0400 Subject: [PATCH 15/37] Revert "Add missing workflows" This reverts commit a4dbeb842d40b2d544d4878e87f1eb8571bb0152. --- .github/workflows/ci.yml | 10 ---------- .github/workflows/deploy.yml | 5 ----- 2 files changed, 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index da72f53fa7f..6eed61871f8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -123,11 +123,6 @@ jobs: with: submodules: recursive - - name: Install protoc - uses: arduino/setup-protoc@v3 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - - name: Install Rust Toolchain run: rustup toolchain install stable --profile minimal --no-self-update @@ -300,11 +295,6 @@ jobs: with: submodules: recursive - - name: Install protoc - uses: arduino/setup-protoc@v3 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - - uses: dtolnay/rust-toolchain@stable - uses: swatinem/rust-cache@v2 with: diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index da3c9296e49..2c12e8507b7 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -23,11 +23,6 @@ jobs: sudo apt-get update sudo apt-get install -y libcurl4-openssl-dev - - name: Install protoc - uses: arduino/setup-protoc@v3 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - - uses: actions/checkout@v4 with: submodules: recursive From f53c73a106465f370872dd3906a7faca0c5da2e9 Mon Sep 17 00:00:00 2001 From: Pierre Massat Date: Wed, 7 May 2025 17:47:34 -0400 Subject: [PATCH 16/37] Revert "Install protoc to all workflows needing it" This reverts commit d57223f295842fae086d9af10b11b4e155f91f98. --- .github/workflows/build_binary.yml | 20 -------------------- .github/workflows/ci.yml | 25 +++++-------------------- 2 files changed, 5 insertions(+), 40 deletions(-) diff --git a/.github/workflows/build_binary.yml b/.github/workflows/build_binary.yml index 2d3275c9f5d..c86a789d356 100644 --- a/.github/workflows/build_binary.yml +++ b/.github/workflows/build_binary.yml @@ -23,11 +23,6 @@ jobs: apt-get update apt-get install -y --no-install-recommends git ca-certificates gcc libc6-dev curl make zip - - name: Install protoc - uses: arduino/setup-protoc@v3 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - - uses: actions/checkout@v4 with: submodules: recursive @@ -69,11 +64,6 @@ jobs: with: submodules: recursive - - name: Install protoc - uses: arduino/setup-protoc@v3 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - - name: Install Rust Toolchain run: rustup toolchain install stable --profile minimal --no-self-update @@ -106,11 +96,6 @@ jobs: with: submodules: recursive - - name: Install protoc - uses: arduino/setup-protoc@v3 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - - name: Install Rust Toolchain run: rustup toolchain install stable --profile minimal --no-self-update @@ -142,11 +127,6 @@ jobs: with: submodules: recursive - - name: Install protoc - uses: arduino/setup-protoc@v3 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - - name: Install Rust Toolchain run: rustup toolchain install stable --profile minimal --no-self-update diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6eed61871f8..ff62872fb55 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,11 +29,6 @@ jobs: sudo apt-get update sudo apt-get install -y libcurl4-openssl-dev - - name: Install protoc - uses: arduino/setup-protoc@v3 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - - uses: actions/checkout@v4 with: submodules: recursive @@ -42,6 +37,11 @@ jobs: with: python-version: "3.11" + - name: Install Protoc + uses: arduino/setup-protoc@v3 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + - name: Install Rust Toolchain run: | rustup toolchain install stable --profile minimal --no-self-update @@ -68,11 +68,6 @@ jobs: sudo apt-get update sudo apt-get install -y libcurl4-openssl-dev - - name: Install protoc - uses: arduino/setup-protoc@v3 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - - uses: actions/checkout@v4 with: submodules: recursive @@ -162,11 +157,6 @@ jobs: sudo apt-get update sudo apt-get install -y libcurl4-openssl-dev - - name: Install protoc - uses: arduino/setup-protoc@v3 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - - uses: actions/checkout@v4 with: submodules: recursive @@ -723,11 +713,6 @@ jobs: sudo apt-get update sudo apt-get install -y libcurl4-openssl-dev - - name: Install protoc - uses: arduino/setup-protoc@v3 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - - uses: actions/checkout@v4 with: submodules: recursive From dd26cab7e872de84a03ec4e34acbd0e285eac0ce Mon Sep 17 00:00:00 2001 From: Pierre Massat Date: Wed, 7 May 2025 17:48:01 -0400 Subject: [PATCH 17/37] Upgrade sentry_protos and sentry-kafka-schemas so we don't need protoc --- Cargo.lock | 68 +++----------------------------------------- Cargo.toml | 4 +-- requirements-dev.txt | 2 +- 3 files changed, 7 insertions(+), 67 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2a5a1de9a3b..68ef4726584 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1389,12 +1389,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "fixedbitset" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" - [[package]] name = "flate2" version = "1.0.35" @@ -2592,12 +2586,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "multimap" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "defc4c55412d89136f966bbb339008b474350e5e6e78d2714439c386b3137a03" - [[package]] name = "native-tls" version = "0.2.12" @@ -3051,16 +3039,6 @@ dependencies = [ "sha2", ] -[[package]] -name = "petgraph" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" -dependencies = [ - "fixedbitset", - "indexmap 2.7.0", -] - [[package]] name = "phf_shared" version = "0.10.0" @@ -3256,27 +3234,6 @@ dependencies = [ "prost-derive", ] -[[package]] -name = "prost-build" -version = "0.13.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c1318b19085f08681016926435853bbf7858f9c082d0999b80550ff5d9abe15" -dependencies = [ - "bytes", - "heck 0.5.0", - "itertools 0.13.0", - "log", - "multimap", - "once_cell", - "petgraph", - "prettyplease", - "prost", - "prost-types", - "regex", - "syn", - "tempfile", -] - [[package]] name = "prost-derive" version = "0.13.3" @@ -4685,9 +4642,9 @@ dependencies = [ [[package]] name = "sentry-kafka-schemas" -version = "1.2.2" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab02afbb01cbd8b7e71ae1c83a58a288e5b97d3670a4484e332079009e52828d" +checksum = "b46efdf9bbf8a44d6942aee9214e4fc88867a70235c6bd2c4db57c1acac59c43" dependencies = [ "jsonschema", "prettyplease", @@ -4769,17 +4726,14 @@ dependencies = [ [[package]] name = "sentry_protos" -version = "0.1.74" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0aefff68057c87dc1054563870fc268c04266a9143c51f424a98faf548330d6" +checksum = "51f7779da50a2f2507527e81589ab556d0588a301734cab5adb989a479a139be" dependencies = [ - "glob", "prost", "prost-types", - "regex", "tokio", "tonic", - "tonic-build", ] [[package]] @@ -5705,20 +5659,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "tonic-build" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9557ce109ea773b399c9b9e5dca39294110b74f1f342cb347a80d1fce8c26a11" -dependencies = [ - "prettyplease", - "proc-macro2", - "prost-build", - "prost-types", - "quote", - "syn", -] - [[package]] name = "tower" version = "0.4.13" diff --git a/Cargo.toml b/Cargo.toml index a4dd5b8b890..d16a3ee8bb4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -160,10 +160,10 @@ reqwest = "0.12.9" rmp-serde = "1.3.0" sentry = "0.36.0" sentry-core = "0.36.0" -sentry-kafka-schemas = { version = "1.2.2", features = ["type_generation"] } +sentry-kafka-schemas = { version = "1.3.1", features = ["type_generation"] } sentry-release-parser = { version = "1.3.2", default-features = false } sentry-types = "0.36.0" -sentry_protos = "0.1.74" +sentry_protos = "0.2.0" prost-types = "0.13.3" semver = "1.0.23" serde = { version = "1.0.215", features = ["derive", "rc"] } diff --git a/requirements-dev.txt b/requirements-dev.txt index c9e183bf72b..219f5dd7b39 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -23,7 +23,7 @@ sentry_sdk==2.10.0 setuptools==70.0.0 werkzeug==3.0.6 zstandard==0.18.0 -sentry_protos==0.1.74 +sentry_protos==0.2.0 # typing things mypy==1.10.0 From 08c78862586d284f3146d8254ff01c2529cef5fd Mon Sep 17 00:00:00 2001 From: Pierre Massat Date: Wed, 7 May 2025 18:47:54 -0400 Subject: [PATCH 18/37] Fix tests --- relay-server/src/services/store.rs | 28 ---- tests/integration/test_ourlogs.py | 227 ++++++++++++++--------------- 2 files changed, 112 insertions(+), 143 deletions(-) diff --git a/relay-server/src/services/store.rs b/relay-server/src/services/store.rs index 090ad26d901..918c2ad74f1 100644 --- a/relay-server/src/services/store.rs +++ b/relay-server/src/services/store.rs @@ -1032,34 +1032,6 @@ impl StoreService { server_sample_rate: 1.0, }; - trace_item.attributes.insert( - "sentry.timestamp_precise".to_string(), - AnyValue { - value: Some(Value::StringValue(log.timestamp_nanos.to_string())), - }, - ); - trace_item.attributes.insert( - "sentry.timestamp_nanos".to_string(), - AnyValue { - value: Some(Value::StringValue(log.timestamp_nanos.to_string())), - }, - ); - trace_item.attributes.insert( - "sentry.severity_text".to_string(), - AnyValue { - value: Some(Value::StringValue( - log.severity_text.unwrap_or_else(|| "INFO".into()).into(), - )), - }, - ); - trace_item.attributes.insert( - "sentry.severity_number".to_string(), - AnyValue { - value: Some(Value::IntValue( - log.severity_number.unwrap_or_default().into(), - )), - }, - ); trace_item.attributes.insert( "sentry.body".to_string(), AnyValue { diff --git a/tests/integration/test_ourlogs.py b/tests/integration/test_ourlogs.py index 59b65dd3505..5cb5f5d9bce 100644 --- a/tests/integration/test_ourlogs.py +++ b/tests/integration/test_ourlogs.py @@ -1,4 +1,5 @@ import json +import base64 from datetime import datetime, timedelta, timezone @@ -93,52 +94,56 @@ def test_ourlog_extraction_with_otel_logs( envelope = envelope_with_otel_logs(start) relay.send_envelope(project_id, envelope) - timestamp_nanos = int(start.timestamp() * 1e9) + timestamp_nanos = round(start.timestamp() * 1e9) timestamp_proto = Timestamp() timestamp_proto.FromNanoseconds(timestamp_nanos) - received_nanos = int(start.timestamp() * 1e6) * 1000 - received_proto = Timestamp() - received_proto.FromNanoseconds(received_nanos) - - expected_log = TraceItem( - organization_id=1, - project_id=project_id, - timestamp=timestamp_proto, - trace_id="5b8efff798038103d269b633813fc60c", - item_id=timestamp_nanos.to_bytes( - length=16, - byteorder="little", - signed=False, - ), - item_type=TraceItemType.TRACE_ITEM_TYPE_LOG, - attributes={ - "boolean.attribute": AnyValue(bool_value=True), - "double.attribute": AnyValue(double_value=637.704), - "int.attribute": AnyValue(int_value=10), - "string.attribute": AnyValue(string_value="some string"), - "sentry.body": AnyValue(string_value="Example log record"), - "sentry.severity_number": AnyValue(int_value=10), - "sentry.severity_text": AnyValue(string_value="Information"), - "sentry.span_id": AnyValue(string_value="eee19b7ec3c1b174"), - "sentry.timestamp_nanos": AnyValue(string_value=str(timestamp_nanos)), - "sentry.timestamp_precise": AnyValue(string_value=str(timestamp_nanos)), - "sentry.trace_flags": AnyValue(int_value=0), - }, - received=received_proto, - retention_days=90, - client_sample_rate=1.0, - server_sample_rate=1.0, - ) + expected_logs = [ + MessageToDict( + TraceItem( + organization_id=1, + project_id=project_id, + timestamp=timestamp_proto, + trace_id="5b8efff798038103d269b633813fc60c", + item_id=timestamp_nanos.to_bytes( + length=16, + byteorder="little", + signed=False, + ), + item_type=TraceItemType.TRACE_ITEM_TYPE_LOG, + attributes={ + "boolean.attribute": AnyValue(bool_value=True), + "double.attribute": AnyValue(double_value=637.704), + "int.attribute": AnyValue(int_value=10), + "string.attribute": AnyValue(string_value="some string"), + "sentry.body": AnyValue(string_value="Example log record"), + "sentry.severity_number": AnyValue(int_value=10), + "sentry.severity_text": AnyValue(string_value="Information"), + "sentry.span_id": AnyValue(string_value="eee19b7ec3c1b174"), + "sentry.timestamp_nanos": AnyValue( + string_value=str(timestamp_nanos) + ), + "sentry.trace_flags": AnyValue(int_value=0), + }, + received=timestamp_proto, + retention_days=90, + client_sample_rate=1.0, + server_sample_rate=1.0, + ) + ) + ] - logs = ourlogs_consumer.get_ourlogs() + logs = [MessageToDict(log) for log in ourlogs_consumer.get_ourlogs()] # reset and remove values changing values - logs[0].received = start - expected_log.item_id = logs[0].item_id - del logs[0].attributes["sentry.observed_timestamp_nanos"] + for log in logs: + del log["attributes"]["sentry.observed_timestamp_nanos"] + + for expected_log in expected_logs: + expected_log["itemId"] = logs[0]["itemId"] + expected_log["received"] = logs[0]["received"] - assert [MessageToDict(log) for log in logs] == [MessageToDict(expected_log)] + assert logs == expected_logs ourlogs_consumer.assert_empty() @@ -262,81 +267,80 @@ def test_ourlog_extraction_with_sentry_logs( ) relay.send_envelope(project_id, envelope) - timestamp_nanos = int(start.timestamp() * 1e9) + timestamp_nanos = int(start.timestamp() * 1e6) * 1000 timestamp_proto = Timestamp() timestamp_proto.FromNanoseconds(timestamp_nanos) - received_nanos = int(start.timestamp() * 1e6) * 1000 - received_proto = Timestamp() - received_proto.FromNanoseconds(received_nanos) - expected_logs = [ - TraceItem( - organization_id=1, - project_id=project_id, - timestamp=timestamp_proto, - trace_id="5b8efff798038103d269b633813fc60c", - item_id=timestamp_nanos.to_bytes( - length=16, - byteorder="little", - signed=False, + MessageToDict(log) + for log in [ + TraceItem( + organization_id=1, + project_id=project_id, + timestamp=timestamp_proto, + trace_id="5b8efff798038103d269b633813fc60c", + item_id=timestamp_nanos.to_bytes( + length=16, + byteorder="little", + signed=False, + ), + item_type=TraceItemType.TRACE_ITEM_TYPE_LOG, + attributes={ + "sentry.body": AnyValue(string_value="This is really bad"), + "sentry.severity_number": AnyValue(int_value=17), + "sentry.severity_text": AnyValue(string_value="error"), + "sentry.span_id": AnyValue(string_value="eee19b7ec3c1b175"), + }, + received=timestamp_proto, + retention_days=90, + client_sample_rate=1.0, + server_sample_rate=1.0, ), - item_type=TraceItemType.TRACE_ITEM_TYPE_LOG, - attributes={ - "sentry.body": AnyValue(string_value="This is really bad"), - "sentry.severity_number": AnyValue(int_value=17), - "sentry.severity_text": AnyValue(string_value="error"), - "sentry.span_id": AnyValue(string_value="eee19b7ec3c1b174"), - }, - received=received_proto, - retention_days=90, - client_sample_rate=1.0, - server_sample_rate=1.0, - ), - TraceItem( - organization_id=1, - project_id=project_id, - timestamp=timestamp_proto, - trace_id="5b8efff798038103d269b633813fc60c", - item_id=timestamp_nanos.to_bytes( - length=16, - byteorder="little", - signed=False, + TraceItem( + organization_id=1, + project_id=project_id, + timestamp=timestamp_proto, + trace_id="5b8efff798038103d269b633813fc60c", + item_id=timestamp_nanos.to_bytes( + length=16, + byteorder="little", + signed=False, + ), + item_type=TraceItemType.TRACE_ITEM_TYPE_LOG, + attributes={ + "boolean.attribute": AnyValue(bool_value=True), + "double.attribute": AnyValue(double_value=1.23), + "integer.attribute": AnyValue(int_value=42), + "pii": AnyValue(string_value="[creditcard]"), + "sentry.body": AnyValue(string_value="Example log record"), + "sentry.severity_number": AnyValue(int_value=9), + "sentry.severity_text": AnyValue(string_value="info"), + "sentry.span_id": AnyValue(string_value="eee19b7ec3c1b174"), + "string.attribute": AnyValue(string_value="some string"), + "valid_string_with_other": AnyValue(string_value="test"), + }, + received=timestamp_proto, + retention_days=90, + client_sample_rate=1.0, + server_sample_rate=1.0, ), - item_type=TraceItemType.TRACE_ITEM_TYPE_LOG, - attributes={ - "boolean.attribute": AnyValue(bool_value=True), - "double.attribute": AnyValue(double_value=1.23), - "integer.attribute": AnyValue(int_value=42), - "pii": AnyValue(string_value="4242 4242 4242 4242"), - "sentry.body": AnyValue(string_value="Example log record"), - "sentry.severity_number": AnyValue(int_value=10), - "sentry.severity_text": AnyValue(string_value="info"), - "sentry.span_id": AnyValue(string_value="eee19b7ec3c1b174"), - "sentry.timestamp_nanos": AnyValue(string_value=str(timestamp_nanos)), - "sentry.timestamp_precise": AnyValue(string_value=str(timestamp_nanos)), - "sentry.trace_flags": AnyValue(int_value=0), - "string.attribute": AnyValue(string_value="some string"), - }, - received=received_proto, - retention_days=90, - client_sample_rate=1.0, - server_sample_rate=1.0, - ), + ] ] - logs = ourlogs_consumer.get_ourlogs() + logs = [MessageToDict(log) for log in ourlogs_consumer.get_ourlogs()] # reset and remove values changing values for log in logs: - log.received = start + log["received"] = start.isoformat(sep="T")[:-6] + "Z" + log["timestamp"] = start.isoformat(sep="T")[:-6] + "Z" - for expected_log in expected_logs: - expected_log.item_id = logs[0].item_id + for i, expected_log in enumerate(expected_logs): + # we can't generate a uuid7 yet so we need to replace the item_id + expected_log["itemId"] = logs[i]["itemId"] + # received is the timestamp generated on the server when we received the log + expected_log["received"] = logs[i]["received"] - assert [MessageToDict(log) for log in logs] == [ - MessageToDict(expected_log) for expected_log in expected_logs - ] + assert logs == expected_logs ourlogs_consumer.assert_empty() @@ -367,14 +371,10 @@ def test_ourlog_extraction_with_sentry_logs_with_missing_fields( ) relay.send_envelope(project_id, envelope) - timestamp_nanos = int(start.timestamp() * 1e9) + timestamp_nanos = int(start.timestamp() * 1e6) * 1000 timestamp_proto = Timestamp() timestamp_proto.FromNanoseconds(timestamp_nanos) - received_nanos = int(start.timestamp() * 1e6) * 1000 - received_proto = Timestamp() - received_proto.FromNanoseconds(received_nanos) - expected_logs = [ TraceItem( organization_id=1, @@ -391,28 +391,25 @@ def test_ourlog_extraction_with_sentry_logs_with_missing_fields( "sentry.body": AnyValue(string_value="Example log record 2"), "sentry.severity_number": AnyValue(int_value=13), "sentry.severity_text": AnyValue(string_value="warn"), - "sentry.timestamp_nanos": AnyValue(string_value=str(timestamp_nanos)), - "sentry.timestamp_precise": AnyValue(string_value=str(timestamp_nanos)), }, - received=received_proto, + received=timestamp_proto, retention_days=90, client_sample_rate=1.0, server_sample_rate=1.0, ), ] - logs = ourlogs_consumer.get_ourlogs() + logs = [MessageToDict(log) for log in ourlogs_consumer.get_ourlogs()] # reset and remove values changing values for log in logs: - log.received = start + log["received"] = start.isoformat(sep="T")[:-6] + "Z" + log["timestamp"] = start.isoformat(sep="T")[:-6] + "Z" for expected_log in expected_logs: - expected_log.item_id = logs[0].item_id + expected_log.item_id = base64.b64decode(logs[0]["itemId"]) - assert [MessageToDict(log) for log in logs] == [ - MessageToDict(expected_log) for expected_log in expected_logs - ] + assert logs == [MessageToDict(expected_log) for expected_log in expected_logs] ourlogs_consumer.assert_empty() From d78d272a35b9889abeb6af030e7810f51bef34c3 Mon Sep 17 00:00:00 2001 From: Pierre Massat Date: Wed, 7 May 2025 19:04:06 -0400 Subject: [PATCH 19/37] Move some logic to the normalization --- relay-ourlogs/src/ourlog.rs | 31 ++++++++++++++++++++++++++++++ relay-server/src/services/store.rs | 16 --------------- 2 files changed, 31 insertions(+), 16 deletions(-) diff --git a/relay-ourlogs/src/ourlog.rs b/relay-ourlogs/src/ourlog.rs index ae5bb2effa7..c7104d851f1 100644 --- a/relay-ourlogs/src/ourlog.rs +++ b/relay-ourlogs/src/ourlog.rs @@ -104,6 +104,20 @@ pub fn otel_to_sentry_log(otel_log: OtelLog) -> Result { Value::I64(0), )), ); + attribute_data.insert( + "sentry.body".to_string(), + Annotated::new(OurLogAttribute::new( + OurLogAttributeType::String, + Value::String(body.clone()), + )), + ); + attribute_data.insert( + "sentry.span_id".to_string(), + Annotated::new(OurLogAttribute::new( + OurLogAttributeType::String, + Value::String(span_id.to_string()), + )), + ); for attribute in attributes.into_iter() { if let Some(value) = attribute.value.and_then(|v| v.value) { @@ -200,6 +214,23 @@ pub fn ourlog_merge_otel(ourlog: &mut Annotated) { ), )), ); + attributes.insert( + "sentry.body".to_string(), + Annotated::new(OurLogAttribute::new( + OurLogAttributeType::String, + Value::String(ourlog_value.body.value().cloned().unwrap_or_default()), + )), + ); + + if let Some(span_id) = ourlog_value.span_id.value() { + attributes.insert( + "sentry.span_id".to_string(), + Annotated::new(OurLogAttribute::new( + OurLogAttributeType::String, + Value::String(span_id.to_string()), + )), + ); + } if let Some(value) = ourlog_value .attribute("sentry.severity_text") diff --git a/relay-server/src/services/store.rs b/relay-server/src/services/store.rs index 918c2ad74f1..ba1416cdb73 100644 --- a/relay-server/src/services/store.rs +++ b/relay-server/src/services/store.rs @@ -1032,22 +1032,6 @@ impl StoreService { server_sample_rate: 1.0, }; - trace_item.attributes.insert( - "sentry.body".to_string(), - AnyValue { - value: Some(Value::StringValue(log.body.to_string())), - }, - ); - - if let Some(span_id) = log.span_id { - trace_item.attributes.insert( - "sentry.span_id".to_string(), - AnyValue { - value: Some(Value::StringValue(span_id.to_string())), - }, - ); - } - for (name, attribute) in log.attributes.unwrap_or_default() { if let Some(attribute_value) = attribute { if let Some(v) = attribute_value.value { From 57761afba8b15834d2457371d8415b0dfd77dff6 Mon Sep 17 00:00:00 2001 From: Pierre Massat Date: Wed, 7 May 2025 19:14:50 -0400 Subject: [PATCH 20/37] Fix normalization tests --- relay-ourlogs/src/ourlog.rs | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/relay-ourlogs/src/ourlog.rs b/relay-ourlogs/src/ourlog.rs index c7104d851f1..4a546faeefa 100644 --- a/relay-ourlogs/src/ourlog.rs +++ b/relay-ourlogs/src/ourlog.rs @@ -578,6 +578,13 @@ mod tests { type: String, other: {}, }, + "sentry.body": OurLogAttribute { + value: String( + "Example log record", + ), + type: String, + other: {}, + }, "sentry.severity_number": OurLogAttribute { value: I64( 9, @@ -592,6 +599,13 @@ mod tests { type: String, other: {}, }, + "sentry.span_id": OurLogAttribute { + value: String( + "eee19b7ec3c1b174", + ), + type: String, + other: {}, + }, }, other: { "observed_timestamp_nanos": U64( @@ -661,7 +675,7 @@ mod tests { ); } - insta::assert_debug_snapshot!(ourlog, @r###" + insta::assert_debug_snapshot!(ourlog, @r#" OurLog { timestamp: Timestamp( 2021-11-29T00:00:00Z, @@ -678,6 +692,13 @@ mod tests { type: String, other: {}, }, + "sentry.body": OurLogAttribute { + value: String( + "", + ), + type: String, + other: {}, + }, "sentry.severity_number": OurLogAttribute { value: I64( 0, @@ -708,7 +729,7 @@ mod tests { ), }, } - "###); + "#); insta::assert_json_snapshot!(SerializableAnnotated(&ourlog), @r###" { From 86ca4aa1b25ecece72b62e62a1311995b44f23cc Mon Sep 17 00:00:00 2001 From: Pierre Massat Date: Wed, 7 May 2025 20:23:03 -0400 Subject: [PATCH 21/37] Fix one more test --- relay-ourlogs/src/ourlog.rs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/relay-ourlogs/src/ourlog.rs b/relay-ourlogs/src/ourlog.rs index 4a546faeefa..2eb7e73451d 100644 --- a/relay-ourlogs/src/ourlog.rs +++ b/relay-ourlogs/src/ourlog.rs @@ -664,6 +664,7 @@ mod tests { let mut ourlog = Annotated::new(OurLog { timestamp: Annotated::new(Timestamp(datetime)), attributes: Annotated::new(attributes), + body: Annotated::new("somebody".into()), ..Default::default() }); ourlog_merge_otel(&mut ourlog); @@ -683,7 +684,7 @@ mod tests { trace_id: ~, span_id: ~, level: ~, - body: ~, + body: "somebody", attributes: { "foo": OurLogAttribute { value: String( @@ -694,7 +695,7 @@ mod tests { }, "sentry.body": OurLogAttribute { value: String( - "", + "somebody", ), type: String, other: {}, @@ -731,14 +732,19 @@ mod tests { } "#); - insta::assert_json_snapshot!(SerializableAnnotated(&ourlog), @r###" + insta::assert_json_snapshot!(SerializableAnnotated(&ourlog), @r#" { "timestamp": 1638144000.0, + "body": "somebody", "attributes": { "foo": { "type": "string", "value": "9" }, + "sentry.body": { + "type": "string", + "value": "somebody" + }, "sentry.severity_number": { "type": "integer", "value": 0 @@ -753,6 +759,6 @@ mod tests { "severity_text": "info", "timestamp_nanos": 1638144000000000000 } - "###); + "#); } } From c9fe378022ab30f467395046e61c6fba1f668eb4 Mon Sep 17 00:00:00 2001 From: Pierre Massat Date: Thu, 8 May 2025 07:20:49 -0400 Subject: [PATCH 22/37] Remove another installation of protoc in CI --- .github/workflows/ci.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ff62872fb55..54c8cedd2a9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,11 +37,6 @@ jobs: with: python-version: "3.11" - - name: Install Protoc - uses: arduino/setup-protoc@v3 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - - name: Install Rust Toolchain run: | rustup toolchain install stable --profile minimal --no-self-update From 1e3e6acc066215b95de3f79bb483d4a423751a5b Mon Sep 17 00:00:00 2001 From: Pierre Massat Date: Thu, 8 May 2025 07:37:08 -0400 Subject: [PATCH 23/37] Order crates alphabetically and remove types_generation feature --- Cargo.toml | 28 ++++++++++++++-------------- relay-server/Cargo.toml | 16 ++++++++-------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index d16a3ee8bb4..dd8ab22c854 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,6 +40,7 @@ relay-common = { path = "relay-common" } relay-config = { path = "relay-config" } relay-crash = { path = "relay-crash" } relay-dynamic-config = { path = "relay-dynamic-config" } +relay-event-derive = { path = "relay-event-derive" } relay-event-normalization = { path = "relay-event-normalization" } relay-event-schema = { path = "relay-event-schema" } relay-ffi = { path = "relay-ffi" } @@ -54,6 +55,7 @@ relay-pattern = { path = "relay-pattern" } relay-pii = { path = "relay-pii" } relay-profiling = { path = "relay-profiling" } relay-protocol = { path = "relay-protocol" } +relay-protocol-derive = { path = "relay-protocol-derive" } relay-quotas = { path = "relay-quotas" } relay-redis = { path = "relay-redis" } relay-replays = { path = "relay-replays" } @@ -62,11 +64,9 @@ relay-server = { path = "relay-server" } relay-spans = { path = "relay-spans" } relay-statsd = { path = "relay-statsd" } relay-system = { path = "relay-system" } +relay-test = { path = "relay-test" } relay-threading = { path = "relay-threading" } relay-ua = { path = "relay-ua" } -relay-test = { path = "relay-test" } -relay-protocol-derive = { path = "relay-protocol-derive" } -relay-event-derive = { path = "relay-event-derive" } ahash = "0.8.11" android_trace_log = { version = "0.3.0", features = ["serde"] } @@ -74,11 +74,11 @@ android_trace_log = { version = "0.3.0", features = ["serde"] } # which will increase processing time for transactions massively. # Keep it pinned until it's possible to disable backtrace. anyhow = "=1.0.69" +arc-swap = "1.7.1" +async-trait = "0.1.83" axum = "0.8.1" axum-extra = "0.10.0" axum-server = "0.7.1" -arc-swap = "1.7.1" -async-trait = "0.1.83" backoff = "0.4.0" bindgen = "0.71.1" brotli = "6.0.0" @@ -87,8 +87,8 @@ bytes = "1.10.1" bzip2 = "0.4.4" cadence = "1.5.0" chrono = { version = "0.4.38", default-features = false, features = [ - "std", - "serde", + "std", + "serde", ] } clap = { version = "4.4.18" } clap_complete = "4.1.6" @@ -106,19 +106,19 @@ dynfmt = "0.1.5" ed25519-dalek = "2.1.1" enumset = "1.0.13" flate2 = "1.0.35" +flume = { version = "0.11.1", default-features = false } fnv = "1.0.7" futures = { version = "0.3", default-features = false, features = ["std"] } -flume = { version = "0.11.1", default-features = false } globset = "0.4.15" hash32 = "0.3.1" hashbrown = "0.14.5" hex = "0.4.3" hmac = "0.12.1" hostname = "0.4.0" -human-size = "0.4.3" http = "1.1.0" -hyper-util = { version = "0.1.10", features = ["tokio"] } +human-size = "0.4.3" hyper = "1.5.1" +hyper-util = { version = "0.1.10", features = ["tokio"] } indexmap = "2.2.6" insta = { version = "1.31.0", features = ["json", "redactions", "ron"] } ipnetwork = "0.20.0" @@ -128,8 +128,8 @@ libc = "0.2.167" liblzma = "0.3.5" lru = "0.12.5" maxminddb = "0.24.0" -memchr = "2.7.4" md5 = "0.7.0" +memchr = "2.7.4" mime = "0.3.17" minidump = "0.22.2" multer = "3.1.0" @@ -147,6 +147,7 @@ pretty-hex = "0.4.1" priority-queue = "2.0.3" proc-macro2 = "1.0.92" prost = "0.13.3" +prost-types = "0.13.3" psl = "2.1.65" quote = "1.0.37" rand = "0.8.5" @@ -158,14 +159,13 @@ regex = "1.11.1" regex-lite = "0.1.6" reqwest = "0.12.9" rmp-serde = "1.3.0" +semver = "1.0.23" sentry = "0.36.0" sentry-core = "0.36.0" -sentry-kafka-schemas = { version = "1.3.1", features = ["type_generation"] } +sentry-kafka-schemas = { version = "1.3.1" } sentry-release-parser = { version = "1.3.2", default-features = false } sentry-types = "0.36.0" sentry_protos = "0.2.0" -prost-types = "0.13.3" -semver = "1.0.23" serde = { version = "1.0.215", features = ["derive", "rc"] } serde-transcode = "1.1.1" serde_bytes = "0.11" diff --git a/relay-server/Cargo.toml b/relay-server/Cargo.toml index 28eeb54f28f..1566363382d 100644 --- a/relay-server/Cargo.toml +++ b/relay-server/Cargo.toml @@ -14,10 +14,10 @@ publish = false default = [] processing = [ "dep:minidump", + "dep:prost-types", + "dep:sentry_protos", "dep:symbolic-common", "dep:symbolic-unreal", - "dep:prost-types", - "sentry_protos", "relay-cardinality/redis", "relay-config/processing", "relay-kafka/producer", @@ -33,11 +33,10 @@ workspace = true [dependencies] ahash = { workspace = true } anyhow = { workspace = true } -serde_path_to_error = { workspace = true } +arc-swap = { workspace = true } axum = { workspace = true, features = ["macros", "matched-path", "tracing"] } axum-extra = { workspace = true } axum-server = { workspace = true } -arc-swap = { workspace = true } backoff = { workspace = true } brotli = { workspace = true } bytecount = { workspace = true } @@ -49,6 +48,7 @@ flate2 = { workspace = true } fnv = { workspace = true } futures = { workspace = true, features = ["async-await"] } hashbrown = { workspace = true } +hyper = { workspace = true } hyper-util = { workspace = true } itertools = { workspace = true } json-forensics = { workspace = true } @@ -63,6 +63,7 @@ papaya = { workspace = true } pin-project-lite = { workspace = true } priority-queue = { workspace = true } prost = { workspace = true } +prost-types = { workspace = true, optional = true } rand = { workspace = true } regex = { workspace = true } relay-auth = { workspace = true } @@ -77,9 +78,9 @@ relay-event-schema = { workspace = true } relay-filter = { workspace = true } relay-kafka = { workspace = true, optional = true } relay-log = { workspace = true, features = ["sentry"] } -relay-ourlogs = { workspace = true } relay-metrics = { workspace = true } relay-monitors = { workspace = true } +relay-ourlogs = { workspace = true } relay-pii = { workspace = true } relay-profiling = { workspace = true } relay-protocol = { workspace = true } @@ -98,12 +99,13 @@ reqwest = { workspace = true, features = [ "native-tls-vendored", ] } rmp-serde = { workspace = true } +semver = { workspace = true } sentry = { workspace = true, features = ["tower-http"] } sentry_protos = { workspace = true, optional = true } -prost-types = { workspace = true , optional = true } serde = { workspace = true } serde_bytes = { workspace = true } serde_json = { workspace = true } +serde_path_to_error = { workspace = true } smallvec = { workspace = true, features = ["drain_filter"] } socket2 = { workspace = true } sqlx = { workspace = true, features = [ @@ -138,8 +140,6 @@ tower-http = { workspace = true, default-features = false, features = [ url = { workspace = true, features = ["serde"] } uuid = { workspace = true, features = ["v5"] } zstd = { workspace = true } -semver = { workspace = true } -hyper = { workspace = true } [dev-dependencies] criterion = { workspace = true } From 6dc69a6a6d3a308724d3a72e6c9c69d97c5863a9 Mon Sep 17 00:00:00 2001 From: Pierre Massat Date: Thu, 8 May 2025 07:44:55 -0400 Subject: [PATCH 24/37] Use to_owned() instead of to_string() --- relay-ourlogs/src/ourlog.rs | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/relay-ourlogs/src/ourlog.rs b/relay-ourlogs/src/ourlog.rs index 2eb7e73451d..9424931882a 100644 --- a/relay-ourlogs/src/ourlog.rs +++ b/relay-ourlogs/src/ourlog.rs @@ -70,7 +70,7 @@ pub fn otel_to_sentry_log(otel_log: OtelLog) -> Result { let observed_time_unix_nano = UnixTimestamp::now().as_nanos(); attribute_data.insert( - "sentry.severity_text".to_string(), + "sentry.severity_text".to_owned(), Annotated::new(OurLogAttribute::new( OurLogAttributeType::String, Value::String(severity_text.clone()), @@ -84,35 +84,35 @@ pub fn otel_to_sentry_log(otel_log: OtelLog) -> Result { )), ); attribute_data.insert( - "sentry.timestamp_nanos".to_string(), + "sentry.timestamp_nanos".to_owned(), Annotated::new(OurLogAttribute::new( OurLogAttributeType::String, Value::String(time_unix_nano.to_string()), )), ); attribute_data.insert( - "sentry.observed_timestamp_nanos".to_string(), + "sentry.observed_timestamp_nanos".to_owned(), Annotated::new(OurLogAttribute::new( OurLogAttributeType::String, Value::String(observed_time_unix_nano.to_string()), )), ); attribute_data.insert( - "sentry.trace_flags".to_string(), + "sentry.trace_flags".to_owned(), Annotated::new(OurLogAttribute::new( OurLogAttributeType::Integer, Value::I64(0), )), ); attribute_data.insert( - "sentry.body".to_string(), + "sentry.body".to_owned(), Annotated::new(OurLogAttribute::new( OurLogAttributeType::String, Value::String(body.clone()), )), ); attribute_data.insert( - "sentry.span_id".to_string(), + "sentry.span_id".to_owned(), Annotated::new(OurLogAttribute::new( OurLogAttributeType::String, Value::String(span_id.to_string()), @@ -151,20 +151,20 @@ pub fn otel_to_sentry_log(otel_log: OtelLog) -> Result { let mut other = Object::default(); other.insert( - "severity_text".to_string(), + "severity_text".to_owned(), Annotated::new(Value::String(severity_text)), ); other.insert( - "severity_number".to_string(), + "severity_number".to_owned(), Annotated::new(Value::I64(severity_number as i64)), ); - other.insert("trace_flags".to_string(), Annotated::new(Value::I64(0))); + other.insert("trace_flags".to_owned(), Annotated::new(Value::I64(0))); other.insert( - "timestamp_nanos".to_string(), + "timestamp_nanos".to_owned(), Annotated::new(Value::U64(otel_log.time_unix_nano)), ); other.insert( - "observed_timestamp_nanos".to_string(), + "observed_timestamp_nanos".to_owned(), Annotated::new(Value::U64(observed_time_unix_nano)), ); @@ -215,7 +215,7 @@ pub fn ourlog_merge_otel(ourlog: &mut Annotated) { )), ); attributes.insert( - "sentry.body".to_string(), + "sentry.body".to_owned(), Annotated::new(OurLogAttribute::new( OurLogAttributeType::String, Value::String(ourlog_value.body.value().cloned().unwrap_or_default()), @@ -224,7 +224,7 @@ pub fn ourlog_merge_otel(ourlog: &mut Annotated) { if let Some(span_id) = ourlog_value.span_id.value() { attributes.insert( - "sentry.span_id".to_string(), + "sentry.span_id".to_owned(), Annotated::new(OurLogAttribute::new( OurLogAttributeType::String, Value::String(span_id.to_string()), @@ -554,7 +554,7 @@ mod tests { if let Some(log) = merged_log.value_mut() { log.other.insert( - "observed_timestamp_nanos".to_string(), + "observed_timestamp_nanos".to_owned(), Annotated::new(Value::U64(1742481864000000000)), ); } @@ -654,10 +654,10 @@ mod tests { fn ourlog_merge_otel_log_with_timestamp() { let mut attributes = Object::new(); attributes.insert( - "foo".to_string(), + "foo".to_owned(), Annotated::new(OurLogAttribute::new( OurLogAttributeType::String, - Value::String("9".to_string()), + Value::String("9".to_owned()), )), ); let datetime = Utc.with_ymd_and_hms(2021, 11, 29, 0, 0, 0).unwrap(); @@ -671,7 +671,7 @@ mod tests { if let Some(log) = ourlog.value_mut() { log.other.insert( - "observed_timestamp_nanos".to_string(), + "observed_timestamp_nanos".to_owned(), Annotated::new(Value::U64(1742481864000000000)), ); } From 387b59f170ee881d7c0e302ecd061b892f19b39a Mon Sep 17 00:00:00 2001 From: Pierre Massat Date: Thu, 8 May 2025 08:31:12 -0400 Subject: [PATCH 25/37] Disable default features again now the crate is fixed --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 68ef4726584..58ce74baca1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4642,9 +4642,9 @@ dependencies = [ [[package]] name = "sentry-kafka-schemas" -version = "1.3.1" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b46efdf9bbf8a44d6942aee9214e4fc88867a70235c6bd2c4db57c1acac59c43" +checksum = "842b40ed84708cfdf5f5c634f9acca18918f6ff7af34b688fe8ebeb5d4a0fa19" dependencies = [ "jsonschema", "prettyplease", diff --git a/Cargo.toml b/Cargo.toml index dd8ab22c854..af288b399e7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -162,7 +162,7 @@ rmp-serde = "1.3.0" semver = "1.0.23" sentry = "0.36.0" sentry-core = "0.36.0" -sentry-kafka-schemas = { version = "1.3.1" } +sentry-kafka-schemas = { version = "1.3.2", default-features = false } sentry-release-parser = { version = "1.3.2", default-features = false } sentry-types = "0.36.0" sentry_protos = "0.2.0" From 02f7c1a17cff285897b928752ecbcfe78b560368 Mon Sep 17 00:00:00 2001 From: Pierre Massat Date: Thu, 8 May 2025 08:34:31 -0400 Subject: [PATCH 26/37] Really disable default features for sentry-kafka-schemas --- Cargo.lock | 123 +---------------------------------------- relay-kafka/Cargo.toml | 2 +- 2 files changed, 4 insertions(+), 121 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 58ce74baca1..190ff55ef94 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -747,7 +747,7 @@ version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" dependencies = [ - "heck 0.5.0", + "heck", "proc-macro2", "quote", "syn", @@ -1196,12 +1196,6 @@ version = "0.15.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" -[[package]] -name = "dyn-clone" -version = "1.0.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c7a8fb8a9fbf66c1f703fe16184d10ca0ee9d23be5b4436400408ba54a95005" - [[package]] name = "dynfmt" version = "0.1.5" @@ -1280,7 +1274,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1e6a265c649f3f5979b601d26f1d05ada116434c87741c9493cb56218f76cbc" dependencies = [ - "heck 0.5.0", + "heck", "proc-macro2", "quote", "syn", @@ -1690,12 +1684,6 @@ dependencies = [ "hashbrown 0.14.5", ] -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" - [[package]] name = "heck" version = "0.5.0" @@ -3524,16 +3512,6 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" -[[package]] -name = "regress" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f5f39ba4513916c1b2657b72af6ec671f091cd637992f58d0ede5cae4e5dea0" -dependencies = [ - "hashbrown 0.14.5", - "memchr", -] - [[package]] name = "relay" version = "25.4.0" @@ -4471,30 +4449,6 @@ dependencies = [ "parking_lot", ] -[[package]] -name = "schemars" -version = "0.8.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fbf2ae1b8bc8e02df939598064d22402220cd5bbcca1c76f7d6a310974d5615" -dependencies = [ - "dyn-clone", - "schemars_derive", - "serde", - "serde_json", -] - -[[package]] -name = "schemars_derive" -version = "0.8.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32e265784ad618884abaea0600a9adf15393368d840e0222d101a072f3f7534d" -dependencies = [ - "proc-macro2", - "quote", - "serde_derive_internals", - "syn", -] - [[package]] name = "scopeguard" version = "1.2.0" @@ -4647,16 +4601,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "842b40ed84708cfdf5f5c634f9acca18918f6ff7af34b688fe8ebeb5d4a0fa19" dependencies = [ "jsonschema", - "prettyplease", "prost", - "schemars", "sentry_protos", "serde", "serde_json", "serde_yaml", - "syn", "thiserror 1.0.69", - "typify", "url", ] @@ -4774,17 +4724,6 @@ dependencies = [ "syn", ] -[[package]] -name = "serde_derive_internals" -version = "0.29.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "serde_json" version = "1.0.133" @@ -4816,18 +4755,6 @@ dependencies = [ "serde", ] -[[package]] -name = "serde_tokenstream" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64060d864397305347a78851c51588fd283767e7e7589829e8121d65512340f1" -dependencies = [ - "proc-macro2", - "quote", - "serde", - "syn", -] - [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -5109,7 +5036,7 @@ checksum = "1804e8a7c7865599c9c79be146dc8a9fd8cc86935fa641d3ea58e5f0688abaa5" dependencies = [ "dotenvy", "either", - "heck 0.5.0", + "heck", "hex", "once_cell", "proc-macro2", @@ -5818,50 +5745,6 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" -[[package]] -name = "typify" -version = "0.0.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c61e9db210bbff218e6535c664b37ec47da449169b98e7866d0580d0db75529" -dependencies = [ - "typify-impl", - "typify-macro", -] - -[[package]] -name = "typify-impl" -version = "0.0.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95e32f38493804f88e2dc7a5412eccd872ea5452b4db9b0a77de4df180f2a87e" -dependencies = [ - "heck 0.4.1", - "log", - "proc-macro2", - "quote", - "regress", - "schemars", - "serde_json", - "syn", - "thiserror 1.0.69", - "unicode-ident", -] - -[[package]] -name = "typify-macro" -version = "0.0.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc09508b72f63d521d68e42c7f172c7416d67986df44b3c7d1f7f9963948ed32" -dependencies = [ - "proc-macro2", - "quote", - "schemars", - "serde", - "serde_json", - "serde_tokenstream", - "syn", - "typify-impl", -] - [[package]] name = "uaparser" version = "0.6.4" diff --git a/relay-kafka/Cargo.toml b/relay-kafka/Cargo.toml index 9910af2411c..6b0e70002de 100644 --- a/relay-kafka/Cargo.toml +++ b/relay-kafka/Cargo.toml @@ -21,7 +21,7 @@ rmp-serde = { workspace = true, optional = true } serde = { workspace = true } serde_json = { workspace = true, optional = true } thiserror = { workspace = true } -sentry-kafka-schemas = { workspace = true, optional = true , features = ["type_generation"]} +sentry-kafka-schemas = { workspace = true, optional = true } [dev-dependencies] serde_yaml = { workspace = true } From cf2475bb5b76a6956dd60365ab9b13b4e2df3a43 Mon Sep 17 00:00:00 2001 From: Pierre Massat Date: Thu, 8 May 2025 08:43:34 -0400 Subject: [PATCH 27/37] Can't make it with less default features than this --- relay-kafka/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/relay-kafka/Cargo.toml b/relay-kafka/Cargo.toml index 6b0e70002de..48aec5ca9ea 100644 --- a/relay-kafka/Cargo.toml +++ b/relay-kafka/Cargo.toml @@ -21,11 +21,11 @@ rmp-serde = { workspace = true, optional = true } serde = { workspace = true } serde_json = { workspace = true, optional = true } thiserror = { workspace = true } -sentry-kafka-schemas = { workspace = true, optional = true } +sentry-kafka-schemas = { workspace = true, default-features = false, optional = true } [dev-dependencies] serde_yaml = { workspace = true } -sentry-kafka-schemas = { workspace = true } +sentry-kafka-schemas = { workspace = true, default-features = false } [features] default = [] From abc0f44fabc80b6045cbf11e3322c796b49781ed Mon Sep 17 00:00:00 2001 From: Pierre Massat Date: Thu, 8 May 2025 09:37:37 -0400 Subject: [PATCH 28/37] Remove Serialization trait for logs --- relay-server/src/services/store.rs | 101 +++-------------------------- 1 file changed, 8 insertions(+), 93 deletions(-) diff --git a/relay-server/src/services/store.rs b/relay-server/src/services/store.rs index ba1416cdb73..c34cfd8e65b 100644 --- a/relay-server/src/services/store.rs +++ b/relay-server/src/services/store.rs @@ -1216,66 +1216,6 @@ where m.end() } -fn serialize_log_attributes( - map: &Option>>, - serializer: S, -) -> Result -where - S: serde::Serializer, -{ - let Some(map) = map else { - return serializer.serialize_none(); - }; - let mut m = serializer.serialize_map(Some(map.len()))?; - for (key, value) in map.iter() { - if let Some(value) = value { - if let Some(LogAttributeValue::Unknown(_)) = value.value { - continue; - } - m.serialize_entry(key, value)?; - } - } - m.end() -} - -/** - * This shouldn't be necessary with enum serialization, but since serde's tag doesn't work with `type` as it has to be renamed due to being a keyword, - * this allows us to not emit the 'type' field, which would otherwise break the ourlogs consumer. - */ -fn serialize_log_attribute_value( - attr: &Option, - serializer: S, -) -> Result -where - S: serde::Serializer, -{ - let Some(attr) = attr else { - return serializer.serialize_none(); - }; - - if let LogAttributeValue::Unknown(_) = attr { - return serializer.serialize_none(); - } - - let mut map = serializer.serialize_map(Some(1))?; - match attr { - LogAttributeValue::String(value) => { - map.serialize_entry("string_value", value)?; - } - LogAttributeValue::Int(value) => { - map.serialize_entry("int_value", value)?; - } - LogAttributeValue::Bool(value) => { - map.serialize_entry("bool_value", value)?; - } - LogAttributeValue::Double(value) => { - map.serialize_entry("double_value", value)?; - } - LogAttributeValue::Unknown(_) => (), - } - map.end() -} - /// Container payload for event messages. #[derive(Debug, Serialize)] struct EventKafkaMessage { @@ -1549,7 +1489,7 @@ struct SpanKafkaMessage<'a> { _performance_issues_spans: Option, } -#[derive(Clone, Debug, Serialize, Deserialize)] +#[derive(Clone, Debug, Deserialize)] #[serde(tag = "type", content = "value")] enum LogAttributeValue { #[serde(rename = "string")] @@ -1561,55 +1501,30 @@ enum LogAttributeValue { #[serde(rename = "double")] Double(f64), #[serde(rename = "unknown")] - Unknown(String), + Unknown(()), } /// This is a temporary struct to convert the old attribute format to the new one. -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Deserialize)] #[allow(dead_code)] struct LogAttribute { - #[serde(flatten, serialize_with = "serialize_log_attribute_value")] + #[serde(flatten)] value: Option, } -#[derive(Debug, Deserialize, Serialize)] +#[derive(Debug, Deserialize)] struct LogKafkaMessages<'a> { #[serde(borrow)] items: Vec>, } -#[derive(Debug, Deserialize, Serialize)] +#[derive(Debug, Deserialize)] struct LogKafkaMessage<'a> { - #[serde(default)] - organization_id: u64, - #[serde(default)] - project_id: u64, + trace_id: EventId, #[serde(default)] timestamp_nanos: u64, - #[serde(default)] - observed_timestamp_nanos: u64, - #[serde(default)] - retention_days: u16, - #[serde(default)] - received: u64, - #[serde(default)] - body: Cow<'a, str>, - - trace_id: EventId, - #[serde(default, skip_serializing_if = "Option::is_none")] - span_id: Option<&'a str>, - #[serde(borrow, default, skip_serializing_if = "Option::is_none")] - severity_text: Option>, - #[serde(default, skip_serializing_if = "Option::is_none")] - severity_number: Option, - #[serde( - default, - skip_serializing_if = "Option::is_none", - serialize_with = "serialize_log_attributes" - )] + #[serde(borrow, default)] attributes: Option>>, - #[serde(default, skip_serializing_if = "Option::is_none")] - trace_flags: Option, } fn none_or_empty_object(value: &Option<&RawValue>) -> bool { From 79ed8921fdea349532f820b9e8909a2fde88a0f8 Mon Sep 17 00:00:00 2001 From: Pierre Massat Date: Thu, 8 May 2025 09:46:38 -0400 Subject: [PATCH 29/37] Move Protobuf encoding to serialize --- relay-kafka/src/producer/mod.rs | 5 +++++ relay-server/src/services/store.rs | 23 ++++++++++++----------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/relay-kafka/src/producer/mod.rs b/relay-kafka/src/producer/mod.rs index 6bc18a23ccb..cdd9a630e09 100644 --- a/relay-kafka/src/producer/mod.rs +++ b/relay-kafka/src/producer/mod.rs @@ -64,6 +64,11 @@ pub enum ClientError { /// Failed to validate the topic. #[error("failed to validate the topic with name {0}: {1:?}")] TopicError(String, rdkafka_sys::rd_kafka_resp_err_t), + + /// Failed to encode the protobuf into the buffer + /// because the buffer is too small. + #[error("failed to encode protobuf because the buffer is too small")] + ProtobufEncodingFailed, } /// Describes the type which can be sent using kafka producer provided by this crate. diff --git a/relay-server/src/services/store.rs b/relay-server/src/services/store.rs index c34cfd8e65b..8dc6b9fe841 100644 --- a/relay-server/src/services/store.rs +++ b/relay-server/src/services/store.rs @@ -56,8 +56,6 @@ pub enum StoreError { EncodingFailed(std::io::Error), #[error("failed to store event because event id was missing")] NoEventId, - #[error("failed to encode protobuf because the buffer is too small")] - ProtobufEncodingFailed, } struct Producer { @@ -1056,12 +1054,6 @@ impl StoreService { } } - let mut message = Vec::new(); - - if trace_item.encode(&mut message).is_err() { - return Err(StoreError::ProtobufEncodingFailed); - } - let message = KafkaMessage::Log { headers: BTreeMap::from([ ("project_id".to_string(), scoping.project_id.to_string()), @@ -1070,7 +1062,7 @@ impl StoreService { TraceItemType::Log.as_str_name().to_string(), ), ]), - message, + message: trace_item, }; self.produce(KafkaTopic::Items, message)?; @@ -1577,7 +1569,8 @@ enum KafkaMessage<'a> { }, Log { headers: BTreeMap, - message: Vec, + #[serde(skip)] + message: TraceItem, }, ProfileChunk(ProfileChunkKafkaMessage), } @@ -1680,7 +1673,15 @@ impl Message for KafkaMessage<'_> { KafkaMessage::Span { message, .. } => serde_json::to_vec(message) .map(Cow::Owned) .map_err(ClientError::InvalidJson), - KafkaMessage::Log { message, .. } => Ok(Cow::Borrowed(message)), + KafkaMessage::Log { message, .. } => { + let mut payload = Vec::new(); + + if message.encode(&mut payload).is_err() { + return Err(ClientError::ProtobufEncodingFailed); + } + + Ok(Cow::Owned(payload)) + } _ => rmp_serde::to_vec_named(&self) .map(Cow::Owned) .map_err(ClientError::InvalidMsgPack), From b7eb2b64ebbc317fc1db57fde278ef512a7d03da Mon Sep 17 00:00:00 2001 From: Pierre Massat Date: Thu, 8 May 2025 09:46:48 -0400 Subject: [PATCH 30/37] Use to_owned() instead of to_string() where we can --- relay-server/src/services/store.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/relay-server/src/services/store.rs b/relay-server/src/services/store.rs index 8dc6b9fe841..57f3552bde2 100644 --- a/relay-server/src/services/store.rs +++ b/relay-server/src/services/store.rs @@ -1056,10 +1056,10 @@ impl StoreService { let message = KafkaMessage::Log { headers: BTreeMap::from([ - ("project_id".to_string(), scoping.project_id.to_string()), + ("project_id".to_owned(), scoping.project_id.to_string()), ( - "item_type".to_string(), - TraceItemType::Log.as_str_name().to_string(), + "item_type".to_owned(), + TraceItemType::Log.as_str_name().to_owned(), ), ]), message: trace_item, From b00ab99fe6b31268c0441377662c55a28ec14053 Mon Sep 17 00:00:00 2001 From: Pierre Massat Date: Thu, 8 May 2025 09:50:56 -0400 Subject: [PATCH 31/37] Remove nanoseconds from this timestamp --- relay-server/src/services/store.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/relay-server/src/services/store.rs b/relay-server/src/services/store.rs index 57f3552bde2..a3352ba5b68 100644 --- a/relay-server/src/services/store.rs +++ b/relay-server/src/services/store.rs @@ -1005,18 +1005,13 @@ impl StoreService { ) .to_le_bytes() .to_vec(); - let received_nanos = if let Some(received) = received_at.timestamp_nanos_opt() { - received % 1_000_000_000 - } else { - 0 - }; let mut trace_item = TraceItem { item_type: TraceItemType::Log.into(), organization_id: scoping.organization_id.value(), project_id: scoping.project_id.value(), received: Some(Timestamp { seconds: safe_timestamp(received_at) as i64, - nanos: received_nanos as i32, + nanos: 0, }), retention_days: retention_days.into(), timestamp: Some(Timestamp { From ba2fdeb771ffe345cb14955b92c87fffbbf5a027 Mon Sep 17 00:00:00 2001 From: Pierre Massat Date: Thu, 8 May 2025 11:24:09 -0400 Subject: [PATCH 32/37] Remove other and add back sentry.timestamp_precise --- relay-ourlogs/src/ourlog.rs | 124 ++++++++---------------------------- 1 file changed, 28 insertions(+), 96 deletions(-) diff --git a/relay-ourlogs/src/ourlog.rs b/relay-ourlogs/src/ourlog.rs index 9424931882a..e4d6a34a3b9 100644 --- a/relay-ourlogs/src/ourlog.rs +++ b/relay-ourlogs/src/ourlog.rs @@ -52,8 +52,7 @@ pub fn otel_to_sentry_log(otel_log: OtelLog) -> Result { let span_id = SpanId(hex::encode(span_id)); let trace_id: TraceId = hex::encode(trace_id).parse()?; - let nanos = time_unix_nano; - let timestamp = Utc.timestamp_nanos(nanos as i64); + let timestamp = Utc.timestamp_nanos(time_unix_nano as i64); let body = body .and_then(|v| v.value) @@ -90,6 +89,13 @@ pub fn otel_to_sentry_log(otel_log: OtelLog) -> Result { Value::String(time_unix_nano.to_string()), )), ); + attribute_data.insert( + "sentry.timestamp_precise".to_owned(), + Annotated::new(OurLogAttribute::new( + OurLogAttributeType::Integer, + Value::I64(time_unix_nano as i64), + )), + ); attribute_data.insert( "sentry.observed_timestamp_nanos".to_owned(), Annotated::new(OurLogAttribute::new( @@ -148,26 +154,6 @@ pub fn otel_to_sentry_log(otel_log: OtelLog) -> Result { _ => OurLogLevel::Info, }, }; - - let mut other = Object::default(); - other.insert( - "severity_text".to_owned(), - Annotated::new(Value::String(severity_text)), - ); - other.insert( - "severity_number".to_owned(), - Annotated::new(Value::I64(severity_number as i64)), - ); - other.insert("trace_flags".to_owned(), Annotated::new(Value::I64(0))); - other.insert( - "timestamp_nanos".to_owned(), - Annotated::new(Value::U64(otel_log.time_unix_nano)), - ); - other.insert( - "observed_timestamp_nanos".to_owned(), - Annotated::new(Value::U64(observed_time_unix_nano)), - ); - let ourlog = OurLog { timestamp: Annotated::new(Timestamp(timestamp)), trace_id: Annotated::new(trace_id), @@ -175,23 +161,38 @@ pub fn otel_to_sentry_log(otel_log: OtelLog) -> Result { level: Annotated::new(level), attributes: Annotated::new(attribute_data), body: Annotated::new(body), - other, + other: Object::default(), }; Ok(ourlog) } /// This fills attributes with OTel specific fields to be compatible with the otel schema. -/// -/// This also currently backfills data into deprecated fields (other) on the OurLog protocol in order to continue working with the snuba consumers. -/// -/// This will need to transform all fields into attributes to be ported to using the generic trace items consumers once they're done. pub fn ourlog_merge_otel(ourlog: &mut Annotated) { let Some(ourlog_value) = ourlog.value_mut() else { return; }; let attributes = ourlog_value.attributes.value_mut().get_or_insert_default(); + + attributes.insert( + "sentry.timestamp_precise".to_owned(), + Annotated::new(OurLogAttribute::new( + OurLogAttributeType::Integer, + Value::I64( + ourlog_value + .timestamp + .value() + .map(|timestamp| { + timestamp + .into_inner() + .timestamp_nanos_opt() + .unwrap_or_default() + }) + .unwrap_or_default(), + ), + )), + ); attributes.insert( "sentry.severity_number".to_owned(), Annotated::new(OurLogAttribute::new( @@ -231,75 +232,6 @@ pub fn ourlog_merge_otel(ourlog: &mut Annotated) { )), ); } - - if let Some(value) = ourlog_value - .attribute("sentry.severity_text") - .and_then(|v| v.as_str()) - { - ourlog_value.other.insert( - "severity_text".to_owned(), - Annotated::new(Value::String(value.to_owned())), - ); - } - - if let Some(value) = ourlog_value - .attribute("sentry.severity_number") - .and_then(|v| v.value()) - { - ourlog_value - .other - .insert("severity_number".to_owned(), Annotated::new(value.clone())); - } - - if let Some(value) = ourlog_value - .attribute("sentry.trace_flags") - .and_then(|v| v.value()) - { - ourlog_value - .other - .insert("trace_flags".to_owned(), Annotated::new(value.clone())); - } - - if let Some(value) = ourlog_value - .attribute("sentry.observed_timestamp_nanos") - .and_then(|v| v.as_str()) - .and_then(|v| v.parse().ok()) - { - ourlog_value.other.insert( - "observed_timestamp_nanos".to_owned(), - Annotated::new(Value::U64(value)), - ); - } - - if let Some(value) = ourlog_value - .attribute("sentry.timestamp_nanos") - .and_then(|v| v.as_str()) - .and_then(|v| v.parse().ok()) - { - ourlog_value.other.insert( - "timestamp_nanos".to_owned(), - Annotated::new(Value::U64(value)), - ); - } - - // We ignore the passed observed time since Relay always acts as the collector in Sentry. - // We may change this in the future with forwarding Relays. - let observed_time_unix_nano = UnixTimestamp::now().as_nanos(); - ourlog_value.other.insert( - "observed_timestamp_nanos".to_owned(), - Annotated::new(Value::U64(observed_time_unix_nano)), - ); - - if let Some(timestamp_nanos) = ourlog_value - .timestamp - .value() - .and_then(|timestamp| timestamp.0.timestamp_nanos_opt()) - { - ourlog_value.other.insert( - "timestamp_nanos".to_owned(), - Annotated::new(Value::U64(timestamp_nanos as u64)), - ); - } } fn level_to_otel_severity_number(level: Option) -> i64 { From 0d25ca74d0d40780fea6a9ada8206bed5de83434 Mon Sep 17 00:00:00 2001 From: Pierre Massat Date: Thu, 8 May 2025 11:31:52 -0400 Subject: [PATCH 33/37] Fix tests --- relay-ourlogs/src/ourlog.rs | 80 ++++++++++++++----------------------- 1 file changed, 31 insertions(+), 49 deletions(-) diff --git a/relay-ourlogs/src/ourlog.rs b/relay-ourlogs/src/ourlog.rs index e4d6a34a3b9..483ce9e77a6 100644 --- a/relay-ourlogs/src/ourlog.rs +++ b/relay-ourlogs/src/ourlog.rs @@ -484,13 +484,6 @@ mod tests { let mut merged_log = Annotated::::from_json(json).unwrap(); ourlog_merge_otel(&mut merged_log); - if let Some(log) = merged_log.value_mut() { - log.other.insert( - "observed_timestamp_nanos".to_owned(), - Annotated::new(Value::U64(1742481864000000000)), - ); - } - insta::assert_debug_snapshot!(merged_log, @r#" OurLog { timestamp: Timestamp( @@ -538,21 +531,15 @@ mod tests { type: String, other: {}, }, + "sentry.timestamp_precise": OurLogAttribute { + value: I64( + 946684800000000000, + ), + type: Integer, + other: {}, + }, }, - other: { - "observed_timestamp_nanos": U64( - 1742481864000000000, - ), - "severity_number": I64( - 9, - ), - "severity_text": String( - "info", - ), - "timestamp_nanos": U64( - 946684800000000000, - ), - }, + other: {}, } "#); } @@ -576,8 +563,16 @@ mod tests { let mut data = Annotated::::from_json(json).unwrap(); ourlog_merge_otel(&mut data); assert_eq!( - data.value().unwrap().other.get("severity_number"), - Some(&Annotated::new(Value::I64(0))) + data.value() + .unwrap() + .attributes + .value() + .unwrap() + .get("sentry.severity_number") + .unwrap() + .value() + .unwrap(), + &OurLogAttribute::new(OurLogAttributeType::Integer, Value::I64(0)), ); } @@ -601,13 +596,6 @@ mod tests { }); ourlog_merge_otel(&mut ourlog); - if let Some(log) = ourlog.value_mut() { - log.other.insert( - "observed_timestamp_nanos".to_owned(), - Annotated::new(Value::U64(1742481864000000000)), - ); - } - insta::assert_debug_snapshot!(ourlog, @r#" OurLog { timestamp: Timestamp( @@ -646,21 +634,15 @@ mod tests { type: String, other: {}, }, + "sentry.timestamp_precise": OurLogAttribute { + value: I64( + 1638144000000000000, + ), + type: Integer, + other: {}, + }, }, - other: { - "observed_timestamp_nanos": U64( - 1742481864000000000, - ), - "severity_number": I64( - 0, - ), - "severity_text": String( - "info", - ), - "timestamp_nanos": U64( - 1638144000000000000, - ), - }, + other: {}, } "#); @@ -684,12 +666,12 @@ mod tests { "sentry.severity_text": { "type": "string", "value": "info" + }, + "sentry.timestamp_precise": { + "type": "integer", + "value": 1638144000000000000 } - }, - "observed_timestamp_nanos": 1742481864000000000, - "severity_number": 0, - "severity_text": "info", - "timestamp_nanos": 1638144000000000000 + } } "#); } From 33ae11fb31b9c485d1ee58f1ad3b7886681d93dd Mon Sep 17 00:00:00 2001 From: Pierre Massat Date: Fri, 9 May 2025 11:04:33 -0400 Subject: [PATCH 34/37] Fix integration tests --- relay-ourlogs/src/ourlog.rs | 64 ++++++++++------- relay-server/src/services/store.rs | 19 +++--- tests/integration/test_ourlogs.py | 106 +++++++++++++++-------------- 3 files changed, 104 insertions(+), 85 deletions(-) diff --git a/relay-ourlogs/src/ourlog.rs b/relay-ourlogs/src/ourlog.rs index 483ce9e77a6..11e94972e21 100644 --- a/relay-ourlogs/src/ourlog.rs +++ b/relay-ourlogs/src/ourlog.rs @@ -3,6 +3,7 @@ use opentelemetry_proto::tonic::common::v1::any_value::Value as OtelValue; use crate::OtelLog; use relay_common::time::UnixTimestamp; +use relay_event_schema::protocol::datetime_to_timestamp; use relay_event_schema::protocol::{ OurLog, OurLogAttribute, OurLogAttributeType, OurLogLevel, SpanId, Timestamp, TraceId, }; @@ -49,11 +50,9 @@ pub fn otel_to_sentry_log(otel_log: OtelLog) -> Result { time_unix_nano, .. } = otel_log; - let span_id = SpanId(hex::encode(span_id)); let trace_id: TraceId = hex::encode(trace_id).parse()?; let timestamp = Utc.timestamp_nanos(time_unix_nano as i64); - let body = body .and_then(|v| v.value) .and_then(|v| match v { @@ -62,11 +61,10 @@ pub fn otel_to_sentry_log(otel_log: OtelLog) -> Result { }) .unwrap_or_else(String::new); - let mut attribute_data = Object::new(); - // We ignore the passed observed time since Relay always acts as the collector in Sentry. // We may change this in the future with forwarding Relays. let observed_time_unix_nano = UnixTimestamp::now().as_nanos(); + let mut attribute_data = Object::new(); attribute_data.insert( "sentry.severity_text".to_owned(), @@ -172,24 +170,27 @@ pub fn ourlog_merge_otel(ourlog: &mut Annotated) { let Some(ourlog_value) = ourlog.value_mut() else { return; }; - let attributes = ourlog_value.attributes.value_mut().get_or_insert_default(); + // We can only extract microseconds as the conversion from float to Timestamp + // messes up with the precision and nanoseconds are never preserved. + let timestamp_nanos = ourlog_value + .timestamp + .value() + .map(|timestamp| { + ((datetime_to_timestamp(timestamp.into_inner()) * 1e6).round() as i64) * 1000 + }) + .unwrap_or_default(); attributes.insert( - "sentry.timestamp_precise".to_owned(), + "sentry.severity_text".to_owned(), Annotated::new(OurLogAttribute::new( - OurLogAttributeType::Integer, - Value::I64( + OurLogAttributeType::String, + Value::String( ourlog_value - .timestamp + .level .value() - .map(|timestamp| { - timestamp - .into_inner() - .timestamp_nanos_opt() - .unwrap_or_default() - }) - .unwrap_or_default(), + .map(|level| level.to_string()) + .unwrap_or_else(|| "info".to_owned()), ), )), ); @@ -203,16 +204,31 @@ pub fn ourlog_merge_otel(ourlog: &mut Annotated) { )), ); attributes.insert( - "sentry.severity_text".to_owned(), + "sentry.timestamp_nanos".to_owned(), Annotated::new(OurLogAttribute::new( OurLogAttributeType::String, - Value::String( - ourlog_value - .level - .value() - .map(|level| level.to_string()) - .unwrap_or_else(|| "info".to_owned()), - ), + Value::String(timestamp_nanos.to_string()), + )), + ); + attributes.insert( + "sentry.timestamp_precise".to_owned(), + Annotated::new(OurLogAttribute::new( + OurLogAttributeType::Integer, + Value::I64(timestamp_nanos), + )), + ); + attributes.insert( + "sentry.observed_timestamp_nanos".to_owned(), + Annotated::new(OurLogAttribute::new( + OurLogAttributeType::String, + Value::String(timestamp_nanos.to_string()), + )), + ); + attributes.insert( + "sentry.trace_flags".to_owned(), + Annotated::new(OurLogAttribute::new( + OurLogAttributeType::Integer, + Value::I64(0), )), ); attributes.insert( diff --git a/relay-server/src/services/store.rs b/relay-server/src/services/store.rs index a3352ba5b68..9b425994ee9 100644 --- a/relay-server/src/services/store.rs +++ b/relay-server/src/services/store.rs @@ -959,9 +959,8 @@ impl StoreService { item: &Item, ) -> Result<(), StoreError> { relay_log::trace!("Producing log"); - let payload = item.payload(); - let payload_len = payload.len(); + let payload = item.payload(); let d = &mut Deserializer::from_slice(&payload); let logs: LogKafkaMessages = match serde_path_to_error::deserialize(d) { Ok(logs) => logs, @@ -993,13 +992,13 @@ impl StoreService { }; for log in logs.items { - let timestamp_seconds = log.timestamp_nanos / 1_000_000_000; - let timestamp_nanos = log.timestamp_nanos % 1_000_000_000; + let timestamp_seconds = log.timestamp as i64; + let timestamp_nanos = (log.timestamp.fract() * 1e9) as u32; let item_id = u128::from_be_bytes( *Uuid::new_v7(uuid::Timestamp::from_unix( uuid::NoContext, - timestamp_seconds, - timestamp_nanos as u32, + timestamp_seconds as u64, + timestamp_nanos, )) .as_bytes(), ) @@ -1015,8 +1014,8 @@ impl StoreService { }), retention_days: retention_days.into(), timestamp: Some(Timestamp { - seconds: timestamp_seconds as i64, - nanos: timestamp_nanos as i32, + seconds: timestamp_seconds, + nanos: 0, }), trace_id: log.trace_id.to_string(), item_id, @@ -1076,7 +1075,7 @@ impl StoreService { category: DataCategory::LogByte, event_id: None, outcome: Outcome::Accepted, - quantity: payload_len as u32, + quantity: payload.len() as u32, remote_addr: None, scoping, timestamp: received_at, @@ -1509,7 +1508,7 @@ struct LogKafkaMessages<'a> { struct LogKafkaMessage<'a> { trace_id: EventId, #[serde(default)] - timestamp_nanos: u64, + timestamp: f64, #[serde(borrow, default)] attributes: Option>>, } diff --git a/tests/integration/test_ourlogs.py b/tests/integration/test_ourlogs.py index 5cb5f5d9bce..b42b06d22f7 100644 --- a/tests/integration/test_ourlogs.py +++ b/tests/integration/test_ourlogs.py @@ -1,7 +1,7 @@ import json import base64 -from datetime import datetime, timedelta, timezone +from datetime import datetime, timezone from sentry_sdk.envelope import Envelope, Item, PayloadRef from sentry_relay.consts import DataCategory @@ -35,16 +35,17 @@ def envelope_with_sentry_logs(*payloads: dict) -> Envelope: return envelope -def envelope_with_otel_logs(start: datetime) -> Envelope: +def envelope_with_otel_logs(timestamp_nanos: str) -> Envelope: envelope = Envelope() + envelope.add_item( Item( type="otel_log", payload=PayloadRef( bytes=json.dumps( { - "timeUnixNano": str(int(start.timestamp() * 1e9)), - "observedTimeUnixNano": str(int(start.timestamp() * 1e9)), + "timeUnixNano": timestamp_nanos, + "observedTimeUnixNano": timestamp_nanos, "severityNumber": 10, "severityText": "Information", "traceId": "5B8EFFF798038103D269B633813FC60C", @@ -67,6 +68,7 @@ def envelope_with_otel_logs(start: datetime) -> Envelope: ), ) ) + return envelope @@ -81,22 +83,17 @@ def test_ourlog_extraction_with_otel_logs( project_config["config"]["features"] = [ "organizations:ourlogs-ingestion", ] - relay = relay_with_processing(options=TEST_CONFIG) - start = datetime.now(timezone.utc) + timestamp = start.timestamp() + timestamp_nanos = int(timestamp * 1e9) + envelope = envelope_with_otel_logs(str(timestamp_nanos)) - duration = timedelta(milliseconds=500) - now = datetime.now(timezone.utc) - end = now - timedelta(seconds=1) - start = end - duration - - envelope = envelope_with_otel_logs(start) relay.send_envelope(project_id, envelope) - timestamp_nanos = round(start.timestamp() * 1e9) timestamp_proto = Timestamp() - timestamp_proto.FromNanoseconds(timestamp_nanos) + + timestamp_proto.FromSeconds(int(timestamp)) expected_logs = [ MessageToDict( @@ -115,7 +112,6 @@ def test_ourlog_extraction_with_otel_logs( "boolean.attribute": AnyValue(bool_value=True), "double.attribute": AnyValue(double_value=637.704), "int.attribute": AnyValue(int_value=10), - "string.attribute": AnyValue(string_value="some string"), "sentry.body": AnyValue(string_value="Example log record"), "sentry.severity_number": AnyValue(int_value=10), "sentry.severity_text": AnyValue(string_value="Information"), @@ -123,7 +119,9 @@ def test_ourlog_extraction_with_otel_logs( "sentry.timestamp_nanos": AnyValue( string_value=str(timestamp_nanos) ), + "sentry.timestamp_precise": AnyValue(int_value=timestamp_nanos), "sentry.trace_flags": AnyValue(int_value=0), + "string.attribute": AnyValue(string_value="some string"), }, received=timestamp_proto, retention_days=90, @@ -135,14 +133,11 @@ def test_ourlog_extraction_with_otel_logs( logs = [MessageToDict(log) for log in ourlogs_consumer.get_ourlogs()] - # reset and remove values changing values - for log in logs: + for log, expected_log in zip(logs, expected_logs): + expected_log["itemId"] = log["itemId"] + # This field is set by Relay del log["attributes"]["sentry.observed_timestamp_nanos"] - for expected_log in expected_logs: - expected_log["itemId"] = logs[0]["itemId"] - expected_log["received"] = logs[0]["received"] - assert logs == expected_logs ourlogs_consumer.assert_empty() @@ -156,7 +151,6 @@ def test_ourlog_multiple_containers_not_allowed( ): ourlogs_consumer = ourlogs_consumer() outcomes_consumer = outcomes_consumer() - project_id = 42 project_config = mini_sentry.add_full_project_config(project_id) project_config["config"]["features"] = [ @@ -164,9 +158,7 @@ def test_ourlog_multiple_containers_not_allowed( ] relay = relay_with_processing(options=TEST_CONFIG) - start = datetime.now(timezone.utc) - envelope = Envelope() for _ in range(2): @@ -227,21 +219,19 @@ def test_ourlog_extraction_with_sentry_logs( project_config["config"]["features"] = [ "organizations:ourlogs-ingestion", ] - relay = relay_with_processing(options=TEST_CONFIG) - start = datetime.now(timezone.utc) - + timestamp = start.timestamp() envelope = envelope_with_sentry_logs( { - "timestamp": start.timestamp(), + "timestamp": timestamp, "trace_id": "5b8efff798038103d269b633813fc60c", "span_id": "eee19b7ec3c1b175", "level": "error", "body": "This is really bad", }, { - "timestamp": start.timestamp(), + "timestamp": timestamp, "trace_id": "5b8efff798038103d269b633813fc60c", "span_id": "eee19b7ec3c1b174", "level": "info", @@ -265,11 +255,13 @@ def test_ourlog_extraction_with_sentry_logs( }, }, ) + relay.send_envelope(project_id, envelope) - timestamp_nanos = int(start.timestamp() * 1e6) * 1000 + timestamp_nanos = int(timestamp * 1e6) * 1000 timestamp_proto = Timestamp() - timestamp_proto.FromNanoseconds(timestamp_nanos) + + timestamp_proto.FromSeconds(int(timestamp)) expected_logs = [ MessageToDict(log) @@ -290,6 +282,14 @@ def test_ourlog_extraction_with_sentry_logs( "sentry.severity_number": AnyValue(int_value=17), "sentry.severity_text": AnyValue(string_value="error"), "sentry.span_id": AnyValue(string_value="eee19b7ec3c1b175"), + "sentry.trace_flags": AnyValue(int_value=0), + "sentry.observed_timestamp_nanos": AnyValue( + string_value=str(timestamp_nanos) + ), + "sentry.timestamp_precise": AnyValue(int_value=timestamp_nanos), + "sentry.timestamp_nanos": AnyValue( + string_value=str(timestamp_nanos) + ), }, received=timestamp_proto, retention_days=90, @@ -315,9 +315,17 @@ def test_ourlog_extraction_with_sentry_logs( "sentry.body": AnyValue(string_value="Example log record"), "sentry.severity_number": AnyValue(int_value=9), "sentry.severity_text": AnyValue(string_value="info"), + "sentry.trace_flags": AnyValue(int_value=0), "sentry.span_id": AnyValue(string_value="eee19b7ec3c1b174"), + "sentry.observed_timestamp_nanos": AnyValue( + string_value=str(timestamp_nanos) + ), "string.attribute": AnyValue(string_value="some string"), "valid_string_with_other": AnyValue(string_value="test"), + "sentry.timestamp_precise": AnyValue(int_value=timestamp_nanos), + "sentry.timestamp_nanos": AnyValue( + string_value=str(timestamp_nanos) + ), }, received=timestamp_proto, retention_days=90, @@ -329,16 +337,9 @@ def test_ourlog_extraction_with_sentry_logs( logs = [MessageToDict(log) for log in ourlogs_consumer.get_ourlogs()] - # reset and remove values changing values - for log in logs: - log["received"] = start.isoformat(sep="T")[:-6] + "Z" - log["timestamp"] = start.isoformat(sep="T")[:-6] + "Z" - for i, expected_log in enumerate(expected_logs): # we can't generate a uuid7 yet so we need to replace the item_id expected_log["itemId"] = logs[i]["itemId"] - # received is the timestamp generated on the server when we received the log - expected_log["received"] = logs[i]["received"] assert logs == expected_logs @@ -356,24 +357,24 @@ def test_ourlog_extraction_with_sentry_logs_with_missing_fields( project_config["config"]["features"] = [ "organizations:ourlogs-ingestion", ] - relay = relay_with_processing(options=TEST_CONFIG) - start = datetime.now(timezone.utc) - + timestamp = start.timestamp() envelope = envelope_with_sentry_logs( { - "timestamp": start.timestamp(), + "timestamp": timestamp, "trace_id": "5b8efff798038103d269b633813fc60c", "level": "warn", "body": "Example log record 2", } ) + relay.send_envelope(project_id, envelope) - timestamp_nanos = int(start.timestamp() * 1e6) * 1000 + timestamp_nanos = int(timestamp * 1e6) * 1000 timestamp_proto = Timestamp() - timestamp_proto.FromNanoseconds(timestamp_nanos) + + timestamp_proto.FromSeconds(int(timestamp)) expected_logs = [ TraceItem( @@ -389,8 +390,14 @@ def test_ourlog_extraction_with_sentry_logs_with_missing_fields( item_type=TraceItemType.TRACE_ITEM_TYPE_LOG, attributes={ "sentry.body": AnyValue(string_value="Example log record 2"), + "sentry.observed_timestamp_nanos": AnyValue( + string_value=str(timestamp_nanos) + ), "sentry.severity_number": AnyValue(int_value=13), "sentry.severity_text": AnyValue(string_value="warn"), + "sentry.timestamp_nanos": AnyValue(string_value=str(timestamp_nanos)), + "sentry.timestamp_precise": AnyValue(int_value=timestamp_nanos), + "sentry.trace_flags": AnyValue(int_value=0), }, received=timestamp_proto, retention_days=90, @@ -401,12 +408,8 @@ def test_ourlog_extraction_with_sentry_logs_with_missing_fields( logs = [MessageToDict(log) for log in ourlogs_consumer.get_ourlogs()] - # reset and remove values changing values - for log in logs: - log["received"] = start.isoformat(sep="T")[:-6] + "Z" - log["timestamp"] = start.isoformat(sep="T")[:-6] + "Z" - - for expected_log in expected_logs: + for log, expected_log in zip(logs, expected_logs): + # we can't generate a uuid7 yet so we need to replace the item_id expected_log.item_id = base64.b64decode(logs[0]["itemId"]) assert logs == [MessageToDict(expected_log) for expected_log in expected_logs] @@ -426,8 +429,9 @@ def test_ourlog_extraction_is_disabled_without_feature( project_config["config"]["features"] = [] start = datetime.now(timezone.utc) + timestamp_nanos = str(int(start.timestamp() * 1e9)) + envelope = envelope_with_otel_logs(str(timestamp_nanos)) - envelope = envelope_with_otel_logs(start) relay.send_envelope(project_id, envelope) ourlogs = ourlogs_consumer.get_ourlogs() From 5633637045b41097e0b1e71d313edbf8087544e3 Mon Sep 17 00:00:00 2001 From: Pierre Massat Date: Fri, 9 May 2025 11:09:34 -0400 Subject: [PATCH 35/37] Update snapshots --- relay-ourlogs/src/ourlog.rs | 54 +++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/relay-ourlogs/src/ourlog.rs b/relay-ourlogs/src/ourlog.rs index 11e94972e21..400ec92c190 100644 --- a/relay-ourlogs/src/ourlog.rs +++ b/relay-ourlogs/src/ourlog.rs @@ -526,6 +526,13 @@ mod tests { type: String, other: {}, }, + "sentry.observed_timestamp_nanos": OurLogAttribute { + value: String( + "946684800000000000", + ), + type: String, + other: {}, + }, "sentry.severity_number": OurLogAttribute { value: I64( 9, @@ -547,6 +554,13 @@ mod tests { type: String, other: {}, }, + "sentry.timestamp_nanos": OurLogAttribute { + value: String( + "946684800000000000", + ), + type: String, + other: {}, + }, "sentry.timestamp_precise": OurLogAttribute { value: I64( 946684800000000000, @@ -554,6 +568,13 @@ mod tests { type: Integer, other: {}, }, + "sentry.trace_flags": OurLogAttribute { + value: I64( + 0, + ), + type: Integer, + other: {}, + }, }, other: {}, } @@ -636,6 +657,13 @@ mod tests { type: String, other: {}, }, + "sentry.observed_timestamp_nanos": OurLogAttribute { + value: String( + "1638144000000000000", + ), + type: String, + other: {}, + }, "sentry.severity_number": OurLogAttribute { value: I64( 0, @@ -650,6 +678,13 @@ mod tests { type: String, other: {}, }, + "sentry.timestamp_nanos": OurLogAttribute { + value: String( + "1638144000000000000", + ), + type: String, + other: {}, + }, "sentry.timestamp_precise": OurLogAttribute { value: I64( 1638144000000000000, @@ -657,6 +692,13 @@ mod tests { type: Integer, other: {}, }, + "sentry.trace_flags": OurLogAttribute { + value: I64( + 0, + ), + type: Integer, + other: {}, + }, }, other: {}, } @@ -675,6 +717,10 @@ mod tests { "type": "string", "value": "somebody" }, + "sentry.observed_timestamp_nanos": { + "type": "string", + "value": "1638144000000000000" + }, "sentry.severity_number": { "type": "integer", "value": 0 @@ -683,9 +729,17 @@ mod tests { "type": "string", "value": "info" }, + "sentry.timestamp_nanos": { + "type": "string", + "value": "1638144000000000000" + }, "sentry.timestamp_precise": { "type": "integer", "value": 1638144000000000000 + }, + "sentry.trace_flags": { + "type": "integer", + "value": 0 } } } From b90d31bcc537837949b1021931097fa3972a8cbe Mon Sep 17 00:00:00 2001 From: Pierre Massat Date: Fri, 9 May 2025 18:55:14 -0400 Subject: [PATCH 36/37] Add a better comment on why we replace the item_id --- tests/integration/test_ourlogs.py | 75 ++++++++++++++++++------------- 1 file changed, 43 insertions(+), 32 deletions(-) diff --git a/tests/integration/test_ourlogs.py b/tests/integration/test_ourlogs.py index b42b06d22f7..deec40a0e06 100644 --- a/tests/integration/test_ourlogs.py +++ b/tests/integration/test_ourlogs.py @@ -134,8 +134,11 @@ def test_ourlog_extraction_with_otel_logs( logs = [MessageToDict(log) for log in ourlogs_consumer.get_ourlogs()] for log, expected_log in zip(logs, expected_logs): + # we can't generate uuid7 with a specific timestamp + # in Python just yet so we're overriding it expected_log["itemId"] = log["itemId"] - # This field is set by Relay + + # This field is set by Relay so we need to remove it del log["attributes"]["sentry.observed_timestamp_nanos"] assert logs == expected_logs @@ -181,7 +184,9 @@ def test_ourlog_multiple_containers_not_allowed( relay.send_envelope(project_id, envelope) outcomes = outcomes_consumer.get_outcomes() + outcomes.sort(key=lambda o: sorted(o.items())) + assert 300 < outcomes[1].pop("quantity") < 400 assert outcomes == [ { @@ -337,9 +342,10 @@ def test_ourlog_extraction_with_sentry_logs( logs = [MessageToDict(log) for log in ourlogs_consumer.get_ourlogs()] - for i, expected_log in enumerate(expected_logs): - # we can't generate a uuid7 yet so we need to replace the item_id - expected_log["itemId"] = logs[i]["itemId"] + for log, expected_log in zip(logs, expected_logs): + # we can't generate uuid7 with a specific timestamp + # in Python just yet so we're overriding it + expected_log["itemId"] = log["itemId"] assert logs == expected_logs @@ -377,42 +383,47 @@ def test_ourlog_extraction_with_sentry_logs_with_missing_fields( timestamp_proto.FromSeconds(int(timestamp)) expected_logs = [ - TraceItem( - organization_id=1, - project_id=project_id, - timestamp=timestamp_proto, - trace_id="5b8efff798038103d269b633813fc60c", - item_id=timestamp_nanos.to_bytes( - length=16, - byteorder="little", - signed=False, - ), - item_type=TraceItemType.TRACE_ITEM_TYPE_LOG, - attributes={ - "sentry.body": AnyValue(string_value="Example log record 2"), - "sentry.observed_timestamp_nanos": AnyValue( - string_value=str(timestamp_nanos) + MessageToDict( + TraceItem( + organization_id=1, + project_id=project_id, + timestamp=timestamp_proto, + trace_id="5b8efff798038103d269b633813fc60c", + item_id=timestamp_nanos.to_bytes( + length=16, + byteorder="little", + signed=False, ), - "sentry.severity_number": AnyValue(int_value=13), - "sentry.severity_text": AnyValue(string_value="warn"), - "sentry.timestamp_nanos": AnyValue(string_value=str(timestamp_nanos)), - "sentry.timestamp_precise": AnyValue(int_value=timestamp_nanos), - "sentry.trace_flags": AnyValue(int_value=0), - }, - received=timestamp_proto, - retention_days=90, - client_sample_rate=1.0, - server_sample_rate=1.0, + item_type=TraceItemType.TRACE_ITEM_TYPE_LOG, + attributes={ + "sentry.body": AnyValue(string_value="Example log record 2"), + "sentry.observed_timestamp_nanos": AnyValue( + string_value=str(timestamp_nanos) + ), + "sentry.severity_number": AnyValue(int_value=13), + "sentry.severity_text": AnyValue(string_value="warn"), + "sentry.timestamp_nanos": AnyValue( + string_value=str(timestamp_nanos) + ), + "sentry.timestamp_precise": AnyValue(int_value=timestamp_nanos), + "sentry.trace_flags": AnyValue(int_value=0), + }, + received=timestamp_proto, + retention_days=90, + client_sample_rate=1.0, + server_sample_rate=1.0, + ), ), ] logs = [MessageToDict(log) for log in ourlogs_consumer.get_ourlogs()] for log, expected_log in zip(logs, expected_logs): - # we can't generate a uuid7 yet so we need to replace the item_id - expected_log.item_id = base64.b64decode(logs[0]["itemId"]) + # we can't generate uuid7 with a specific timestamp + # in Python just yet so we're overriding it + expected_log["itemId"] = log["itemId"] - assert logs == [MessageToDict(expected_log) for expected_log in expected_logs] + assert logs == expected_logs ourlogs_consumer.assert_empty() From 1cda6e9828cb6b4b631397be66b5c3293bd34c44 Mon Sep 17 00:00:00 2001 From: Pierre Massat Date: Fri, 9 May 2025 19:29:40 -0400 Subject: [PATCH 37/37] Fix linting --- tests/integration/test_ourlogs.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/integration/test_ourlogs.py b/tests/integration/test_ourlogs.py index deec40a0e06..ce921f588f2 100644 --- a/tests/integration/test_ourlogs.py +++ b/tests/integration/test_ourlogs.py @@ -1,5 +1,4 @@ import json -import base64 from datetime import datetime, timezone