sentry_protos 0.26.1

Rust bindings for sentry-protos
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
// This file is @generated by prost-build.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RequestMeta {
    #[prost(uint64, tag = "1")]
    pub organization_id: u64,
    #[prost(string, tag = "2")]
    pub cogs_category: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub referrer: ::prost::alloc::string::String,
    /// can be empty
    #[prost(uint64, repeated, tag = "4")]
    pub project_ids: ::prost::alloc::vec::Vec<u64>,
    #[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>,
    #[prost(enumeration = "TraceItemName", tag = "7")]
    pub trace_item_name: i32,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TraceItemName {
    Unspecified = 0,
    EapSpans = 1,
}
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",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "TRACE_ITEM_NAME_UNSPECIFIED" => Some(Self::Unspecified),
            "TRACE_ITEM_NAME_EAP_SPANS" => Some(Self::EapSpans),
            _ => None,
        }
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AttributeKey {
    #[prost(enumeration = "attribute_key::Type", tag = "1")]
    pub r#type: i32,
    /// if you use span_id this will route to span.span_id,
    /// if you use derp this will route to attr_{str,num}_{n}\['derp'\]
    #[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 {
        /// called "none" sometimes
        Unspecified = 0,
        Boolean = 1,
        String = 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::Boolean => "TYPE_BOOLEAN",
                Type::String => "TYPE_STRING",
                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<Self> {
            match value {
                "TYPE_UNSPECIFIED" => Some(Self::Unspecified),
                "TYPE_BOOLEAN" => Some(Self::Boolean),
                "TYPE_STRING" => Some(Self::String),
                "TYPE_FLOAT" => Some(Self::Float),
                "TYPE_INT" => Some(Self::Int),
                "TYPE_DOUBLE" => Some(Self::Double),
                _ => None,
            }
        }
    }
}
/// custom mappings of column values which are not present in EAP storage
/// for example, project name is changeable by the user and not stored in EAP
/// but sorting by the project name may be desired. This struct carries that mapping
/// data
#[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,
    >,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AttributeValue {
    #[prost(oneof = "attribute_value::Value", tags = "1, 2, 3, 4")]
    pub value: ::core::option::Option<attribute_value::Value>,
}
/// 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),
        #[prost(float, tag = "3")]
        ValFloat(f32),
        #[prost(int64, tag = "4")]
        ValInt(i64),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AndFilter {
    #[prost(message, repeated, tag = "1")]
    pub filters: ::prost::alloc::vec::Vec<TraceItemFilter>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OrFilter {
    #[prost(message, repeated, tag = "1")]
    pub filters: ::prost::alloc::vec::Vec<TraceItemFilter>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ComparisonFilter {
    #[prost(message, optional, tag = "1")]
    pub key: ::core::option::Option<AttributeKey>,
    #[prost(enumeration = "comparison_filter::Op", tag = "2")]
    pub op: i32,
    #[prost(message, optional, tag = "3")]
    pub value: ::core::option::Option<AttributeValue>,
}
/// 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,
    }
    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",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            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),
                _ => None,
            }
        }
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExistsFilter {
    #[prost(message, optional, tag = "1")]
    pub key: ::core::option::Option<AttributeKey>,
}
/// Represents a condition on searching for a particular "trace item"
/// (e.g., spans, replays, errors)
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TraceItemFilter {
    #[prost(oneof = "trace_item_filter::Value", tags = "1, 2, 3, 4")]
    pub value: ::core::option::Option<trace_item_filter::Value>,
}
/// 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")]
        ComparisonFilter(super::ComparisonFilter),
        #[prost(message, tag = "4")]
        ExistsFilter(super::ExistsFilter),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AggregateBucketRequest {
    #[prost(message, optional, tag = "1")]
    pub meta: ::core::option::Option<RequestMeta>,
    #[prost(enumeration = "aggregate_bucket_request::Function", tag = "4")]
    pub aggregate: i32,
    #[prost(message, optional, tag = "5")]
    pub filter: ::core::option::Option<TraceItemFilter>,
    #[prost(uint64, tag = "6")]
    pub granularity_secs: u64,
    #[prost(message, optional, tag = "7")]
    pub key: ::core::option::Option<AttributeKey>,
    #[prost(message, repeated, tag = "8")]
    pub virtual_column_context: ::prost::alloc::vec::Vec<VirtualColumnContext>,
}
/// Nested message and enum types in `AggregateBucketRequest`.
pub mod aggregate_bucket_request {
    #[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,
        P95 = 5,
        P99 = 6,
        Avg = 7,
    }
    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::P95 => "FUNCTION_P95",
                Function::P99 => "FUNCTION_P99",
                Function::Avg => "FUNCTION_AVG",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            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_P95" => Some(Self::P95),
                "FUNCTION_P99" => Some(Self::P99),
                "FUNCTION_AVG" => Some(Self::Avg),
                _ => None,
            }
        }
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AggregateBucketResponse {
    #[prost(float, repeated, tag = "1")]
    pub result: ::prost::alloc::vec::Vec<f32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SpanSamplesRequest {
    #[prost(message, optional, tag = "1")]
    pub meta: ::core::option::Option<RequestMeta>,
    #[prost(message, optional, tag = "2")]
    pub filter: ::core::option::Option<TraceItemFilter>,
    #[prost(message, repeated, tag = "3")]
    pub order_by: ::prost::alloc::vec::Vec<span_samples_request::OrderBy>,
    #[prost(message, repeated, tag = "4")]
    pub keys: ::prost::alloc::vec::Vec<AttributeKey>,
    #[prost(uint32, tag = "5")]
    pub limit: u32,
    #[prost(message, repeated, tag = "6")]
    pub virtual_column_contexts: ::prost::alloc::vec::Vec<VirtualColumnContext>,
}
/// Nested message and enum types in `SpanSamplesRequest`.
pub mod span_samples_request {
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct OrderBy {
        #[prost(message, optional, tag = "1")]
        pub key: ::core::option::Option<super::AttributeKey>,
        #[prost(bool, tag = "2")]
        pub descending: bool,
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SpanSample {
    #[prost(map = "string, message", tag = "1")]
    pub results: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        AttributeValue,
    >,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SpanSamplesResponse {
    #[prost(message, repeated, tag = "1")]
    pub span_samples: ::prost::alloc::vec::Vec<SpanSample>,
}
/// A request for "which tags are available for these projects between these dates" - used for things like autocompletion
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TraceItemAttributesRequest {
    #[prost(message, optional, tag = "1")]
    pub meta: ::core::option::Option<RequestMeta>,
    #[prost(uint32, tag = "2")]
    pub limit: u32,
    #[prost(uint32, tag = "3")]
    pub offset: u32,
    #[prost(enumeration = "attribute_key::Type", tag = "5")]
    pub r#type: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TraceItemAttributesResponse {
    #[prost(message, repeated, tag = "1")]
    pub tags: ::prost::alloc::vec::Vec<trace_item_attributes_response::Tag>,
}
/// Nested message and enum types in `TraceItemAttributesResponse`.
pub mod trace_item_attributes_response {
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Tag {
        #[prost(string, tag = "1")]
        pub name: ::prost::alloc::string::String,
        #[prost(enumeration = "super::attribute_key::Type", tag = "2")]
        pub r#type: i32,
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AttributeValuesRequest {
    #[prost(message, optional, tag = "1")]
    pub meta: ::core::option::Option<RequestMeta>,
    #[prost(string, tag = "3")]
    pub name: ::prost::alloc::string::String,
    /// a substring of the value being searched,
    /// only strict substring supported, no regex
    #[prost(string, tag = "4")]
    pub value_substring_match: ::prost::alloc::string::String,
    #[prost(uint32, tag = "5")]
    pub limit: u32,
    #[prost(uint32, tag = "6")]
    pub offset: u32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AttributeValuesResponse {
    #[prost(string, repeated, tag = "1")]
    pub values: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}