console_api/generated/
rs.tokio.console.async_ops.rs

1// This file is @generated by prost-build.
2/// An `AsyncOp` state update.
3///
4/// This includes a list of any new async ops, and updates to the associated statistics
5/// for any async ops that have changed since the last update.
6#[derive(Clone, PartialEq, ::prost::Message)]
7pub struct AsyncOpUpdate {
8    /// A list of new async operations that were created since the last `AsyncOpUpdate`
9    /// was sent. Note that the fact that an async operation has been created
10    /// does not mean that is has been polled or is being polled. This information
11    /// is reflected in the `Stats` of the operation.
12    #[prost(message, repeated, tag = "1")]
13    pub new_async_ops: ::prost::alloc::vec::Vec<AsyncOp>,
14    /// Any async op stats that have changed since the last update.
15    #[prost(map = "uint64, message", tag = "2")]
16    pub stats_update: ::std::collections::HashMap<u64, Stats>,
17    /// A count of how many async op events (e.g. polls, creation, etc) were not
18    /// recorded because the application's event buffer was at capacity.
19    ///
20    /// If everything is working normally, this should be 0. If it is greater
21    /// than 0, that may indicate that some data is missing from this update, and
22    /// it may be necessary to increase the number of events buffered by the
23    /// application to ensure that data loss is avoided.
24    ///
25    /// If the application's instrumentation ensures reliable delivery of events,
26    /// this will always be 0.
27    #[prost(uint64, tag = "3")]
28    pub dropped_events: u64,
29}
30/// An async operation.
31///
32/// An async operation is an operation that is associated with a resource
33/// This could, for example, be a read or write on a TCP stream, or a receive operation on
34/// a channel.
35#[derive(Clone, PartialEq, ::prost::Message)]
36pub struct AsyncOp {
37    /// The async op's ID.
38    ///
39    /// This uniquely identifies this op across all *currently live*
40    /// ones.
41    #[prost(message, optional, tag = "1")]
42    pub id: ::core::option::Option<super::common::Id>,
43    /// The numeric ID of the op's `Metadata`.
44    ///
45    /// This identifies the `Metadata` that describes the `tracing` span
46    /// corresponding to this async op. The metadata for this ID will have been sent
47    /// in a prior `RegisterMetadata` message.
48    #[prost(message, optional, tag = "2")]
49    pub metadata: ::core::option::Option<super::common::MetaId>,
50    /// The source of this async operation. Most commonly this should be the name
51    /// of the method where the instantiation of this op has happened.
52    #[prost(string, tag = "3")]
53    pub source: ::prost::alloc::string::String,
54    /// The ID of the parent async op.
55    ///
56    /// This field is only set if this async op was created while inside of another
57    /// async op.  For example, `tokio::sync`'s `Mutex::lock` internally calls
58    /// `Semaphore::acquire`.
59    ///
60    /// This field can be empty; if it is empty, this async op is not a child of another
61    /// async op.
62    #[prost(message, optional, tag = "4")]
63    pub parent_async_op_id: ::core::option::Option<super::common::Id>,
64    /// The resources's ID.
65    #[prost(message, optional, tag = "5")]
66    pub resource_id: ::core::option::Option<super::common::Id>,
67}
68/// Statistics associated with a given async operation.
69#[derive(Clone, PartialEq, ::prost::Message)]
70pub struct Stats {
71    /// Timestamp of when the async op has been created.
72    #[prost(message, optional, tag = "1")]
73    pub created_at: ::core::option::Option<::prost_types::Timestamp>,
74    /// Timestamp of when the async op was dropped.
75    #[prost(message, optional, tag = "2")]
76    pub dropped_at: ::core::option::Option<::prost_types::Timestamp>,
77    /// The Id of the task that is awaiting on this op.
78    #[prost(message, optional, tag = "4")]
79    pub task_id: ::core::option::Option<super::common::Id>,
80    /// Contains the operation poll stats.
81    #[prost(message, optional, tag = "5")]
82    pub poll_stats: ::core::option::Option<super::common::PollStats>,
83    /// State attributes of the async op.
84    #[prost(message, repeated, tag = "6")]
85    pub attributes: ::prost::alloc::vec::Vec<super::common::Attribute>,
86}