pub struct Span {Show 15 fields
pub service: String,
pub name: String,
pub resource: String,
pub trace_id: u64,
pub span_id: u64,
pub parent_id: u64,
pub start: i64,
pub duration: i64,
pub error: i32,
pub meta: HashMap<String, String>,
pub metrics: HashMap<String, f64>,
pub type: String,
pub meta_struct: HashMap<String, Vec<u8>>,
pub span_links: Vec<SpanLink>,
pub span_events: Vec<SpanEvent>,
}Fields§
§service: Stringservice is the name of the service with which this span is associated. @gotags: json:“service” msg:“service”
name: Stringname is the operation name of this span. @gotags: json:“name” msg:“name”
resource: Stringresource is the resource name of this span, also sometimes called the endpoint (for web spans). @gotags: json:“resource” msg:“resource”
trace_id: u64traceID is the ID of the trace to which this span belongs. @gotags: json:“trace_id” msg:“trace_id”
span_id: u64spanID is the ID of this span. @gotags: json:“span_id” msg:“span_id”
parent_id: u64parentID is the ID of this span’s parent, or zero if this span has no parent. @gotags: json:“parent_id” msg:“parent_id”
start: i64start is the number of nanoseconds between the Unix epoch and the beginning of this span. @gotags: json:“start” msg:“start”
duration: i64duration is the time length of this span in nanoseconds. @gotags: json:“duration” msg:“duration”
error: i32error is 1 if there is an error associated with this span, or 0 if there is not. @gotags: json:“error” msg:“error”
meta: HashMap<String, String>meta is a mapping from tag name to tag value for string-valued tags. @gotags: json:“meta,omitempty” msg:“meta,omitempty”
metrics: HashMap<String, f64>metrics is a mapping from tag name to tag value for numeric-valued tags. @gotags: json:“metrics,omitempty” msg:“metrics,omitempty”
type: Stringtype is the type of the service with which this span is associated. Example values: web, db, lambda. @gotags: json:“type” msg:“type”
meta_struct: HashMap<String, Vec<u8>>meta_struct is a registry of structured “other” data used by, e.g., AppSec. @gotags: json:“meta_struct,omitempty” msg:“meta_struct,omitempty”
span_links: Vec<SpanLink>span_links represents a collection of links, where each link defines a causal relationship between two spans. @gotags: json:“span_links,omitempty” msg:“span_links,omitempty”
span_events: Vec<SpanEvent>spanEvents represent an event at an instant in time related to this span, but not necessarily during the span. @gotags: json:“span_events,omitempty” msg:“span_events,omitempty”
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Span
impl<'de> Deserialize<'de> for Span
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 Message for Span
impl Message for Span
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.