1use serde::{Deserialize, Serialize};
5#[derive(Deserialize, Serialize)]
7#[cfg_attr(feature = "fuzzing", derive(bolero::TypeGenerator))]
8#[derive(Clone, PartialEq, ::prost::Message)]
9pub struct SpanLink {
10 #[prost(uint64, tag = "1")]
14 pub trace_id: u64,
15 #[prost(uint64, tag = "2")]
19 #[serde(default)]
20 pub trace_id_high: u64,
21 #[prost(uint64, tag = "3")]
25 pub span_id: u64,
26 #[prost(map = "string, string", tag = "4")]
30 #[serde(default)]
31 pub attributes: ::std::collections::HashMap<
32 ::prost::alloc::string::String,
33 ::prost::alloc::string::String,
34 >,
35 #[prost(string, tag = "5")]
39 #[serde(default)]
40 pub tracestate: ::prost::alloc::string::String,
41 #[prost(uint32, tag = "6")]
45 #[serde(default)]
46 pub flags: u32,
47}
48#[derive(Deserialize, Serialize)]
49#[cfg_attr(feature = "fuzzing", derive(bolero::TypeGenerator))]
50#[derive(Clone, PartialEq, ::prost::Message)]
51pub struct SpanEvent {
52 #[prost(fixed64, tag = "1")]
56 #[serde(default)]
57 pub time_unix_nano: u64,
58 #[prost(string, tag = "2")]
62 #[serde(default)]
63 pub name: ::prost::alloc::string::String,
64 #[prost(map = "string, message", tag = "3")]
70 #[serde(default)]
71 pub attributes: ::std::collections::HashMap<
72 ::prost::alloc::string::String,
73 AttributeAnyValue,
74 >,
75}
76#[derive(Deserialize, Serialize)]
80#[cfg_attr(feature = "fuzzing", derive(bolero::TypeGenerator))]
81#[derive(Clone, PartialEq, ::prost::Message)]
82pub struct AttributeAnyValue {
83 #[prost(enumeration = "attribute_any_value::AttributeAnyValueType", tag = "1")]
89 #[serde(default)]
90 pub r#type: i32,
91 #[prost(string, tag = "2")]
93 #[serde(default)]
94 pub string_value: ::prost::alloc::string::String,
95 #[prost(bool, tag = "3")]
97 #[serde(default)]
98 pub bool_value: bool,
99 #[prost(int64, tag = "4")]
101 #[serde(default)]
102 pub int_value: i64,
103 #[prost(double, tag = "5")]
105 #[serde(default)]
106 pub double_value: f64,
107 #[prost(message, optional, tag = "6")]
109 #[serde(default)]
110 pub array_value: ::core::option::Option<AttributeArray>,
111}
112pub mod attribute_any_value {
114 #[derive(
115 Clone,
116 Copy,
117 Debug,
118 PartialEq,
119 Eq,
120 Hash,
121 PartialOrd,
122 Ord,
123 ::prost::Enumeration
124 )]
125 #[repr(i32)]
126 pub enum AttributeAnyValueType {
127 StringValue = 0,
128 BoolValue = 1,
129 IntValue = 2,
130 DoubleValue = 3,
131 ArrayValue = 4,
132 }
133 impl AttributeAnyValueType {
134 pub fn as_str_name(&self) -> &'static str {
139 match self {
140 Self::StringValue => "STRING_VALUE",
141 Self::BoolValue => "BOOL_VALUE",
142 Self::IntValue => "INT_VALUE",
143 Self::DoubleValue => "DOUBLE_VALUE",
144 Self::ArrayValue => "ARRAY_VALUE",
145 }
146 }
147 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
149 match value {
150 "STRING_VALUE" => Some(Self::StringValue),
151 "BOOL_VALUE" => Some(Self::BoolValue),
152 "INT_VALUE" => Some(Self::IntValue),
153 "DOUBLE_VALUE" => Some(Self::DoubleValue),
154 "ARRAY_VALUE" => Some(Self::ArrayValue),
155 _ => None,
156 }
157 }
158 }
159}
160#[derive(Deserialize, Serialize)]
162#[cfg_attr(feature = "fuzzing", derive(bolero::TypeGenerator))]
163#[derive(Clone, PartialEq, ::prost::Message)]
164pub struct AttributeArray {
165 #[prost(message, repeated, tag = "1")]
168 #[serde(default)]
169 pub values: ::prost::alloc::vec::Vec<AttributeArrayValue>,
170}
171#[derive(Deserialize, Serialize)]
174#[cfg_attr(feature = "fuzzing", derive(bolero::TypeGenerator))]
175#[derive(Clone, PartialEq, ::prost::Message)]
176pub struct AttributeArrayValue {
177 #[prost(enumeration = "attribute_array_value::AttributeArrayValueType", tag = "1")]
183 #[serde(default)]
184 pub r#type: i32,
185 #[prost(string, tag = "2")]
187 #[serde(default)]
188 pub string_value: ::prost::alloc::string::String,
189 #[prost(bool, tag = "3")]
191 #[serde(default)]
192 pub bool_value: bool,
193 #[prost(int64, tag = "4")]
195 #[serde(default)]
196 pub int_value: i64,
197 #[prost(double, tag = "5")]
199 #[serde(default)]
200 pub double_value: f64,
201}
202pub mod attribute_array_value {
204 #[derive(
205 Clone,
206 Copy,
207 Debug,
208 PartialEq,
209 Eq,
210 Hash,
211 PartialOrd,
212 Ord,
213 ::prost::Enumeration
214 )]
215 #[repr(i32)]
216 pub enum AttributeArrayValueType {
217 StringValue = 0,
218 BoolValue = 1,
219 IntValue = 2,
220 DoubleValue = 3,
221 }
222 impl AttributeArrayValueType {
223 pub fn as_str_name(&self) -> &'static str {
228 match self {
229 Self::StringValue => "STRING_VALUE",
230 Self::BoolValue => "BOOL_VALUE",
231 Self::IntValue => "INT_VALUE",
232 Self::DoubleValue => "DOUBLE_VALUE",
233 }
234 }
235 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
237 match value {
238 "STRING_VALUE" => Some(Self::StringValue),
239 "BOOL_VALUE" => Some(Self::BoolValue),
240 "INT_VALUE" => Some(Self::IntValue),
241 "DOUBLE_VALUE" => Some(Self::DoubleValue),
242 _ => None,
243 }
244 }
245 }
246}
247#[derive(Deserialize, Serialize)]
248#[cfg_attr(feature = "fuzzing", derive(bolero::TypeGenerator))]
249#[derive(Clone, PartialEq, ::prost::Message)]
250pub struct Span {
251 #[prost(string, tag = "1")]
254 #[serde(default)]
255 #[serde(deserialize_with = "crate::deserializers::deserialize_null_into_default")]
256 pub service: ::prost::alloc::string::String,
257 #[prost(string, tag = "2")]
260 #[serde(default)]
261 #[serde(deserialize_with = "crate::deserializers::deserialize_null_into_default")]
262 pub name: ::prost::alloc::string::String,
263 #[prost(string, tag = "3")]
266 #[serde(default)]
267 #[serde(deserialize_with = "crate::deserializers::deserialize_null_into_default")]
268 pub resource: ::prost::alloc::string::String,
269 #[prost(uint64, tag = "4")]
272 #[serde(default)]
273 #[serde(deserialize_with = "crate::deserializers::deserialize_null_into_default")]
274 pub trace_id: u64,
275 #[prost(uint64, tag = "5")]
278 #[serde(default)]
279 #[serde(deserialize_with = "crate::deserializers::deserialize_null_into_default")]
280 pub span_id: u64,
281 #[prost(uint64, tag = "6")]
284 #[serde(default)]
285 #[serde(deserialize_with = "crate::deserializers::deserialize_null_into_default")]
286 pub parent_id: u64,
287 #[prost(int64, tag = "7")]
290 #[serde(default)]
291 #[serde(deserialize_with = "crate::deserializers::deserialize_null_into_default")]
292 pub start: i64,
293 #[prost(int64, tag = "8")]
296 #[serde(default)]
297 #[serde(deserialize_with = "crate::deserializers::deserialize_duration")]
298 pub duration: i64,
299 #[prost(int32, tag = "9")]
302 #[serde(default)]
303 #[serde(deserialize_with = "crate::deserializers::deserialize_null_into_default")]
304 #[serde(skip_serializing_if = "crate::deserializers::is_default")]
305 pub error: i32,
306 #[prost(map = "string, string", tag = "10")]
309 #[serde(default)]
310 #[serde(
311 deserialize_with = "crate::deserializers::deserialize_map_with_nullable_values"
312 )]
313 pub meta: ::std::collections::HashMap<
314 ::prost::alloc::string::String,
315 ::prost::alloc::string::String,
316 >,
317 #[prost(map = "string, double", tag = "11")]
320 #[serde(default)]
321 #[serde(deserialize_with = "crate::deserializers::deserialize_null_into_default")]
322 pub metrics: ::std::collections::HashMap<::prost::alloc::string::String, f64>,
323 #[prost(string, tag = "12")]
326 #[serde(default)]
327 #[serde(deserialize_with = "crate::deserializers::deserialize_null_into_default")]
328 pub r#type: ::prost::alloc::string::String,
329 #[prost(map = "string, bytes", tag = "13")]
332 #[serde(default)]
333 #[serde(deserialize_with = "crate::deserializers::deserialize_null_into_default")]
334 #[serde(skip_serializing_if = "::std::collections::HashMap::is_empty")]
335 pub meta_struct: ::std::collections::HashMap<
336 ::prost::alloc::string::String,
337 ::prost::alloc::vec::Vec<u8>,
338 >,
339 #[prost(message, repeated, tag = "14")]
342 #[serde(default)]
343 #[serde(deserialize_with = "crate::deserializers::deserialize_null_into_default")]
344 #[serde(skip_serializing_if = "::prost::alloc::vec::Vec::is_empty")]
345 pub span_links: ::prost::alloc::vec::Vec<SpanLink>,
346 #[prost(message, repeated, tag = "15")]
349 #[serde(default)]
350 #[serde(deserialize_with = "crate::deserializers::deserialize_null_into_default")]
351 #[serde(skip_serializing_if = "::prost::alloc::vec::Vec::is_empty")]
352 pub span_events: ::prost::alloc::vec::Vec<SpanEvent>,
353}
354#[derive(Deserialize, Serialize)]
356#[derive(Clone, PartialEq, ::prost::Message)]
357pub struct TraceChunk {
358 #[prost(int32, tag = "1")]
361 pub priority: i32,
362 #[prost(string, tag = "2")]
365 pub origin: ::prost::alloc::string::String,
366 #[prost(message, repeated, tag = "3")]
369 pub spans: ::prost::alloc::vec::Vec<Span>,
370 #[prost(map = "string, string", tag = "4")]
373 pub tags: ::std::collections::HashMap<
374 ::prost::alloc::string::String,
375 ::prost::alloc::string::String,
376 >,
377 #[prost(bool, tag = "5")]
380 pub dropped_trace: bool,
381}
382#[derive(Deserialize, Serialize)]
384#[derive(Clone, PartialEq, ::prost::Message)]
385pub struct TracerPayload {
386 #[prost(string, tag = "1")]
389 pub container_id: ::prost::alloc::string::String,
390 #[prost(string, tag = "2")]
393 pub language_name: ::prost::alloc::string::String,
394 #[prost(string, tag = "3")]
397 pub language_version: ::prost::alloc::string::String,
398 #[prost(string, tag = "4")]
401 pub tracer_version: ::prost::alloc::string::String,
402 #[prost(string, tag = "5")]
405 pub runtime_id: ::prost::alloc::string::String,
406 #[prost(message, repeated, tag = "6")]
409 pub chunks: ::prost::alloc::vec::Vec<TraceChunk>,
410 #[prost(map = "string, string", tag = "7")]
413 pub tags: ::std::collections::HashMap<
414 ::prost::alloc::string::String,
415 ::prost::alloc::string::String,
416 >,
417 #[prost(string, tag = "8")]
420 pub env: ::prost::alloc::string::String,
421 #[prost(string, tag = "9")]
424 pub hostname: ::prost::alloc::string::String,
425 #[prost(string, tag = "10")]
428 pub app_version: ::prost::alloc::string::String,
429}
430#[derive(Clone, PartialEq, ::prost::Message)]
432pub struct AgentPayload {
433 #[prost(string, tag = "1")]
435 pub host_name: ::prost::alloc::string::String,
436 #[prost(string, tag = "2")]
438 pub env: ::prost::alloc::string::String,
439 #[prost(message, repeated, tag = "5")]
441 pub tracer_payloads: ::prost::alloc::vec::Vec<TracerPayload>,
442 #[prost(map = "string, string", tag = "6")]
444 pub tags: ::std::collections::HashMap<
445 ::prost::alloc::string::String,
446 ::prost::alloc::string::String,
447 >,
448 #[prost(string, tag = "7")]
450 pub agent_version: ::prost::alloc::string::String,
451 #[prost(double, tag = "8")]
453 pub target_tps: f64,
454 #[prost(double, tag = "9")]
456 pub error_tps: f64,
457 #[prost(bool, tag = "10")]
459 pub rare_sampler_enabled: bool,
460 #[prost(message, repeated, tag = "11")]
463 pub idx_tracer_payloads: ::prost::alloc::vec::Vec<idx::TracerPayload>,
464}
465#[derive(Deserialize, Serialize)]
467#[serde(rename_all = "PascalCase")]
468#[derive(Clone, PartialEq, ::prost::Message)]
469pub struct StatsPayload {
470 #[prost(string, tag = "1")]
471 pub agent_hostname: ::prost::alloc::string::String,
472 #[prost(string, tag = "2")]
473 pub agent_env: ::prost::alloc::string::String,
474 #[prost(message, repeated, tag = "3")]
476 pub stats: ::prost::alloc::vec::Vec<ClientStatsPayload>,
477 #[prost(string, tag = "4")]
478 pub agent_version: ::prost::alloc::string::String,
479 #[prost(bool, tag = "5")]
480 pub client_computed: bool,
481 #[prost(bool, tag = "6")]
484 pub split_payload: bool,
485}
486#[derive(Deserialize, Serialize)]
489#[serde(rename_all = "PascalCase")]
490#[derive(Clone, PartialEq, ::prost::Message)]
491pub struct ClientStatsPayload {
492 #[prost(string, tag = "1")]
495 #[serde(default)]
496 pub hostname: ::prost::alloc::string::String,
497 #[prost(string, tag = "2")]
499 #[serde(default)]
500 pub env: ::prost::alloc::string::String,
501 #[prost(string, tag = "3")]
503 #[serde(default)]
504 pub version: ::prost::alloc::string::String,
505 #[prost(message, repeated, tag = "4")]
507 #[serde(default)]
508 pub stats: ::prost::alloc::vec::Vec<ClientStatsBucket>,
509 #[prost(string, tag = "5")]
511 #[serde(default)]
512 pub lang: ::prost::alloc::string::String,
513 #[prost(string, tag = "6")]
515 #[serde(default)]
516 pub tracer_version: ::prost::alloc::string::String,
517 #[prost(string, tag = "7")]
519 #[serde(default)]
520 #[serde(rename = "RuntimeID")]
521 pub runtime_id: ::prost::alloc::string::String,
522 #[prost(uint64, tag = "8")]
524 #[serde(default)]
525 pub sequence: u64,
526 #[prost(string, tag = "9")]
529 #[serde(default)]
530 pub agent_aggregation: ::prost::alloc::string::String,
531 #[prost(string, tag = "10")]
534 #[serde(default)]
535 pub service: ::prost::alloc::string::String,
536 #[prost(string, tag = "11")]
539 #[serde(default)]
540 #[serde(rename = "ContainerID")]
541 pub container_id: ::prost::alloc::string::String,
542 #[prost(string, repeated, tag = "12")]
545 #[serde(default)]
546 pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
547 #[prost(string, tag = "13")]
549 #[serde(default)]
550 pub git_commit_sha: ::prost::alloc::string::String,
551 #[prost(string, tag = "14")]
553 #[serde(default)]
554 pub image_tag: ::prost::alloc::string::String,
555 #[prost(uint64, tag = "15")]
557 #[serde(default)]
558 pub process_tags_hash: u64,
559 #[prost(string, tag = "16")]
561 #[serde(default)]
562 pub process_tags: ::prost::alloc::string::String,
563}
564#[derive(Deserialize, Serialize)]
566#[serde(rename_all = "PascalCase")]
567#[derive(Clone, PartialEq, ::prost::Message)]
568pub struct ClientStatsBucket {
569 #[prost(uint64, tag = "1")]
571 pub start: u64,
572 #[prost(uint64, tag = "2")]
574 pub duration: u64,
575 #[prost(message, repeated, tag = "3")]
577 pub stats: ::prost::alloc::vec::Vec<ClientGroupedStats>,
578 #[prost(int64, tag = "4")]
581 #[serde(default)]
582 pub agent_time_shift: i64,
583}
584#[derive(Deserialize, Serialize)]
586#[serde(rename_all = "PascalCase")]
587#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
588pub struct ClientGroupedStats {
589 #[prost(string, tag = "1")]
590 pub service: ::prost::alloc::string::String,
591 #[prost(string, tag = "2")]
592 pub name: ::prost::alloc::string::String,
593 #[prost(string, tag = "3")]
594 pub resource: ::prost::alloc::string::String,
595 #[prost(uint32, tag = "4")]
596 #[serde(rename = "HTTPStatusCode")]
597 pub http_status_code: u32,
598 #[prost(string, tag = "5")]
599 #[serde(default)]
600 pub r#type: ::prost::alloc::string::String,
601 #[prost(string, tag = "6")]
603 #[serde(default)]
604 #[serde(rename = "DBType")]
605 pub db_type: ::prost::alloc::string::String,
606 #[prost(uint64, tag = "7")]
608 pub hits: u64,
609 #[prost(uint64, tag = "8")]
611 pub errors: u64,
612 #[prost(uint64, tag = "9")]
614 pub duration: u64,
615 #[prost(bytes = "vec", tag = "10")]
617 #[serde(with = "serde_bytes")]
618 pub ok_summary: ::prost::alloc::vec::Vec<u8>,
619 #[prost(bytes = "vec", tag = "11")]
621 #[serde(with = "serde_bytes")]
622 pub error_summary: ::prost::alloc::vec::Vec<u8>,
623 #[prost(bool, tag = "12")]
625 pub synthetics: bool,
626 #[prost(uint64, tag = "13")]
628 pub top_level_hits: u64,
629 #[prost(string, tag = "15")]
631 #[serde(default)]
632 pub span_kind: ::prost::alloc::string::String,
633 #[prost(string, repeated, tag = "16")]
636 #[serde(default)]
637 pub peer_tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
638 #[prost(enumeration = "Trilean", tag = "17")]
640 #[serde(default)]
641 pub is_trace_root: i32,
642 #[prost(string, tag = "18")]
643 #[serde(default)]
644 #[serde(rename = "GRPCStatusCode")]
645 pub grpc_status_code: ::prost::alloc::string::String,
646 #[prost(string, tag = "19")]
648 #[serde(default)]
649 #[serde(rename = "HTTPMethod")]
650 pub http_method: ::prost::alloc::string::String,
651 #[prost(string, tag = "20")]
653 #[serde(default)]
654 #[serde(rename = "HTTPEndpoint")]
655 pub http_endpoint: ::prost::alloc::string::String,
656 #[prost(string, tag = "21")]
658 #[serde(default)]
659 #[serde(rename = "srv_src")]
660 pub service_source: ::prost::alloc::string::String,
661 #[prost(string, repeated, tag = "22")]
665 #[serde(default)]
666 pub span_derived_primary_tags: ::prost::alloc::vec::Vec<
667 ::prost::alloc::string::String,
668 >,
669}
670#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
672#[repr(i32)]
673pub enum Trilean {
674 NotSet = 0,
675 True = 1,
676 False = 2,
677}
678impl Trilean {
679 pub fn as_str_name(&self) -> &'static str {
684 match self {
685 Self::NotSet => "NOT_SET",
686 Self::True => "TRUE",
687 Self::False => "FALSE",
688 }
689 }
690 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
692 match value {
693 "NOT_SET" => Some(Self::NotSet),
694 "TRUE" => Some(Self::True),
695 "FALSE" => Some(Self::False),
696 _ => None,
697 }
698 }
699}
700#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
701#[repr(i32)]
702pub enum TraceRootFlag {
703 DeprecatedNotSet = 0,
704 DeprecatedTrue = 1,
705 DeprecatedFalse = 2,
706}
707impl TraceRootFlag {
708 pub fn as_str_name(&self) -> &'static str {
713 match self {
714 Self::DeprecatedNotSet => "DEPRECATED_NOT_SET",
715 Self::DeprecatedTrue => "DEPRECATED_TRUE",
716 Self::DeprecatedFalse => "DEPRECATED_FALSE",
717 }
718 }
719 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
721 match value {
722 "DEPRECATED_NOT_SET" => Some(Self::DeprecatedNotSet),
723 "DEPRECATED_TRUE" => Some(Self::DeprecatedTrue),
724 "DEPRECATED_FALSE" => Some(Self::DeprecatedFalse),
725 _ => None,
726 }
727 }
728}