pub struct SpanRecord {Show 17 fields
pub ctx: TraceContext,
pub name: String,
pub model: String,
pub provider: Option<String>,
pub prompt_tokens: u64,
pub completion_tokens: u64,
pub cached_tokens: u64,
pub reasoning_tokens: u64,
pub cost_micros: Option<u64>,
pub start_unix_nano: u64,
pub end_unix_nano: u64,
pub ttft: Option<Duration>,
pub tpot: Option<Duration>,
pub status_ok: bool,
pub input: Option<String>,
pub output: Option<String>,
pub session_id: Option<String>,
}Expand description
A metered LLM request rendered into span form. input/output stay None unless content capture
is enabled (they are populated, already DLP-redacted, at the wiring site).
Fields§
§ctx: TraceContext§name: String§model: String§provider: Option<String>§prompt_tokens: u64§completion_tokens: u64§cached_tokens: u64§reasoning_tokens: u64§cost_micros: Option<u64>Cost in micro-dollars; None when the model is unpriced (tokens still emitted).
start_unix_nano: u64§end_unix_nano: u64§ttft: Option<Duration>§tpot: Option<Duration>§status_ok: boolUpstream status was 2xx.
input: Option<String>§output: Option<String>§session_id: Option<String>Trait Implementations§
Source§impl Clone for SpanRecord
impl Clone for SpanRecord
Source§fn clone(&self) -> SpanRecord
fn clone(&self) -> SpanRecord
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 moreAuto Trait Implementations§
impl Freeze for SpanRecord
impl RefUnwindSafe for SpanRecord
impl Send for SpanRecord
impl Sync for SpanRecord
impl Unpin for SpanRecord
impl UnsafeUnpin for SpanRecord
impl UnwindSafe for SpanRecord
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