Skip to navigation

Generated from cargo doc --no-deps -p nemo-relay-builtins -p nemo-relay-diagnostics -p nemo-relay-logging -p nemo-relay-plugin-host -p nemo-relay-codecs -p nemo-relay -p nemo-relay-runtime -p nemo-relay-model-pricing -p nemo-relay-resource-metrics -p nemo-relay-observability -p nemo-relay-adaptive -p nemo-relay-pii-redaction -p nemo-relay-ffi -p nemo-relay-types -p nemo-relay-plugin -p nemo-relay-worker-proto -p nemo-relay-worker.

pub enum Event {
Scope(ScopeEvent),
Mark(MarkEvent),
}

Tagged union covering the two ATOF event kinds emitted by the runtime.

Variants

Scope(ScopeEvent)

Scope(ScopeEvent)

Scope lifecycle event.

Mark(MarkEvent)

Mark(MarkEvent)

Point-in-time checkpoint event.

Implementations

impl Event

impl Event

Referenced types: Event

kind

pub fn kind(&self) -> &'static str

Referenced types: str

Return the ATOF event kind.

Returns

"scope" for Event::Scope and "mark" for Event::Mark.

try_to_json_value

pub fn try_to_json_value(&self) -> Result<Value, Error>

Referenced types: Result, Value, Error

Try to return this event as the canonical JSON object delivered by language bindings to subscriber callbacks and ATOF exporters.

to_json_value

pub fn to_json_value(&self) -> Value

Referenced types: Value

Return this event as the canonical JSON object delivered by language bindings to subscriber callbacks.

to_json_string

pub fn to_json_string(&self) -> Result<String, Error>

Referenced types: Result, String, Error

Return this event as canonical JSON.

scope_category

pub fn scope_category(&self) -> Option<ScopeCategory>

Referenced types: Option

Return the lifecycle phase for scope events.

Returns

Some lifecycle phase for scope events, otherwise None.

category

pub fn category(&self) -> Option<&EventCategory>

Referenced types: Option, EventCategory

Return the semantic category if present.

Returns

Some category for scope events and categorized mark events, otherwise None.

category_profile

pub fn category_profile(&self) -> Option<&CategoryProfile>

Referenced types: Option

Return the category-specific profile if present.

Returns

Some profile when category-specific fields are present.

category_profile_mut

pub fn category_profile_mut(&mut self) -> Option<&mut CategoryProfile>

Referenced types: Option

Return the mutable category-specific profile if present.

Returns

Some mutable profile when category-specific fields are present.

tool_result_annotation

pub fn tool_result_annotation(&self) -> Option<Value>

Referenced types: Option, Value

Return an owned copy of the normalized tool result annotation.

JSON null is normalized to absence.

parent_uuid

pub fn parent_uuid(&self) -> Option<Uuid>

Referenced types: Option, Uuid

Return the parent scope UUID, if the event is nested under a scope.

Returns

Some parent UUID when the event has a parent scope, otherwise None.

propagation_root_uuid

pub fn propagation_root_uuid(&self) -> Option<Uuid>

Referenced types: Option, Uuid

Return the stable causal root captured when this event was emitted.

set_propagation_root_uuid

pub fn set_propagation_root_uuid(&mut self, root_uuid: Option<Uuid>)

Referenced types: Option, Uuid

Attach the causal root captured at event emission.

propagation_parent_uuid

pub fn propagation_parent_uuid(&self) -> Option<Uuid>

Referenced types: Option, Uuid

Return the synthetic parent imported with the propagation context.

set_propagation_parent_uuid

pub fn set_propagation_parent_uuid(&mut self, parent_uuid: Option<Uuid>)

Referenced types: Option, Uuid

Attach the synthetic parent captured at event emission.

propagation_traceparent

pub fn propagation_traceparent(&self) -> Option<&str>

Referenced types: Option, str

Return W3C traceparent captured when this event was emitted.

set_propagation_traceparent

pub fn set_propagation_traceparent(&mut self, traceparent: Option<String>)

Referenced types: Option, String

Attach runtime-only W3C traceparent lineage.

propagation_tracestate

pub fn propagation_tracestate(&self) -> Option<&str>

Referenced types: Option, str

Return W3C tracestate captured when this event was emitted.

set_propagation_tracestate

pub fn set_propagation_tracestate(&mut self, tracestate: Option<String>)

Referenced types: Option, String

Attach runtime-only W3C tracestate lineage.

uuid

pub fn uuid(&self) -> Uuid

Referenced types: Uuid

Return the unique event or span UUID.

Returns

The event UUID.

timestamp

pub fn timestamp(&self) -> &DateTime<Utc>

Referenced types: DateTime, Utc

Return the event timestamp.

Returns

The UTC event timestamp.

name

pub fn name(&self) -> &str

Referenced types: str

