Skip to main content

SpanRecord

Struct SpanRecord 

Source
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: String

Trait Implementations§

Source§

impl Clone for SpanRecord

Source§

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)

Performs copy-assignment from source. Read more
Source§

impl Debug for SpanRecord

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for SpanRecord

Source§

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

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for SpanRecord

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for SpanRecord

Source§

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

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for SpanRecord

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.