Struct google_api_proto::google::rpc::context::AttributeContext
source · pub struct AttributeContext {
pub origin: Option<Peer>,
pub source: Option<Peer>,
pub destination: Option<Peer>,
pub request: Option<Request>,
pub response: Option<Response>,
pub resource: Option<Resource>,
pub api: Option<Api>,
pub extensions: Vec<Any>,
}
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.
Fields§
§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.
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.
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.
request: Option<Request>
Represents a network request, such as an HTTP request.
response: Option<Response>
Represents a network response, such as an HTTP response.
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.
api: Option<Api>
Represents an API operation that is involved to a network activity.
extensions: Vec<Any>
Supports extensions for advanced use cases, such as logs and metrics.
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§impl Message for AttributeContext
impl Message for AttributeContext
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for AttributeContext
impl PartialEq for AttributeContext
source§fn eq(&self, other: &AttributeContext) -> bool
fn eq(&self, other: &AttributeContext) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq 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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request