pub struct EventContext {
pub turn_id: Option<TurnId>,
pub input_message_id: Option<MessageId>,
pub exec_id: Option<ExecId>,
pub trace_id: Option<String>,
pub span_id: Option<String>,
pub parent_span_id: Option<String>,
}Expand description
Context for event correlation and tracing
Uses OpenTelemetry-style trace/span IDs for observability correlation:
trace_id: Root of the trace (typically the turn_id string)span_id: This event’s unique span identifierparent_span_id: The parent span’s identifier for hierarchical linking
Fields§
§turn_id: Option<TurnId>Turn identifier (for turn-scoped events)
input_message_id: Option<MessageId>User message that triggered this turn
exec_id: Option<ExecId>Atom execution identifier
trace_id: Option<String>Trace ID for observability (OTel-style). Groups related spans into a single trace. For agent turns, this is typically the turn_id string.
span_id: Option<String>This event’s span ID for observability (OTel-style). Uniquely identifies this span within the trace.
parent_span_id: Option<String>Parent span ID for hierarchical linking (OTel-style). Links this span to its parent in the trace hierarchy.
Implementations§
Source§impl EventContext
impl EventContext
Sourcepub fn from_atom_context(ctx: &AtomContext) -> Self
pub fn from_atom_context(ctx: &AtomContext) -> Self
Create a full context from an AtomContext
Trait Implementations§
Source§impl Clone for EventContext
impl Clone for EventContext
Source§fn clone(&self) -> EventContext
fn clone(&self) -> EventContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EventContext
impl Debug for EventContext
Source§impl Default for EventContext
impl Default for EventContext
Source§fn default() -> EventContext
fn default() -> EventContext
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for EventContext
impl<'de> Deserialize<'de> for EventContext
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for EventContext
impl RefUnwindSafe for EventContext
impl Send for EventContext
impl Sync for EventContext
impl Unpin for EventContext
impl UnsafeUnpin for EventContext
impl UnwindSafe for EventContext
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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>
Converts
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>
Converts
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 moreSource§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>
Wrap the input message
T in a tonic::Request