pub struct Trace {Show 14 fields
pub id: Id,
pub name: String,
pub user_id: Option<String>,
pub session_id: Option<String>,
pub tags: Vec<String>,
pub metadata: Value,
pub environment: Option<String>,
pub release: Option<String>,
pub input: Option<Value>,
pub output: Option<Value>,
pub start_time: DateTime<Utc>,
pub end_time: Option<DateTime<Utc>>,
pub total_cost: Option<f64>,
pub total_tokens: Option<u64>,
}Expand description
Trace represents a single graph invocation or request lifecycle.
A trace is the top-level container that groups all observations
(spans, LLM calls, tool calls) generated during one execution.
It maps to Langfuse’s Trace concept and Juncture’s thread_id.
Fields§
§id: IdUnique trace identifier.
name: StringHuman-readable name (typically the graph name).
user_id: Option<String>User identifier for per-user cost/quality tracking.
session_id: Option<String>Session identifier for multi-turn conversation grouping.
Maps to Juncture’s thread_id.
Flexible string labels for categorization and filtering.
metadata: ValueArbitrary key-value metadata.
environment: Option<String>Deployment environment (production, staging, development).
release: Option<String>Application release version.
input: Option<Value>Graph input captured at invocation time.
output: Option<Value>Graph output captured at completion time.
start_time: DateTime<Utc>Trace start timestamp.
end_time: Option<DateTime<Utc>>Trace end timestamp (set when graph completes).
total_cost: Option<f64>Aggregated total cost in USD across all LLM calls.
total_tokens: Option<u64>Aggregated total tokens consumed.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Trace
impl<'de> Deserialize<'de> for Trace
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>,
Auto Trait Implementations§
impl Freeze for Trace
impl RefUnwindSafe for Trace
impl Send for Trace
impl Sync for Trace
impl Unpin for Trace
impl UnsafeUnpin for Trace
impl UnwindSafe for Trace
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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