Skip to main content

devtools_wire_format/generated/
rs.devtools.spans.rs

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