Return the human-readable event name.

Returns

The event name.

data

pub fn data(&self) -> Option<&Value>

Referenced types: Option, Value

Return the optional application payload attached to the event.

Returns

Some payload when event data is present, otherwise None.

sanitize_fields

pub fn sanitize_fields(&self) -> EventSanitizeFields

Referenced types: EventSanitizeFields

Snapshot the observability fields that sanitizers may rewrite.

apply_sanitize_fields

pub fn apply_sanitize_fields(&mut self, fields: EventSanitizeFields)

Referenced types: EventSanitizeFields

Replace the observability fields controlled by event sanitizers.

data_schema

pub fn data_schema(&self) -> Option<&DataSchema>

Referenced types: Option, DataSchema

Return the optional data schema.

Returns

Some schema when the event payload declares one, otherwise None.

metadata

pub fn metadata(&self) -> Option<&Value>

Referenced types: Option, Value

Return the optional metadata attached to the event.

Returns

Some metadata when present, otherwise None.

attributes

pub fn attributes(&self) -> Option<&[String]>

Referenced types: Option, String

Return attributes for scope events.

Returns

Some attributes for scope events, otherwise None.

scope_type

pub fn scope_type(&self) -> Option<ScopeType>

Referenced types: Option, ScopeType

Return the semantic scope category for scope events.

Returns

Some legacy ScopeType when the event has a category.

input

pub fn input(&self) -> Option<&Value>

Referenced types: Option, Value

Return the semantic input payload for start events.

Returns

Some payload for scope-start events with data, otherwise None.

output

pub fn output(&self) -> Option<&Value>

Referenced types: Option, Value

Return the semantic output payload for end events.

Returns

Some payload for scope-end events with data, otherwise None.

model_name

pub fn model_name(&self) -> Option<&str>

Referenced types: Option, str

Return the normalized model name for LLM events.

Returns

Some model name when the event profile includes one.

tool_call_id

pub fn tool_call_id(&self) -> Option<&str>

Referenced types: Option, str

Return the provider-specific tool-call correlation identifier.

Returns

Some tool call identifier when the event profile includes one.

annotated_request

pub fn annotated_request(&self) -> Option<&Arc<AnnotatedLlmRequest>>

Referenced types: Option, Arc, AnnotatedLlmRequest

Return the runtime-only annotated LLM request.

Returns

Some annotated request when the event profile includes one.

annotated_response

pub fn annotated_response(&self) -> Option<&Arc<AnnotatedLlmResponse>>

Referenced types: Option, Arc, AnnotatedLlmResponse

Return the runtime-only annotated LLM response.

Returns

Some annotated response when the event profile includes one.

time_to_first_chunk

pub fn time_to_first_chunk(&self) -> Option<f64>

Referenced types: Option, f64

Return the managed stream time to first received chunk, in seconds.

Returns

The measured duration on streaming LLM end events, when at least one chunk reached the managed stream wrapper.

is_scope_start

pub fn is_scope_start(&self) -> bool

Referenced types: bool

Return true for scope-start events.

Returns

true when the event is a scope-start event.

is_scope_end

pub fn is_scope_end(&self) -> bool

Referenced types: bool

Return true for scope-end events.

Returns

true when the event is a scope-end event.

Trait Implementations

impl Clone for Event

impl Clone for Event

Referenced types: Clone, Event

clone

fn clone(&self) -> Event

Referenced types: clone, Event

clone_from

fn clone_from(&mut self, source: &Self)

Referenced types: clone_from

impl Debug for Event

impl Debug for Event

Referenced types: Debug, Event

fmt

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Referenced types: fmt, Formatter, Result, (), Error

impl<'de> Deserialize<'de> for Event

impl<'de> Deserialize<'de> for Event

Referenced types: Deserialize, Event

deserialize

fn deserialize<__D>(
__deserializer: __D,
) -> Result<Event, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,

Referenced types: deserialize, Result, Event, Deserializer, Error

impl PartialEq for Event

impl PartialEq for Event

Referenced types: PartialEq, Event

eq

fn eq(&self, other: &Event) -> bool

Referenced types: eq, Event, bool

ne

fn ne(&self, other: &Rhs) -> bool

Referenced types: ne, &Rhs, bool

impl Serialize for Event

impl Serialize for Event

Referenced types: Serialize, Event

serialize

fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,

Referenced types: serialize, Result, Serializer, Ok, Error

impl WireValue<Event> for Event

impl WireValue<Event> for Event

Referenced types: Event

to_wire

fn to_wire(self) -> Result<Event, ConversionError>

Referenced types: Result

from_wire

fn from_wire(value: Event) -> Result<Event, ConversionError>

Referenced types: Result, Event

impl StructuralPartialEq for Event

impl StructuralPartialEq for Event

Referenced types: StructuralPartialEq, Event