pub struct SpanRecord {Show 36 fields
pub trace_id: TraceId,
pub span_id: SpanId,
pub parent_span_id: Option<SpanId>,
pub run_id: RunId,
pub session_id: Option<SessionId>,
pub user_id_hash: Option<String>,
pub project_id: Option<String>,
pub span_kind: TraceWeftSpanKind,
pub name: String,
pub start_time: u64,
pub end_time: Option<u64>,
pub status: SpanStatus,
pub status_message: Option<String>,
pub error_type: Option<String>,
pub error_message_redacted: Option<String>,
pub attributes: HashMap<String, Value>,
pub otel_attributes: HashMap<String, Value>,
pub openinference_attributes: HashMap<String, Value>,
pub memory_state: Option<Value>,
pub input_ref: Option<BlobRef>,
pub output_ref: Option<BlobRef>,
pub prompt_template_id: Option<String>,
pub prompt_version: Option<String>,
pub model_provider: Option<String>,
pub model_name: Option<String>,
pub tool_name: Option<String>,
pub tool_schema_hash: Option<String>,
pub retrieval_query_hash: Option<String>,
pub retrieved_document_refs: Vec<BlobRef>,
pub token_usage: Option<TokenUsage>,
pub cost_estimate: Option<CostEstimate>,
pub latency_ms: Option<u64>,
pub retry_count: Option<u32>,
pub cache_hit: Option<bool>,
pub redaction_policy: CapturePolicy,
pub schema_version: String,
}Fields§
§trace_id: TraceId§span_id: SpanId§parent_span_id: Option<SpanId>§run_id: RunId§session_id: Option<SessionId>§user_id_hash: Option<String>§project_id: Option<String>Tenant the span belongs to. Set server-side from the authenticated API
key at ingest (clients cannot assert it); None for local-first
single-tenant recording. Used to scope trace queries per project.
span_kind: TraceWeftSpanKind§name: String§start_time: u64§end_time: Option<u64>§status: SpanStatus§status_message: Option<String>§error_type: Option<String>§error_message_redacted: Option<String>§attributes: HashMap<String, Value>§otel_attributes: HashMap<String, Value>§openinference_attributes: HashMap<String, Value>§memory_state: Option<Value>§input_ref: Option<BlobRef>§output_ref: Option<BlobRef>§prompt_template_id: Option<String>§prompt_version: Option<String>§model_provider: Option<String>§model_name: Option<String>§tool_name: Option<String>§tool_schema_hash: Option<String>§retrieval_query_hash: Option<String>§retrieved_document_refs: Vec<BlobRef>§token_usage: Option<TokenUsage>§cost_estimate: Option<CostEstimate>§latency_ms: Option<u64>§retry_count: Option<u32>§cache_hit: Option<bool>§redaction_policy: CapturePolicy§schema_version: StringTrait 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 moreSource§impl Debug for SpanRecord
impl Debug for SpanRecord
Source§impl<'de> Deserialize<'de> for SpanRecord
impl<'de> Deserialize<'de> for SpanRecord
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SpanRecord, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SpanRecord, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for SpanRecord
impl PartialEq for SpanRecord
Source§fn eq(&self, other: &SpanRecord) -> bool
fn eq(&self, other: &SpanRecord) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for SpanRecord
impl Serialize for SpanRecord
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for SpanRecord
Auto 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
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> 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 more