pub struct AttributeContext {
pub api: Option<Api>,
pub destination: Option<Peer>,
pub extensions: Option<Vec<HashMap<String, Value>>>,
pub origin: Option<Peer>,
pub request: Option<Request>,
pub resource: Option<Resource>,
pub response: Option<Response>,
pub source: Option<Peer>,
}
Expand description
This message defines the standard attribute vocabulary for Google APIs. An attribute is a piece of metadata that describes an activity on a network service. For example, the size of an HTTP request, or the status code of an HTTP response. Each attribute has a type and a name, which is logically defined as a proto message field in AttributeContext
. The field type becomes the attribute type, and the field path becomes the attribute name. For example, the attribute source.ip
maps to field AttributeContext.source.ip
. This message definition is guaranteed not to have any wire breaking change. So you can use it directly for passing attributes across different systems. NOTE: Different system may generate different subset of attributes. Please verify the system specification before relying on an attribute generated a system.
This type is not used in any activity, and only used as part of another schema.
Fields§
§api: Option<Api>
Represents an API operation that is involved to a network activity.
destination: Option<Peer>
The destination of a network activity, such as accepting a TCP connection. In a multi hop network activity, the destination represents the receiver of the last hop.
extensions: Option<Vec<HashMap<String, Value>>>
Supports extensions for advanced use cases, such as logs and metrics.
origin: Option<Peer>
The origin of a network activity. In a multi hop network activity, the origin represents the sender of the first hop. For the first hop, the source
and the origin
must have the same content.
request: Option<Request>
Represents a network request, such as an HTTP request.
resource: Option<Resource>
Represents a target resource that is involved with a network activity. If multiple resources are involved with an activity, this must be the primary one.
response: Option<Response>
Represents a network response, such as an HTTP response.
source: Option<Peer>
The source of a network activity, such as starting a TCP connection. In a multi hop network activity, the source represents the sender of the last hop.
Trait Implementations§
Source§impl Clone for AttributeContext
impl Clone for AttributeContext
Source§fn clone(&self) -> AttributeContext
fn clone(&self) -> AttributeContext
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for AttributeContext
impl Debug for AttributeContext
Source§impl Default for AttributeContext
impl Default for AttributeContext
Source§fn default() -> AttributeContext
fn default() -> AttributeContext
Source§impl<'de> Deserialize<'de> for AttributeContext
impl<'de> Deserialize<'de> for AttributeContext
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for AttributeContext
impl Serialize for AttributeContext
impl Part for AttributeContext
Auto Trait Implementations§
impl Freeze for AttributeContext
impl RefUnwindSafe for AttributeContext
impl Send for AttributeContext
impl Sync for AttributeContext
impl Unpin for AttributeContext
impl UnwindSafe for AttributeContext
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more