pub struct TraceEventContext {
pub event_id: Option<String>,
pub invocation_id: Option<String>,
pub catalog_version: Option<String>,
pub environment: Option<String>,
pub end_user_id: Option<String>,
pub trace_id: Option<String>,
pub span_id: Option<String>,
}Expand description
Per-event correlation fields supplied by the emitting integration.
Sinks fill stable envelope fields such as event_id, session_id, and
source_id; callers use this context only for facts known at the emission
site. Missing fields are omitted from the flattened JSON envelope.
Fields§
§event_id: Option<String>Client-generated id for this event. Sinks mint one when absent.
invocation_id: Option<String>Id shared by every event in one invocation lifecycle.
catalog_version: Option<String>Catalog revision known when the event was emitted.
environment: Option<String>Deployment environment supplied by the application.
end_user_id: Option<String>Application-provided subject id.
trace_id: Option<String>Active OpenTelemetry trace id, when available.
span_id: Option<String>Active OpenTelemetry span id, when available.
Implementations§
Source§impl TraceEventContext
impl TraceEventContext
Sourcepub fn new_invocation() -> Self
pub fn new_invocation() -> Self
Create context for one invocation lifecycle with a fresh opaque id. Clone and pass it with the start and terminal event so concurrent calls to the same tool remain paired even when they finish out of order.
Trait Implementations§
Source§impl Clone for TraceEventContext
impl Clone for TraceEventContext
Source§fn clone(&self) -> TraceEventContext
fn clone(&self) -> TraceEventContext
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TraceEventContext
impl Debug for TraceEventContext
Source§impl Default for TraceEventContext
impl Default for TraceEventContext
Source§fn default() -> TraceEventContext
fn default() -> TraceEventContext
impl Eq for TraceEventContext
Source§impl PartialEq for TraceEventContext
impl PartialEq for TraceEventContext
impl StructuralPartialEq for TraceEventContext
Auto Trait Implementations§
impl Freeze for TraceEventContext
impl RefUnwindSafe for TraceEventContext
impl Send for TraceEventContext
impl Sync for TraceEventContext
impl Unpin for TraceEventContext
impl UnsafeUnpin for TraceEventContext
impl UnwindSafe for TraceEventContext
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
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