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")]
335 #[serde(default)]
336 #[serde(deserialize_with = "crate::deserializers::deserialize_null_into_default")]
337 #[serde(skip_serializing_if = "::std::collections::HashMap::is_empty")]
338 pub meta_struct: ::std::collections::HashMap<
339 ::prost::alloc::string::String,
340 ::prost::alloc::vec::Vec<u8>,
341 >,
342 #[prost(message, repeated, tag = "14")]
345 #[serde(default)]
346 #[serde(deserialize_with = "crate::deserializers::deserialize_null_into_default")]
347 #[serde(skip_serializing_if = "::prost::alloc::vec::Vec::is_empty")]
348 pub span_links: ::prost::alloc::vec::Vec<SpanLink>,
349 #[prost(message, repeated, tag = "15")]
352 #[serde(default)]
353 #[serde(deserialize_with = "crate::deserializers::deserialize_null_into_default")]
354 #[serde(skip_serializing_if = "::prost::alloc::vec::Vec::is_empty")]
355 pub span_events: ::prost::alloc::vec::Vec<SpanEvent>,
356}
357#[derive(Deserialize, Serialize)]
359#[derive(Clone, PartialEq, ::prost::Message)]
360pub struct TraceChunk {
361 #[prost(int32, tag = "1")]
364 pub priority: i32,
365 #[prost(string, tag = "2")]
368 pub origin: ::prost::alloc::string::String,
369 #[prost(message, repeated, tag = "3")]
372 pub spans: ::prost::alloc::vec::Vec<Span>,
373 #[prost(map = "string, string", tag = "4")]
376 pub tags: ::std::collections::HashMap<
377 ::prost::alloc::string::String,
378 ::prost::alloc::string::String,
379 >,
380 #[prost(bool, tag = "5")]
383 pub dropped_trace: bool,
384}
385#[derive(Deserialize, Serialize)]
387#[derive(Clone, PartialEq, ::prost::Message)]
388pub struct TracerPayload {
389 #[prost(string, tag = "1")]
392 pub container_id: ::prost::alloc::string::String,
393 #[prost(string, tag = "2")]
396 pub language_name: ::prost::alloc::string::String,
397 #[prost(string, tag = "3")]
400 pub language_version: ::prost::alloc::string::String,
401 #[prost(string, tag = "4")]
404 pub tracer_version: ::prost::alloc::string::String,
405 #[prost(string, tag = "5")]
408 pub runtime_id: ::prost::alloc::string::String,
409 #[prost(message, repeated, tag = "6")]
412 pub chunks: ::prost::alloc::vec::Vec<TraceChunk>,
413 #[prost(map = "string, string", tag = "7")]
416 pub tags: ::std::collections::HashMap<
417 ::prost::alloc::string::String,
418 ::prost::alloc::string::String,
419 >,
420 #[prost(string, tag = "8")]
423 pub env: ::prost::alloc::string::String,
424 #[prost(string, tag = "9")]
427 pub hostname: ::prost::alloc::string::String,
428 #[prost(string, tag = "10")]
431 pub app_version: ::prost::alloc::string::String,
432 #[prost(message, optional, tag = "11")]
435 #[serde(skip_serializing_if = "Option::is_none")]
436 pub container_debug: ::core::option::Option<ContainerDebug>,
437}
438#[derive(Deserialize, Serialize, PartialOrd, Ord)]
440#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
441pub struct ContainerDebug {
442 #[prost(string, tag = "1")]
445 #[serde(default)]
446 pub error: ::prost::alloc::string::String,
447 #[prost(int64, tag = "2")]
450 #[serde(default)]
451 pub latency_ms: i64,
452 #[prost(bool, tag = "3")]
455 #[serde(default)]
456 pub was_buffered: bool,
457 #[prost(int64, tag = "4")]
460 #[serde(default)]
461 pub buffer_ms: i64,
462 #[prost(string, tag = "5")]
465 #[serde(default)]
466 pub buffer_eviction_reason: ::prost::alloc::string::String,
467}
468#[derive(Clone, PartialEq, ::prost::Message)]
470pub struct AgentPayload {
471 #[prost(string, tag = "1")]
473 pub host_name: ::prost::alloc::string::String,
474 #[prost(string, tag = "2")]
476 pub env: ::prost::alloc::string::String,
477 #[prost(message, repeated, tag = "5")]
479 pub tracer_payloads: ::prost::alloc::vec::Vec<TracerPayload>,
480 #[prost(map = "string, string", tag = "6")]
482 pub tags: ::std::collections::HashMap<
483 ::prost::alloc::string::String,
484 ::prost::alloc::string::String,
485 >,
486 #[prost(string, tag = "7")]
488 pub agent_version: ::prost::alloc::string::String,
489 #[prost(double, tag = "8")]
491 pub target_tps: f64,
492 #[prost(double, tag = "9")]
494 pub error_tps: f64,
495 #[prost(bool, tag = "10")]
497 pub rare_sampler_enabled: bool,
498 #[prost(message, repeated, tag = "11")]
501 pub idx_tracer_payloads: ::prost::alloc::vec::Vec<idx::TracerPayload>,
502}
503#[derive(Deserialize, Serialize)]
505#[serde(rename_all = "PascalCase")]
506#[derive(Clone, PartialEq, ::prost::Message)]
507pub struct StatsPayload {
508 #[prost(string, tag = "1")]
509 pub agent_hostname: ::prost::alloc::string::String,
510 #[prost(string, tag = "2")]
511 pub agent_env: ::prost::alloc::string::String,
512 #[prost(message, repeated, tag = "3")]
514 pub stats: ::prost::alloc::vec::Vec<ClientStatsPayload>,
515 #[prost(string, tag = "4")]
516 pub agent_version: ::prost::alloc::string::String,
517 #[prost(bool, tag = "5")]
518 pub client_computed: bool,
519 #[prost(bool, tag = "6")]
522 pub split_payload: bool,
523}
524#[derive(Deserialize, Serialize)]
527#[serde(rename_all = "PascalCase")]
528#[derive(Clone, PartialEq, ::prost::Message)]
529pub struct ClientStatsPayload {
530 #[prost(string, tag = "1")]
533 #[serde(default)]
534 pub hostname: ::prost::alloc::string::String,
535 #[prost(string, tag = "2")]
537 #[serde(default)]
538 pub env: ::prost::alloc::string::String,
539 #[prost(string, tag = "3")]
541 #[serde(default)]
542 pub version: ::prost::alloc::string::String,
543 #[prost(message, repeated, tag = "4")]
545 #[serde(default)]
546 pub stats: ::prost::alloc::vec::Vec<ClientStatsBucket>,
547 #[prost(string, tag = "5")]
549 #[serde(default)]
550 pub lang: ::prost::alloc::string::String,
551 #[prost(string, tag = "6")]
553 #[serde(default)]
554 pub tracer_version: ::prost::alloc::string::String,
555 #[prost(string, tag = "7")]
557 #[serde(default)]
558 #[serde(rename = "RuntimeID")]
559 pub runtime_id: ::prost::alloc::string::String,
560 #[prost(uint64, tag = "8")]
562 #[serde(default)]
563 pub sequence: u64,
564 #[prost(string, tag = "9")]
567 #[serde(default)]
568 pub agent_aggregation: ::prost::alloc::string::String,
569 #[prost(string, tag = "10")]
572 #[serde(default)]
573 pub service: ::prost::alloc::string::String,
574 #[prost(string, tag = "11")]
577 #[serde(default)]
578 #[serde(rename = "ContainerID")]
579 pub container_id: ::prost::alloc::string::String,
580 #[prost(string, repeated, tag = "12")]
583 #[serde(default)]
584 pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
585 #[prost(string, tag = "13")]
587 #[serde(default)]
588 pub git_commit_sha: ::prost::alloc::string::String,
589 #[prost(string, tag = "14")]
591 #[serde(default)]
592 pub image_tag: ::prost::alloc::string::String,
593 #[prost(uint64, tag = "15")]
595 #[serde(default)]
596 pub process_tags_hash: u64,
597 #[prost(string, tag = "16")]
599 #[serde(default)]
600 pub process_tags: ::prost::alloc::string::String,
601}
602#[derive(Deserialize, Serialize)]
604#[serde(rename_all = "PascalCase")]
605#[derive(Clone, PartialEq, ::prost::Message)]
606pub struct ClientStatsBucket {
607 #[prost(uint64, tag = "1")]
609 pub start: u64,
610 #[prost(uint64, tag = "2")]
612 pub duration: u64,
613 #[prost(message, repeated, tag = "3")]
615 pub stats: ::prost::alloc::vec::Vec<ClientGroupedStats>,
616 #[prost(int64, tag = "4")]
619 #[serde(default)]
620 pub agent_time_shift: i64,
621}
622#[derive(Deserialize, Serialize)]
624#[serde(rename_all = "PascalCase")]
625#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
626pub struct ClientGroupedStats {
627 #[prost(string, tag = "1")]
628 pub service: ::prost::alloc::string::String,
629 #[prost(string, tag = "2")]
630 pub name: ::prost::alloc::string::String,
631 #[prost(string, tag = "3")]
632 pub resource: ::prost::alloc::string::String,
633 #[prost(uint32, tag = "4")]
634 #[serde(rename = "HTTPStatusCode")]
635 pub http_status_code: u32,
636 #[prost(string, tag = "5")]
637 #[serde(default)]
638 pub r#type: ::prost::alloc::string::String,
639 #[prost(string, tag = "6")]
641 #[serde(default)]
642 #[serde(rename = "DBType")]
643 pub db_type: ::prost::alloc::string::String,
644 #[prost(uint64, tag = "7")]
646 pub hits: u64,
647 #[prost(uint64, tag = "8")]
649 pub errors: u64,
650 #[prost(uint64, tag = "9")]
652 pub duration: u64,
653 #[prost(bytes = "vec", tag = "10")]
655 #[serde(with = "serde_bytes")]
656 pub ok_summary: ::prost::alloc::vec::Vec<u8>,
657 #[prost(bytes = "vec", tag = "11")]
659 #[serde(with = "serde_bytes")]
660 pub error_summary: ::prost::alloc::vec::Vec<u8>,
661 #[prost(bool, tag = "12")]
663 pub synthetics: bool,
664 #[prost(uint64, tag = "13")]
666 pub top_level_hits: u64,
667 #[prost(string, tag = "15")]
669 #[serde(default)]
670 pub span_kind: ::prost::alloc::string::String,
671 #[prost(string, repeated, tag = "16")]
674 #[serde(default)]
675 pub peer_tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
676 #[prost(enumeration = "Trilean", tag = "17")]
678 #[serde(default)]
679 pub is_trace_root: i32,
680 #[prost(string, tag = "18")]
681 #[serde(default)]
682 #[serde(rename = "GRPCStatusCode")]
683 pub grpc_status_code: ::prost::alloc::string::String,
684 #[prost(string, tag = "19")]
686 #[serde(default)]
687 #[serde(rename = "HTTPMethod")]
688 pub http_method: ::prost::alloc::string::String,
689 #[prost(string, tag = "20")]
691 #[serde(default)]
692 #[serde(rename = "HTTPEndpoint")]
693 pub http_endpoint: ::prost::alloc::string::String,
694 #[prost(string, tag = "21")]
696 #[serde(default)]
697 #[serde(rename = "srv_src")]
698 pub service_source: ::prost::alloc::string::String,
699 #[prost(string, repeated, tag = "22")]
702 #[serde(default)]
703 pub span_derived_primary_tags: ::prost::alloc::vec::Vec<
704 ::prost::alloc::string::String,
705 >,
706 #[prost(string, repeated, tag = "23")]
708 #[serde(default)]
709 pub additional_metric_tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
710}
711#[derive(Deserialize, Serialize)]
713#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
714#[repr(i32)]
715pub enum Trilean {
716 NotSet = 0,
717 True = 1,
718 False = 2,
719}
720impl Trilean {
721 pub fn as_str_name(&self) -> &'static str {
726 match self {
727 Self::NotSet => "NOT_SET",
728 Self::True => "TRUE",
729 Self::False => "FALSE",
730 }
731 }
732 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
734 match value {
735 "NOT_SET" => Some(Self::NotSet),
736 "TRUE" => Some(Self::True),
737 "FALSE" => Some(Self::False),
738 _ => None,
739 }
740 }
741}
742#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
743#[repr(i32)]
744pub enum TraceRootFlag {
745 DeprecatedNotSet = 0,
746 DeprecatedTrue = 1,
747 DeprecatedFalse = 2,
748}
749impl TraceRootFlag {
750 pub fn as_str_name(&self) -> &'static str {
755 match self {
756 Self::DeprecatedNotSet => "DEPRECATED_NOT_SET",
757 Self::DeprecatedTrue => "DEPRECATED_TRUE",
758 Self::DeprecatedFalse => "DEPRECATED_FALSE",
759 }
760 }
761 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
763 match value {
764 "DEPRECATED_NOT_SET" => Some(Self::DeprecatedNotSet),
765 "DEPRECATED_TRUE" => Some(Self::DeprecatedTrue),
766 "DEPRECATED_FALSE" => Some(Self::DeprecatedFalse),
767 _ => None,
768 }
769 }
770}