devtools_wire_format/generated/
rs.devtools.spans.rs

1// This file is @generated by prost-build.
2#[allow(clippy::derive_partial_eq_without_eq)]
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct Update {
5    /// A list of span events that happened since the last update.
6    #[prost(message, repeated, tag = "1")]
7    pub span_events: ::prost::alloc::vec::Vec<SpanEvent>,
8    /// A count of how many log events were dropped because
9    /// the event buffer was at capacity.
10    ///
11    /// If everything is working correctly, this should be 0. If this
12    /// number is greater than zero this indicates the event buffers capacity
13    /// should be increased or the publish interval decreased.
14    #[prost(uint64, tag = "2")]
15    pub dropped_events: u64,
16}
17/// A span event
18///
19/// Span events are emitted whenever a span lifecycle event happens and are thus rather low-level by nature.
20#[allow(clippy::derive_partial_eq_without_eq)]
21#[derive(Clone, PartialEq, ::prost::Message)]
22pub struct SpanEvent {
23    #[prost(oneof = "span_event::Event", tags = "1, 2, 3, 4, 5")]
24    pub event: ::core::option::Option<span_event::Event>,
25}
26/// Nested message and enum types in `SpanEvent`.
27pub mod span_event {
28    /// Represents a period of time in which a program was executing in a particular context.
29    ///
30    /// Corresponds to `Span` in the `tracing` crate.
31    #[allow(clippy::derive_partial_eq_without_eq)]
32    #[derive(Clone, PartialEq, ::prost::Message)]
33    pub struct Span {
34        /// An Id that uniquely identifies it in relation to other spans.
35        #[prost(uint64, tag = "1")]
36        pub id: u64,
37        /// Identifier for metadata describing static characteristics of all spans originating
38        /// from that call site, such as its name, source code location, verbosity level, and
39        /// the names of its fields.
40        #[prost(uint64, tag = "2")]
41        pub metadata_id: u64,
42        /// User-defined key-value pairs of arbitrary data that describe the context the span represents.
43        #[prost(message, repeated, tag = "3")]
44        pub fields: ::prost::alloc::vec::Vec<super::super::common::Field>,
45        #[prost(uint64, optional, tag = "4")]
46        pub parent: ::core::option::Option<u64>,
47        /// Timestamp for the span.
48        #[prost(message, optional, tag = "5")]
49        pub at: ::core::option::Option<::prost_types::Timestamp>,
50    }
51    #[allow(clippy::derive_partial_eq_without_eq)]
52    #[derive(Clone, PartialEq, ::prost::Message)]
53    pub struct Enter {
54        #[prost(uint64, tag = "1")]
55        pub span_id: u64,
56        #[prost(uint64, tag = "2")]
57        pub thread_id: u64,
58        #[prost(message, optional, tag = "3")]
59        pub at: ::core::option::Option<::prost_types::Timestamp>,
60    }
61    #[allow(clippy::derive_partial_eq_without_eq)]
62    #[derive(Clone, PartialEq, ::prost::Message)]
63    pub struct Exit {
64        #[prost(uint64, tag = "1")]
65        pub span_id: u64,
66        #[prost(uint64, tag = "2")]
67        pub thread_id: u64,
68        #[prost(message, optional, tag = "3")]
69        pub at: ::core::option::Option<::prost_types::Timestamp>,
70    }
71    #[allow(clippy::derive_partial_eq_without_eq)]
72    #[derive(Clone, PartialEq, ::prost::Message)]
73    pub struct Close {
74        #[prost(uint64, tag = "1")]
75        pub span_id: u64,
76        #[prost(message, optional, tag = "3")]
77        pub at: ::core::option::Option<::prost_types::Timestamp>,
78    }
79    /// Span recorded values for a list of fields.
80    #[allow(clippy::derive_partial_eq_without_eq)]
81    #[derive(Clone, PartialEq, ::prost::Message)]
82    pub struct Recorded {
83        /// An Id that uniquely identifies it in relation to other spans.
84        #[prost(uint64, tag = "1")]
85        pub span_id: u64,
86        /// Data recorded by the span.
87        #[prost(message, repeated, tag = "2")]
88        pub fields: ::prost::alloc::vec::Vec<super::super::common::Field>,
89    }
90    #[allow(clippy::derive_partial_eq_without_eq)]
91    #[derive(Clone, PartialEq, ::prost::Oneof)]
92    pub enum Event {
93        #[prost(message, tag = "1")]
94        NewSpan(Span),
95        #[prost(message, tag = "2")]
96        EnterSpan(Enter),
97        #[prost(message, tag = "3")]
98        ExitSpan(Exit),
99        #[prost(message, tag = "4")]
100        CloseSpan(Close),
101        #[prost(message, tag = "5")]
102        Recorded(Recorded),
103    }
104}