Skip to main content

libdd_trace_protobuf/
pb.rs

1// Copyright 2023-Present Datadog, Inc. https://www.datadoghq.com/
2// SPDX-License-Identifier: Apache-2.0
3
4use serde::{Deserialize, Serialize};
5// This file is @generated by prost-build.
6#[derive(Deserialize, Serialize)]
7#[derive(Clone, PartialEq, ::prost::Message)]
8pub struct SpanLink {
9    /// @gotags: json:"trace_id" msg:"trace_id"
10    ///
11    /// Required.
12    #[prost(uint64, tag = "1")]
13    pub trace_id: u64,
14    /// @gotags: json:"trace_id_high" msg:"trace_id_high,omitempty"
15    ///
16    /// Optional. The high 64 bits of a referenced trace id.
17    #[prost(uint64, tag = "2")]
18    #[serde(default)]
19    pub trace_id_high: u64,
20    /// @gotags: json:"span_id" msg:"span_id"
21    ///
22    /// Required.
23    #[prost(uint64, tag = "3")]
24    pub span_id: u64,
25    /// @gotags: msg:"attributes,omitempty"
26    ///
27    /// Optional. Simple mapping of keys to string values.
28    #[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    /// @gotags: msg:"tracestate,omitempty"
35    ///
36    /// Optional. W3C tracestate.
37    #[prost(string, tag = "5")]
38    #[serde(default)]
39    pub tracestate: ::prost::alloc::string::String,
40    /// @gotags: msg:"flags,omitempty"
41    ///
42    /// Optional. W3C trace flags. If set, the high bit (bit 31) must be set.
43    #[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    /// @gotags: json:"time_unix_nano" msg:"time_unix_nano"
51    ///
52    /// time is the number of nanoseconds between the Unix epoch and this event.
53    #[prost(fixed64, tag = "1")]
54    #[serde(default)]
55    pub time_unix_nano: u64,
56    /// @gotags: json:"name" msg:"name"
57    ///
58    /// name is this event's name.
59    #[prost(string, tag = "2")]
60    #[serde(default)]
61    pub name: ::prost::alloc::string::String,
62    /// attributes is a mapping from attribute key string to any value.
63    /// The order of attributes should be preserved in the key/value map.
64    /// The supported values match the OpenTelemetry attributes specification:
65    /// <https://github.com/open-telemetry/opentelemetry-proto/blob/a8f08fc49d60538f97ffabcc7feac92f832976dd/opentelemetry/proto/common/v1/common.proto>
66    /// @gotags: json:"attributes" msg:"attributes"
67    #[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/// AttributeAnyValue is used to represent any type of attribute value. AttributeAnyValue may contain a
75/// primitive value such as a string or integer or it may contain an arbitrary nested
76/// object containing arrays, key-value lists and primitives.
77#[derive(Deserialize, Serialize)]
78#[derive(Clone, PartialEq, ::prost::Message)]
79pub struct AttributeAnyValue {
80    /// We implement a union manually here because Go's MessagePack generator does not support
81    /// Protobuf `oneof` unions: <https://github.com/tinylib/msgp/issues/184>
82    /// Despite this, the format represented here is binary compatible with `oneof`, if we choose
83    /// to migrate to that in the future.
84    /// @gotags: json:"type" msg:"type"
85    #[prost(enumeration = "attribute_any_value::AttributeAnyValueType", tag = "1")]
86    #[serde(default)]
87    pub r#type: i32,
88    /// @gotags: json:"string_value" msg:"string_value"
89    #[prost(string, tag = "2")]
90    #[serde(default)]
91    pub string_value: ::prost::alloc::string::String,
92    /// @gotags: json:"bool_value" msg:"bool_value"
93    #[prost(bool, tag = "3")]
94    #[serde(default)]
95    pub bool_value: bool,
96    /// @gotags: json:"int_value" msg:"int_value"
97    #[prost(int64, tag = "4")]
98    #[serde(default)]
99    pub int_value: i64,
100    /// @gotags: json:"double_value" msg:"double_value"
101    #[prost(double, tag = "5")]
102    #[serde(default)]
103    pub double_value: f64,
104    /// @gotags: json:"array_value" msg:"array_value"
105    #[prost(message, optional, tag = "6")]
106    #[serde(default)]
107    pub array_value: ::core::option::Option<AttributeArray>,
108}
109/// Nested message and enum types in `AttributeAnyValue`.
110pub 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        /// String value of the enum field names used in the ProtoBuf definition.
132        ///
133        /// The values are not transformed in any way and thus are considered stable
134        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
135        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        /// Creates an enum from field names used in the ProtoBuf definition.
145        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/// AttributeArray is a list of AttributeArrayValue messages. We need this as a message since `oneof` in AttributeAnyValue does not allow repeated fields.
158#[derive(Deserialize, Serialize)]
159#[derive(Clone, PartialEq, ::prost::Message)]
160pub struct AttributeArray {
161    /// Array of values. The array may be empty (contain 0 elements).
162    /// @gotags: json:"values" msg:"values"
163    #[prost(message, repeated, tag = "1")]
164    #[serde(default)]
165    pub values: ::prost::alloc::vec::Vec<AttributeArrayValue>,
166}
167/// An element in the homogeneous AttributeArray.
168/// Compared to AttributeAnyValue, it only supports scalar values.
169#[derive(Deserialize, Serialize)]
170#[derive(Clone, PartialEq, ::prost::Message)]
171pub struct AttributeArrayValue {
172    /// We implement a union manually here because Go's MessagePack generator does not support
173    /// Protobuf `oneof` unions: <https://github.com/tinylib/msgp/issues/184>
174    /// Despite this, the format represented here is binary compatible with `oneof`, if we choose
175    /// to migrate to that in the future.
176    /// @gotags: json:"type" msg:"type"
177    #[prost(enumeration = "attribute_array_value::AttributeArrayValueType", tag = "1")]
178    #[serde(default)]
179    pub r#type: i32,
180    /// @gotags: json:"string_value" msg:"string_value"
181    #[prost(string, tag = "2")]
182    #[serde(default)]
183    pub string_value: ::prost::alloc::string::String,
184    /// @gotags: json:"bool_value" msg:"bool_value"
185    #[prost(bool, tag = "3")]
186    #[serde(default)]
187    pub bool_value: bool,
188    /// @gotags: json:"int_value" msg:"int_value"
189    #[prost(int64, tag = "4")]
190    #[serde(default)]
191    pub int_value: i64,
192    /// @gotags: json:"double_value" msg:"double_value"
193    #[prost(double, tag = "5")]
194    #[serde(default)]
195    pub double_value: f64,
196}
197/// Nested message and enum types in `AttributeArrayValue`.
198pub 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        /// String value of the enum field names used in the ProtoBuf definition.
219        ///
220        /// The values are not transformed in any way and thus are considered stable
221        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
222        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        /// Creates an enum from field names used in the ProtoBuf definition.
231        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    /// service is the name of the service with which this span is associated.
246    /// @gotags: json:"service" msg:"service"
247    #[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    /// name is the operation name of this span.
252    /// @gotags: json:"name" msg:"name"
253    #[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    /// resource is the resource name of this span, also sometimes called the endpoint (for web spans).
258    /// @gotags: json:"resource" msg:"resource"
259    #[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    /// traceID is the ID of the trace to which this span belongs.
264    /// @gotags: json:"trace_id" msg:"trace_id"
265    #[prost(uint64, tag = "4")]
266    #[serde(default)]
267    #[serde(deserialize_with = "crate::deserializers::deserialize_null_into_default")]
268    pub trace_id: u64,
269    /// spanID is the ID of this span.
270    /// @gotags: json:"span_id" msg:"span_id"
271    #[prost(uint64, tag = "5")]
272    #[serde(default)]
273    #[serde(deserialize_with = "crate::deserializers::deserialize_null_into_default")]
274    pub span_id: u64,
275    /// parentID is the ID of this span's parent, or zero if this span has no parent.
276    /// @gotags: json:"parent_id" msg:"parent_id"
277    #[prost(uint64, tag = "6")]
278    #[serde(default)]
279    #[serde(deserialize_with = "crate::deserializers::deserialize_null_into_default")]
280    pub parent_id: u64,
281    /// start is the number of nanoseconds between the Unix epoch and the beginning of this span.
282    /// @gotags: json:"start" msg:"start"
283    #[prost(int64, tag = "7")]
284    #[serde(default)]
285    #[serde(deserialize_with = "crate::deserializers::deserialize_null_into_default")]
286    pub start: i64,
287    /// duration is the time length of this span in nanoseconds.
288    /// @gotags: json:"duration" msg:"duration"
289    #[prost(int64, tag = "8")]
290    #[serde(default)]
291    #[serde(deserialize_with = "crate::deserializers::deserialize_duration")]
292    pub duration: i64,
293    /// error is 1 if there is an error associated with this span, or 0 if there is not.
294    /// @gotags: json:"error" msg:"error"
295    #[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    /// meta is a mapping from tag name to tag value for string-valued tags.
301    /// @gotags: json:"meta,omitempty" msg:"meta,omitempty"
302    #[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    /// metrics is a mapping from tag name to tag value for numeric-valued tags.
312    /// @gotags: json:"metrics,omitempty" msg:"metrics,omitempty"
313    #[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    /// type is the type of the service with which this span is associated.  Example values: web, db, lambda.
318    /// @gotags: json:"type" msg:"type"
319    #[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    /// meta_struct is a registry of structured "other" data used by, e.g., AppSec.
324    /// @gotags: json:"meta_struct,omitempty" msg:"meta_struct,omitempty"
325    #[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    /// span_links represents a collection of links, where each link defines a causal relationship between two spans.
334    /// @gotags: json:"span_links,omitempty" msg:"span_links,omitempty"
335    #[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    /// spanEvents represent an event at an instant in time related to this span, but not necessarily during the span.
341    /// @gotags: json:"span_events,omitempty" msg:"span_events,omitempty"
342    #[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/// TraceChunk represents a list of spans with the same trace ID. In other words, a chunk of a trace.
349#[derive(Deserialize, Serialize)]
350#[derive(Clone, PartialEq, ::prost::Message)]
351pub struct TraceChunk {
352    /// priority specifies sampling priority of the trace.
353    /// @gotags: json:"priority" msg:"priority"
354    #[prost(int32, tag = "1")]
355    pub priority: i32,
356    /// origin specifies origin product ("lambda", "rum", etc.) of the trace.
357    /// @gotags: json:"origin" msg:"origin"
358    #[prost(string, tag = "2")]
359    pub origin: ::prost::alloc::string::String,
360    /// spans specifies list of containing spans.
361    /// @gotags: json:"spans" msg:"spans"
362    #[prost(message, repeated, tag = "3")]
363    pub spans: ::prost::alloc::vec::Vec<Span>,
364    /// tags specifies tags common in all `spans`.
365    /// @gotags: json:"tags" msg:"tags"
366    #[prost(map = "string, string", tag = "4")]
367    pub tags: ::std::collections::HashMap<
368        ::prost::alloc::string::String,
369        ::prost::alloc::string::String,
370    >,
371    /// droppedTrace specifies whether the trace was dropped by samplers or not.
372    /// @gotags: json:"dropped_trace" msg:"dropped_trace"
373    #[prost(bool, tag = "5")]
374    pub dropped_trace: bool,
375}
376/// TracerPayload represents a payload the trace agent receives from tracers.
377#[derive(Deserialize, Serialize)]
378#[derive(Clone, PartialEq, ::prost::Message)]
379pub struct TracerPayload {
380    /// containerID specifies the ID of the container where the tracer is running on.
381    /// @gotags: json:"container_id" msg:"container_id"
382    #[prost(string, tag = "1")]
383    pub container_id: ::prost::alloc::string::String,
384    /// languageName specifies language of the tracer.
385    /// @gotags: json:"language_name" msg:"language_name"
386    #[prost(string, tag = "2")]
387    pub language_name: ::prost::alloc::string::String,
388    /// languageVersion specifies language version of the tracer.
389    /// @gotags: json:"language_version" msg:"language_version"
390    #[prost(string, tag = "3")]
391    pub language_version: ::prost::alloc::string::String,
392    /// tracerVersion specifies version of the tracer.
393    /// @gotags: json:"tracer_version" msg:"tracer_version"
394    #[prost(string, tag = "4")]
395    pub tracer_version: ::prost::alloc::string::String,
396    /// runtimeID specifies V4 UUID representation of a tracer session.
397    /// @gotags: json:"runtime_id" msg:"runtime_id"
398    #[prost(string, tag = "5")]
399    pub runtime_id: ::prost::alloc::string::String,
400    /// chunks specifies list of containing trace chunks.
401    /// @gotags: json:"chunks" msg:"chunks"
402    #[prost(message, repeated, tag = "6")]
403    pub chunks: ::prost::alloc::vec::Vec<TraceChunk>,
404    /// tags specifies tags common in all `chunks`.
405    /// @gotags: json:"tags" msg:"tags"
406    #[prost(map = "string, string", tag = "7")]
407    pub tags: ::std::collections::HashMap<
408        ::prost::alloc::string::String,
409        ::prost::alloc::string::String,
410    >,
411    /// env specifies `env` tag that set with the tracer.
412    /// @gotags: json:"env" msg:"env"
413    #[prost(string, tag = "8")]
414    pub env: ::prost::alloc::string::String,
415    /// hostname specifies hostname of where the tracer is running.
416    /// @gotags: json:"hostname" msg:"hostname"
417    #[prost(string, tag = "9")]
418    pub hostname: ::prost::alloc::string::String,
419    /// version specifies `version` tag that set with the tracer.
420    /// @gotags: json:"app_version" msg:"app_version"
421    #[prost(string, tag = "10")]
422    pub app_version: ::prost::alloc::string::String,
423}
424/// AgentPayload represents payload the agent sends to the intake.
425#[derive(Clone, PartialEq, ::prost::Message)]
426pub struct AgentPayload {
427    /// hostName specifies hostname of where the agent is running.
428    #[prost(string, tag = "1")]
429    pub host_name: ::prost::alloc::string::String,
430    /// env specifies `env` set in agent configuration.
431    #[prost(string, tag = "2")]
432    pub env: ::prost::alloc::string::String,
433    /// tracerPayloads specifies list of the payloads received from tracers.
434    #[prost(message, repeated, tag = "5")]
435    pub tracer_payloads: ::prost::alloc::vec::Vec<TracerPayload>,
436    /// tags specifies tags common in all `tracerPayloads`.
437    #[prost(map = "string, string", tag = "6")]
438    pub tags: ::std::collections::HashMap<
439        ::prost::alloc::string::String,
440        ::prost::alloc::string::String,
441    >,
442    /// agentVersion specifies version of the agent.
443    #[prost(string, tag = "7")]
444    pub agent_version: ::prost::alloc::string::String,
445    /// targetTPS holds `TargetTPS` value in AgentConfig.
446    #[prost(double, tag = "8")]
447    pub target_tps: f64,
448    /// errorTPS holds `ErrorTPS` value in AgentConfig.
449    #[prost(double, tag = "9")]
450    pub error_tps: f64,
451    /// rareSamplerEnabled holds `RareSamplerEnabled` value in AgentConfig
452    #[prost(bool, tag = "10")]
453    pub rare_sampler_enabled: bool,
454    /// idxTracerPayloads specifies list of the payloads received from tracers.
455    /// @gotags: msg:"-"
456    #[prost(message, repeated, tag = "11")]
457    pub idx_tracer_payloads: ::prost::alloc::vec::Vec<idx::TracerPayload>,
458}
459/// StatsPayload is the payload used to send stats from the agent to the backend.
460#[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    /// @gotags: json:"stats,omitempty" msg:"Stats,omitempty"
469    #[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    /// splitPayload indicates if the payload is actually one of several payloads split out from a larger payload.
476    /// This field can be used in the backend to signal if re-aggregation is necessary.
477    #[prost(bool, tag = "6")]
478    pub split_payload: bool,
479}
480/// ClientStatsPayload is the first layer of span stats aggregation. It is also
481/// the payload sent by tracers to the agent when stats in tracer are enabled.
482#[derive(Deserialize, Serialize)]
483#[serde(rename_all = "PascalCase")]
484#[derive(Clone, PartialEq, ::prost::Message)]
485pub struct ClientStatsPayload {
486    /// Hostname is the tracer hostname. It's extracted from spans with "_dd.hostname" meta
487    /// or set by tracer stats payload when hostname reporting is enabled.
488    #[prost(string, tag = "1")]
489    #[serde(default)]
490    pub hostname: ::prost::alloc::string::String,
491    /// env tag set on spans or in the tracers, used for aggregation
492    #[prost(string, tag = "2")]
493    #[serde(default)]
494    pub env: ::prost::alloc::string::String,
495    /// version tag set on spans or in the tracers, used for aggregation
496    #[prost(string, tag = "3")]
497    #[serde(default)]
498    pub version: ::prost::alloc::string::String,
499    /// @gotags: json:"stats,omitempty" msg:"Stats,omitempty"
500    #[prost(message, repeated, tag = "4")]
501    #[serde(default)]
502    pub stats: ::prost::alloc::vec::Vec<ClientStatsBucket>,
503    /// informative field not used for aggregation
504    #[prost(string, tag = "5")]
505    #[serde(default)]
506    pub lang: ::prost::alloc::string::String,
507    /// informative field not used for aggregation
508    #[prost(string, tag = "6")]
509    #[serde(default)]
510    pub tracer_version: ::prost::alloc::string::String,
511    /// used on stats payloads sent by the tracer to identify uniquely a message
512    #[prost(string, tag = "7")]
513    #[serde(default)]
514    #[serde(rename = "RuntimeID")]
515    pub runtime_id: ::prost::alloc::string::String,
516    /// used on stats payloads sent by the tracer to identify uniquely a message
517    #[prost(uint64, tag = "8")]
518    #[serde(default)]
519    pub sequence: u64,
520    /// AgentAggregation is set by the agent on tracer payloads modified by the agent aggregation layer
521    /// characterizes counts only and distributions only payloads
522    #[prost(string, tag = "9")]
523    #[serde(default)]
524    pub agent_aggregation: ::prost::alloc::string::String,
525    /// Service is the main service of the tracer.
526    /// It is part of unified tagging: <https://docs.datadoghq.com/getting_started/tagging/unified_service_tagging>
527    #[prost(string, tag = "10")]
528    #[serde(default)]
529    pub service: ::prost::alloc::string::String,
530    /// ContainerID specifies the origin container ID. It is meant to be populated by the client and may
531    /// be enhanced by the agent to ensure it is unique.
532    #[prost(string, tag = "11")]
533    #[serde(default)]
534    #[serde(rename = "ContainerID")]
535    pub container_id: ::prost::alloc::string::String,
536    /// Tags specifies a set of tags obtained from the orchestrator (where applicable) using the specified containerID.
537    /// This field should be left empty by the client. It only applies to some specific environment.
538    #[prost(string, repeated, tag = "12")]
539    #[serde(default)]
540    pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
541    /// The git commit SHA is obtained from a trace, where it may be set through a tracer <-> source code integration.
542    #[prost(string, tag = "13")]
543    #[serde(default)]
544    pub git_commit_sha: ::prost::alloc::string::String,
545    /// The image tag is obtained from a container's set of tags.
546    #[prost(string, tag = "14")]
547    #[serde(default)]
548    pub image_tag: ::prost::alloc::string::String,
549    /// The process tags hash is used as a key for agent stats agregation.
550    #[prost(uint64, tag = "15")]
551    #[serde(default)]
552    pub process_tags_hash: u64,
553    /// The process tags contains a list of tags that are specific to the process.
554    #[prost(string, tag = "16")]
555    #[serde(default)]
556    pub process_tags: ::prost::alloc::string::String,
557}
558/// ClientStatsBucket is a time bucket containing aggregated stats.
559#[derive(Deserialize, Serialize)]
560#[serde(rename_all = "PascalCase")]
561#[derive(Clone, PartialEq, ::prost::Message)]
562pub struct ClientStatsBucket {
563    /// bucket start in nanoseconds
564    #[prost(uint64, tag = "1")]
565    pub start: u64,
566    /// bucket duration in nanoseconds
567    #[prost(uint64, tag = "2")]
568    pub duration: u64,
569    /// @gotags: json:"stats,omitempty" msg:"Stats,omitempty"
570    #[prost(message, repeated, tag = "3")]
571    pub stats: ::prost::alloc::vec::Vec<ClientGroupedStats>,
572    /// AgentTimeShift is the shift applied by the agent stats aggregator on bucket start
573    /// when the received bucket start is outside of the agent aggregation window
574    #[prost(int64, tag = "4")]
575    #[serde(default)]
576    pub agent_time_shift: i64,
577}
578/// ClientGroupedStats aggregate stats on spans grouped by service, name, resource, status_code, type
579#[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    /// db_type might be used in the future to help in the obfuscation step
596    #[prost(string, tag = "6")]
597    #[serde(default)]
598    #[serde(rename = "DBType")]
599    pub db_type: ::prost::alloc::string::String,
600    /// count of all spans aggregated in the groupedstats
601    #[prost(uint64, tag = "7")]
602    pub hits: u64,
603    /// count of error spans aggregated in the groupedstats
604    #[prost(uint64, tag = "8")]
605    pub errors: u64,
606    /// total duration in nanoseconds of spans aggregated in the bucket
607    #[prost(uint64, tag = "9")]
608    pub duration: u64,
609    /// ddsketch summary of ok spans latencies encoded in protobuf
610    #[prost(bytes = "vec", tag = "10")]
611    #[serde(with = "serde_bytes")]
612    pub ok_summary: ::prost::alloc::vec::Vec<u8>,
613    /// ddsketch summary of error spans latencies encoded in protobuf
614    #[prost(bytes = "vec", tag = "11")]
615    #[serde(with = "serde_bytes")]
616    pub error_summary: ::prost::alloc::vec::Vec<u8>,
617    /// set to true on spans generated by synthetics traffic
618    #[prost(bool, tag = "12")]
619    pub synthetics: bool,
620    /// count of top level spans aggregated in the groupedstats
621    #[prost(uint64, tag = "13")]
622    pub top_level_hits: u64,
623    /// value of the span.kind tag on the span
624    #[prost(string, tag = "15")]
625    #[serde(default)]
626    pub span_kind: ::prost::alloc::string::String,
627    /// peer_tags are supplementary tags that further describe a peer entity
628    /// E.g., `grpc.target` to describe the name of a gRPC peer, or `db.hostname` to describe the name of peer DB
629    #[prost(string, repeated, tag = "16")]
630    #[serde(default)]
631    pub peer_tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
632    /// this field's value is equal to span's ParentID == 0.
633    #[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    /// HTTP method of the request
641    #[prost(string, tag = "19")]
642    #[serde(default)]
643    #[serde(rename = "HTTPMethod")]
644    pub http_method: ::prost::alloc::string::String,
645    /// Http route or quantized/simplified URL path
646    #[prost(string, tag = "20")]
647    #[serde(default)]
648    #[serde(rename = "HTTPEndpoint")]
649    pub http_endpoint: ::prost::alloc::string::String,
650    /// @inject_tag: msg:"srv_src"
651    #[prost(string, tag = "21")]
652    #[serde(default)]
653    #[serde(rename = "srv_src")]
654    pub service_source: ::prost::alloc::string::String,
655    /// used to identify service override origin
656    /// span_derived_primary_tags are user-configured tags that are extracted from spans and used for stats aggregation
657    /// E.g., `aws.s3.bucket`, `http.url`, or any custom tag
658    #[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/// Trilean is an expanded boolean type that is meant to differentiate between being unset and false.
665#[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    /// String value of the enum field names used in the ProtoBuf definition.
674    ///
675    /// The values are not transformed in any way and thus are considered stable
676    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
677    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    /// Creates an enum from field names used in the ProtoBuf definition.
685    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    /// String value of the enum field names used in the ProtoBuf definition.
703    ///
704    /// The values are not transformed in any way and thus are considered stable
705    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
706    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    /// Creates an enum from field names used in the ProtoBuf definition.
714    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}