pub struct SegmentObject {
pub trace_id: String,
pub trace_segment_id: String,
pub spans: Vec<SpanObject>,
pub service: String,
pub service_instance: String,
pub is_size_limited: bool,
}Expand description
The segment is a collection of spans. It includes all collected spans in a simple one request context, such as a HTTP request process.
We recommend the agent/SDK report all tracked data of one request once for all, such as, typically, such as in Java, one segment represent all tracked operations(spans) of one request context in the same thread. At the same time, in some language there is not a clear concept like golang, it could represent all tracked operations of one request context.
Fields§
§trace_id: StringA string id represents the whole trace.
trace_segment_id: StringA unique id represents this segment. Other segments could use this id to reference as a child segment.
spans: Vec<SpanObject>Span collections included in this segment.
service: StringService. Represents a set/group of workloads which provide the same behaviours for incoming requests.
The logic name represents the service. This would show as a separate node in the topology. The metrics analyzed from the spans, would be aggregated for this entity as the service level.
service_instance: StringService Instance. Each individual workload in the Service group is known as an instance. Like pods in Kubernetes, it
doesn’t need to be a single OS process, however, if you are using instrument agents, an instance is actually a real OS process.
The logic name represents the service instance. This would show as a separate node in the instance relationship. The metrics analyzed from the spans, would be aggregated for this entity as the service instance level.
is_size_limited: boolWhether the segment includes all tracked spans. In the production environment tracked, some tasks could include too many spans for one request context, such as a batch update for a cache, or an async job. The agent/SDK could optimize or ignore some tracked spans for better performance. In this case, the value should be flagged as TRUE.
Trait Implementations§
Source§impl Clone for SegmentObject
impl Clone for SegmentObject
Source§fn clone(&self) -> SegmentObject
fn clone(&self) -> SegmentObject
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SegmentObject
impl Debug for SegmentObject
Source§impl Default for SegmentObject
impl Default for SegmentObject
Source§impl<'de> Deserialize<'de> for SegmentObject
impl<'de> Deserialize<'de> for SegmentObject
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 SegmentObject
impl Message for SegmentObject
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 SegmentObject
impl PartialEq for SegmentObject
Source§impl Serialize for SegmentObject
impl Serialize for SegmentObject
impl StructuralPartialEq for SegmentObject
Auto Trait Implementations§
impl Freeze for SegmentObject
impl RefUnwindSafe for SegmentObject
impl Send for SegmentObject
impl Sync for SegmentObject
impl Unpin for SegmentObject
impl UnwindSafe for SegmentObject
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> 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