1use serde::{Deserialize, Serialize};
5#[derive(Deserialize, Serialize)]
7#[derive(Clone, PartialEq, ::prost::Message)]
8pub struct SpanLink {
9 #[prost(uint64, tag = "1")]
13 pub trace_id: u64,
14 #[prost(uint64, tag = "2")]
18 #[serde(default)]
19 pub trace_id_high: u64,
20 #[prost(uint64, tag = "3")]
24 pub span_id: u64,
25 #[prost(map = "string, string", tag = "4")]
29 #[serde(default)]
30 pub attributes: ::std::collections::HashMap<
31 ::prost::alloc::string::String,
32 ::prost::alloc::string::String,
33 >,
34 #[prost(string, tag = "5")]
38 #[serde(default)]
39 pub tracestate: ::prost::alloc::string::String,
40 #[prost(uint32, tag = "6")]
44 #[serde(default)]
45 pub flags: u32,
46}
47#[derive(Deserialize, Serialize)]
48#[derive(Clone, PartialEq, ::prost::Message)]
49pub struct SpanEvent {
50 #[prost(fixed64, tag = "1")]
54 #[serde(default)]
55 pub time_unix_nano: u64,
56 #[prost(string, tag = "2")]
60 #[serde(default)]
61 pub name: ::prost::alloc::string::String,
62 #[prost(map = "string, message", tag = "3")]
68 #[serde(default)]
69 pub attributes: ::std::collections::HashMap<
70 ::prost::alloc::string::String,
71 AttributeAnyValue,
72 >,
73}
74#[derive(Deserialize, Serialize)]
78#[derive(Clone, PartialEq, ::prost::Message)]
79pub struct AttributeAnyValue {
80 #[prost(enumeration = "attribute_any_value::AttributeAnyValueType", tag = "1")]
86 #[serde(default)]
87 pub r#type: i32,
88 #[prost(string, tag = "2")]
90 #[serde(default)]
91 pub string_value: ::prost::alloc::string::String,
92 #[prost(bool, tag = "3")]
94 #[serde(default)]
95 pub bool_value: bool,
96 #[prost(int64, tag = "4")]
98 #[serde(default)]
99 pub int_value: i64,
100 #[prost(double, tag = "5")]
102 #[serde(default)]
103 pub double_value: f64,
104 #[prost(message, optional, tag = "6")]
106 #[serde(default)]
107 pub array_value: ::core::option::Option<AttributeArray>,
108}
109pub mod attribute_any_value {
111 #[derive(
112 Clone,
113 Copy,
114 Debug,
115 PartialEq,
116 Eq,
117 Hash,
118 PartialOrd,
119 Ord,
120 ::prost::Enumeration
121 )]
122 #[repr(i32)]
123 pub enum AttributeAnyValueType {
124 StringValue = 0,
125 BoolValue = 1,
126 IntValue = 2,
127 DoubleValue = 3,
128 ArrayValue = 4,
129 }
130 impl AttributeAnyValueType {
131 pub fn as_str_name(&self) -> &'static str {
136 match self {
137 Self::StringValue => "STRING_VALUE",
138 Self::BoolValue => "BOOL_VALUE",
139 Self::IntValue => "INT_VALUE",
140 Self::DoubleValue => "DOUBLE_VALUE",
141 Self::ArrayValue => "ARRAY_VALUE",
142 }
143 }
144 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
146 match value {
147 "STRING_VALUE" => Some(Self::StringValue),
148 "BOOL_VALUE" => Some(Self::BoolValue),
149 "INT_VALUE" => Some(Self::IntValue),
150 "DOUBLE_VALUE" => Some(Self::DoubleValue),
151 "ARRAY_VALUE" => Some(Self::ArrayValue),
152 _ => None,
153 }
154 }
155 }
156}
157#[derive(Deserialize, Serialize)]
159#[derive(Clone, PartialEq, ::prost::Message)]
160pub struct AttributeArray {
161 #[prost(message, repeated, tag = "1")]
164 #[serde(default)]
165 pub values: ::prost::alloc::vec::Vec<AttributeArrayValue>,
166}
167#[derive(Deserialize, Serialize)]
170#[derive(Clone, PartialEq, ::prost::Message)]
171pub struct AttributeArrayValue {
172 #[prost(enumeration = "attribute_array_value::AttributeArrayValueType", tag = "1")]
178 #[serde(default)]
179 pub r#type: i32,
180 #[prost(string, tag = "2")]
182 #[serde(default)]
183 pub string_value: ::prost::alloc::string::String,
184 #[prost(bool, tag = "3")]
186 #[serde(default)]
187 pub bool_value: bool,
188 #[prost(int64, tag = "4")]
190 #[serde(default)]
191 pub int_value: i64,
192 #[prost(double, tag = "5")]
194 #[serde(default)]
195 pub double_value: f64,
196}
197pub mod attribute_array_value {
199 #[derive(
200 Clone,
201 Copy,
202 Debug,
203 PartialEq,
204 Eq,
205 Hash,
206 PartialOrd,
207 Ord,
208 ::prost::Enumeration
209 )]
210 #[repr(i32)]
211 pub enum AttributeArrayValueType {
212 StringValue = 0,
213 BoolValue = 1,
214 IntValue = 2,
215 DoubleValue = 3,
216 }
217 impl AttributeArrayValueType {
218 pub fn as_str_name(&self) -> &'static str {
223 match self {
224 Self::StringValue => "STRING_VALUE",
225 Self::BoolValue => "BOOL_VALUE",
226 Self::IntValue => "INT_VALUE",
227 Self::DoubleValue => "DOUBLE_VALUE",
228 }
229 }
230 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
232 match value {
233 "STRING_VALUE" => Some(Self::StringValue),
234 "BOOL_VALUE" => Some(Self::BoolValue),
235 "INT_VALUE" => Some(Self::IntValue),
236 "DOUBLE_VALUE" => Some(Self::DoubleValue),
237 _ => None,
238 }
239 }
240 }
241}
242#[derive(Deserialize, Serialize)]
243#[derive(Clone, PartialEq, ::prost::Message)]
244pub struct Span {
245 #[prost(string, tag = "1")]
248 #[serde(default)]
249 #[serde(deserialize_with = "crate::deserializers::deserialize_null_into_default")]
250 pub service: ::prost::alloc::string::String,
251 #[prost(string, tag = "2")]
254 #[serde(default)]
255 #[serde(deserialize_with = "crate::deserializers::deserialize_null_into_default")]
256 pub name: ::prost::alloc::string::String,
257 #[prost(string, tag = "3")]
260 #[serde(default)]
261 #[serde(deserialize_with = "crate::deserializers::deserialize_null_into_default")]
262 pub resource: ::prost::alloc::string::String,
263 #[prost(uint64, tag = "4")]
266 #[serde(default)]
267 #[serde(deserialize_with = "crate::deserializers::deserialize_null_into_default")]
268 pub trace_id: u64,
269 #[prost(uint64, tag = "5")]
272 #[serde(default)]
273 #[serde(deserialize_with = "crate::deserializers::deserialize_null_into_default")]
274 pub span_id: u64,
275 #[prost(uint64, tag = "6")]
278 #[serde(default)]
279 #[serde(deserialize_with = "crate::deserializers::deserialize_null_into_default")]
280 pub parent_id: u64,
281 #[prost(int64, tag = "7")]
284 #[serde(default)]
285 #[serde(deserialize_with = "crate::deserializers::deserialize_null_into_default")]
286 pub start: i64,
287 #[prost(int64, tag = "8")]
290 #[serde(default)]
291 #[serde(deserialize_with = "crate::deserializers::deserialize_duration")]
292 pub duration: i64,
293 #[prost(int32, tag = "9")]
296 #[serde(default)]
297 #[serde(deserialize_with = "crate::deserializers::deserialize_null_into_default")]
298 #[serde(skip_serializing_if = "crate::deserializers::is_default")]
299 pub error: i32,
300 #[prost(map = "string, string", tag = "10")]
303 #[serde(default)]
304 #[serde(
305 deserialize_with = "crate::deserializers::deserialize_map_with_nullable_values"
306 )]
307 pub meta: ::std::collections::HashMap<
308 ::prost::alloc::string::String,
309 ::prost::alloc::string::String,
310 >,
311 #[prost(map = "string, double", tag = "11")]
314 #[serde(default)]
315 #[serde(deserialize_with = "crate::deserializers::deserialize_null_into_default")]
316 pub metrics: ::std::collections::HashMap<::prost::alloc::string::String, f64>,
317 #[prost(string, tag = "12")]
320 #[serde(default)]
321 #[serde(deserialize_with = "crate::deserializers::deserialize_null_into_default")]
322 pub r#type: ::prost::alloc::string::String,
323 #[prost(map = "string, bytes", tag = "13")]
326 #[serde(default)]
327 #[serde(deserialize_with = "crate::deserializers::deserialize_null_into_default")]
328 #[serde(skip_serializing_if = "::std::collections::HashMap::is_empty")]
329 pub meta_struct: ::std::collections::HashMap<
330 ::prost::alloc::string::String,
331 ::prost::alloc::vec::Vec<u8>,
332 >,
333 #[prost(message, repeated, tag = "14")]
336 #[serde(default)]
337 #[serde(deserialize_with = "crate::deserializers::deserialize_null_into_default")]
338 #[serde(skip_serializing_if = "::prost::alloc::vec::Vec::is_empty")]
339 pub span_links: ::prost::alloc::vec::Vec<SpanLink>,
340 #[prost(message, repeated, tag = "15")]
343 #[serde(default)]
344 #[serde(deserialize_with = "crate::deserializers::deserialize_null_into_default")]
345 #[serde(skip_serializing_if = "::prost::alloc::vec::Vec::is_empty")]
346 pub span_events: ::prost::alloc::vec::Vec<SpanEvent>,
347}
348#[derive(Deserialize, Serialize)]
350#[derive(Clone, PartialEq, ::prost::Message)]
351pub struct TraceChunk {
352 #[prost(int32, tag = "1")]
355 pub priority: i32,
356 #[prost(string, tag = "2")]
359 pub origin: ::prost::alloc::string::String,
360 #[prost(message, repeated, tag = "3")]
363 pub spans: ::prost::alloc::vec::Vec<Span>,
364 #[prost(map = "string, string", tag = "4")]
367 pub tags: ::std::collections::HashMap<
368 ::prost::alloc::string::String,
369 ::prost::alloc::string::String,
370 >,
371 #[prost(bool, tag = "5")]
374 pub dropped_trace: bool,
375}
376#[derive(Deserialize, Serialize)]
378#[derive(Clone, PartialEq, ::prost::Message)]
379pub struct TracerPayload {
380 #[prost(string, tag = "1")]
383 pub container_id: ::prost::alloc::string::String,
384 #[prost(string, tag = "2")]
387 pub language_name: ::prost::alloc::string::String,
388 #[prost(string, tag = "3")]
391 pub language_version: ::prost::alloc::string::String,
392 #[prost(string, tag = "4")]
395 pub tracer_version: ::prost::alloc::string::String,
396 #[prost(string, tag = "5")]
399 pub runtime_id: ::prost::alloc::string::String,
400 #[prost(message, repeated, tag = "6")]
403 pub chunks: ::prost::alloc::vec::Vec<TraceChunk>,
404 #[prost(map = "string, string", tag = "7")]
407 pub tags: ::std::collections::HashMap<
408 ::prost::alloc::string::String,
409 ::prost::alloc::string::String,
410 >,
411 #[prost(string, tag = "8")]
414 pub env: ::prost::alloc::string::String,
415 #[prost(string, tag = "9")]
418 pub hostname: ::prost::alloc::string::String,
419 #[prost(string, tag = "10")]
422 pub app_version: ::prost::alloc::string::String,
423}
424#[derive(Clone, PartialEq, ::prost::Message)]
426pub struct AgentPayload {
427 #[prost(string, tag = "1")]
429 pub host_name: ::prost::alloc::string::String,
430 #[prost(string, tag = "2")]
432 pub env: ::prost::alloc::string::String,
433 #[prost(message, repeated, tag = "5")]
435 pub tracer_payloads: ::prost::alloc::vec::Vec<TracerPayload>,
436 #[prost(map = "string, string", tag = "6")]
438 pub tags: ::std::collections::HashMap<
439 ::prost::alloc::string::String,
440 ::prost::alloc::string::String,
441 >,
442 #[prost(string, tag = "7")]
444 pub agent_version: ::prost::alloc::string::String,
445 #[prost(double, tag = "8")]
447 pub target_tps: f64,
448 #[prost(double, tag = "9")]
450 pub error_tps: f64,
451 #[prost(bool, tag = "10")]
453 pub rare_sampler_enabled: bool,
454 #[prost(message, repeated, tag = "11")]
457 pub idx_tracer_payloads: ::prost::alloc::vec::Vec<idx::TracerPayload>,
458}
459#[derive(Deserialize, Serialize)]
461#[serde(rename_all = "PascalCase")]
462#[derive(Clone, PartialEq, ::prost::Message)]
463pub struct StatsPayload {
464 #[prost(string, tag = "1")]
465 pub agent_hostname: ::prost::alloc::string::String,
466 #[prost(string, tag = "2")]
467 pub agent_env: ::prost::alloc::string::String,
468 #[prost(message, repeated, tag = "3")]
470 pub stats: ::prost::alloc::vec::Vec<ClientStatsPayload>,
471 #[prost(string, tag = "4")]
472 pub agent_version: ::prost::alloc::string::String,
473 #[prost(bool, tag = "5")]
474 pub client_computed: bool,
475 #[prost(bool, tag = "6")]
478 pub split_payload: bool,
479}
480#[derive(Deserialize, Serialize)]
483#[serde(rename_all = "PascalCase")]
484#[derive(Clone, PartialEq, ::prost::Message)]
485pub struct ClientStatsPayload {
486 #[prost(string, tag = "1")]
489 #[serde(default)]
490 pub hostname: ::prost::alloc::string::String,
491 #[prost(string, tag = "2")]
493 #[serde(default)]
494 pub env: ::prost::alloc::string::String,
495 #[prost(string, tag = "3")]
497 #[serde(default)]
498 pub version: ::prost::alloc::string::String,
499 #[prost(message, repeated, tag = "4")]
501 #[serde(default)]
502 pub stats: ::prost::alloc::vec::Vec<ClientStatsBucket>,
503 #[prost(string, tag = "5")]
505 #[serde(default)]
506 pub lang: ::prost::alloc::string::String,
507 #[prost(string, tag = "6")]
509 #[serde(default)]
510 pub tracer_version: ::prost::alloc::string::String,
511 #[prost(string, tag = "7")]
513 #[serde(default)]
514 #[serde(rename = "RuntimeID")]
515 pub runtime_id: ::prost::alloc::string::String,
516 #[prost(uint64, tag = "8")]
518 #[serde(default)]
519 pub sequence: u64,
520 #[prost(string, tag = "9")]
523 #[serde(default)]
524 pub agent_aggregation: ::prost::alloc::string::String,
525 #[prost(string, tag = "10")]
528 #[serde(default)]
529 pub service: ::prost::alloc::string::String,
530 #[prost(string, tag = "11")]
533 #[serde(default)]
534 #[serde(rename = "ContainerID")]
535 pub container_id: ::prost::alloc::string::String,
536 #[prost(string, repeated, tag = "12")]
539 #[serde(default)]
540 pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
541 #[prost(string, tag = "13")]
543 #[serde(default)]
544 pub git_commit_sha: ::prost::alloc::string::String,
545 #[prost(string, tag = "14")]
547 #[serde(default)]
548 pub image_tag: ::prost::alloc::string::String,
549 #[prost(uint64, tag = "15")]
551 #[serde(default)]
552 pub process_tags_hash: u64,
553 #[prost(string, tag = "16")]
555 #[serde(default)]
556 pub process_tags: ::prost::alloc::string::String,
557}
558#[derive(Deserialize, Serialize)]
560#[serde(rename_all = "PascalCase")]
561#[derive(Clone, PartialEq, ::prost::Message)]
562pub struct ClientStatsBucket {
563 #[prost(uint64, tag = "1")]
565 pub start: u64,
566 #[prost(uint64, tag = "2")]
568 pub duration: u64,
569 #[prost(message, repeated, tag = "3")]
571 pub stats: ::prost::alloc::vec::Vec<ClientGroupedStats>,
572 #[prost(int64, tag = "4")]
575 #[serde(default)]
576 pub agent_time_shift: i64,
577}
578#[derive(Deserialize, Serialize)]
580#[serde(rename_all = "PascalCase")]
581#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
582pub struct ClientGroupedStats {
583 #[prost(string, tag = "1")]
584 pub service: ::prost::alloc::string::String,
585 #[prost(string, tag = "2")]
586 pub name: ::prost::alloc::string::String,
587 #[prost(string, tag = "3")]
588 pub resource: ::prost::alloc::string::String,
589 #[prost(uint32, tag = "4")]
590 #[serde(rename = "HTTPStatusCode")]
591 pub http_status_code: u32,
592 #[prost(string, tag = "5")]
593 #[serde(default)]
594 pub r#type: ::prost::alloc::string::String,
595 #[prost(string, tag = "6")]
597 #[serde(default)]
598 #[serde(rename = "DBType")]
599 pub db_type: ::prost::alloc::string::String,
600 #[prost(uint64, tag = "7")]
602 pub hits: u64,
603 #[prost(uint64, tag = "8")]
605 pub errors: u64,
606 #[prost(uint64, tag = "9")]
608 pub duration: u64,
609 #[prost(bytes = "vec", tag = "10")]
611 #[serde(with = "serde_bytes")]
612 pub ok_summary: ::prost::alloc::vec::Vec<u8>,
613 #[prost(bytes = "vec", tag = "11")]
615 #[serde(with = "serde_bytes")]
616 pub error_summary: ::prost::alloc::vec::Vec<u8>,
617 #[prost(bool, tag = "12")]
619 pub synthetics: bool,
620 #[prost(uint64, tag = "13")]
622 pub top_level_hits: u64,
623 #[prost(string, tag = "15")]
625 #[serde(default)]
626 pub span_kind: ::prost::alloc::string::String,
627 #[prost(string, repeated, tag = "16")]
630 #[serde(default)]
631 pub peer_tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
632 #[prost(enumeration = "Trilean", tag = "17")]
634 #[serde(default)]
635 pub is_trace_root: i32,
636 #[prost(string, tag = "18")]
637 #[serde(default)]
638 #[serde(rename = "GRPCStatusCode")]
639 pub grpc_status_code: ::prost::alloc::string::String,
640 #[prost(string, tag = "19")]
642 #[serde(default)]
643 #[serde(rename = "HTTPMethod")]
644 pub http_method: ::prost::alloc::string::String,
645 #[prost(string, tag = "20")]
647 #[serde(default)]
648 #[serde(rename = "HTTPEndpoint")]
649 pub http_endpoint: ::prost::alloc::string::String,
650 #[prost(string, tag = "21")]
652 #[serde(default)]
653 #[serde(rename = "srv_src")]
654 pub service_source: ::prost::alloc::string::String,
655 #[prost(string, repeated, tag = "22")]
659 #[serde(default)]
660 pub span_derived_primary_tags: ::prost::alloc::vec::Vec<
661 ::prost::alloc::string::String,
662 >,
663}
664#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
666#[repr(i32)]
667pub enum Trilean {
668 NotSet = 0,
669 True = 1,
670 False = 2,
671}
672impl Trilean {
673 pub fn as_str_name(&self) -> &'static str {
678 match self {
679 Self::NotSet => "NOT_SET",
680 Self::True => "TRUE",
681 Self::False => "FALSE",
682 }
683 }
684 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
686 match value {
687 "NOT_SET" => Some(Self::NotSet),
688 "TRUE" => Some(Self::True),
689 "FALSE" => Some(Self::False),
690 _ => None,
691 }
692 }
693}
694#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
695#[repr(i32)]
696pub enum TraceRootFlag {
697 DeprecatedNotSet = 0,
698 DeprecatedTrue = 1,
699 DeprecatedFalse = 2,
700}
701impl TraceRootFlag {
702 pub fn as_str_name(&self) -> &'static str {
707 match self {
708 Self::DeprecatedNotSet => "DEPRECATED_NOT_SET",
709 Self::DeprecatedTrue => "DEPRECATED_TRUE",
710 Self::DeprecatedFalse => "DEPRECATED_FALSE",
711 }
712 }
713 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
715 match value {
716 "DEPRECATED_NOT_SET" => Some(Self::DeprecatedNotSet),
717 "DEPRECATED_TRUE" => Some(Self::DeprecatedTrue),
718 "DEPRECATED_FALSE" => Some(Self::DeprecatedFalse),
719 _ => None,
720 }
721 }
722}