pub struct ObservationV2 {Show 38 fields
pub id: String,
pub trace_id: Option<Option<String>>,
pub start_time: DateTime<FixedOffset>,
pub end_time: Option<Option<DateTime<FixedOffset>>>,
pub project_id: String,
pub parent_observation_id: Option<Option<String>>,
pub type: String,
pub name: Option<Option<String>>,
pub level: Option<ObservationLevel>,
pub status_message: Option<Option<String>>,
pub version: Option<Option<String>>,
pub environment: Option<Option<String>>,
pub bookmarked: Option<Option<bool>>,
pub public: Option<Option<bool>>,
pub user_id: Option<Option<String>>,
pub session_id: Option<Option<String>>,
pub completion_start_time: Option<Option<DateTime<FixedOffset>>>,
pub created_at: Option<Option<DateTime<FixedOffset>>>,
pub updated_at: Option<Option<DateTime<FixedOffset>>>,
pub input: Option<Option<Value>>,
pub output: Option<Option<Value>>,
pub metadata: Option<Option<Value>>,
pub provided_model_name: Option<Option<String>>,
pub internal_model_id: Option<Option<String>>,
pub model_parameters: Option<Option<Value>>,
pub usage_details: Option<Option<HashMap<String, i32>>>,
pub cost_details: Option<Option<HashMap<String, f64>>>,
pub total_cost: Option<Option<f64>>,
pub usage_pricing_tier_name: Option<Option<String>>,
pub prompt_id: Option<Option<String>>,
pub prompt_name: Option<Option<String>>,
pub prompt_version: Option<Option<i32>>,
pub latency: Option<Option<f64>>,
pub time_to_first_token: Option<Option<f64>>,
pub model_id: Option<Option<String>>,
pub trace_name: Option<Option<String>>,
pub tags: Option<Option<Vec<String>>>,
pub release: Option<Option<String>>,
}Expand description
ObservationV2 : An observation from the v2 API with field-group-based selection. Core fields are always present. Other fields are included only when their field group is requested.
Fields§
§id: StringThe unique identifier of the observation
trace_id: Option<Option<String>>The trace ID associated with the observation
start_time: DateTime<FixedOffset>The start time of the observation
end_time: Option<Option<DateTime<FixedOffset>>>The end time of the observation
project_id: StringThe project ID this observation belongs to
parent_observation_id: Option<Option<String>>The parent observation ID
type: StringThe type of the observation (e.g. GENERATION, SPAN, EVENT)
name: Option<Option<String>>The name of the observation
level: Option<ObservationLevel>§status_message: Option<Option<String>>The status message of the observation
version: Option<Option<String>>The version of the observation
environment: Option<Option<String>>The environment from which this observation originated
bookmarked: Option<Option<bool>>Whether the observation is bookmarked
public: Option<Option<bool>>Whether the observation is public
user_id: Option<Option<String>>The user ID associated with the observation
session_id: Option<Option<String>>The session ID associated with the observation
completion_start_time: Option<Option<DateTime<FixedOffset>>>The completion start time of the observation
created_at: Option<Option<DateTime<FixedOffset>>>The creation timestamp of the observation
updated_at: Option<Option<DateTime<FixedOffset>>>The last update timestamp of the observation
input: Option<Option<Value>>The input data of the observation
output: Option<Option<Value>>The output data of the observation
metadata: Option<Option<Value>>Additional metadata of the observation
provided_model_name: Option<Option<String>>The model name as provided by the user
internal_model_id: Option<Option<String>>The internal model ID matched by Langfuse
model_parameters: Option<Option<Value>>The parameters of the model used for the observation
usage_details: Option<Option<HashMap<String, i32>>>The usage details of the observation. Key is the usage metric name, value is the number of units consumed.
cost_details: Option<Option<HashMap<String, f64>>>The cost details of the observation. Key is the cost metric name, value is the cost in USD.
total_cost: Option<Option<f64>>The total cost of the observation in USD
usage_pricing_tier_name: Option<Option<String>>The name of the pricing tier applied to this observation’s usage costs
prompt_id: Option<Option<String>>The prompt ID associated with the observation
prompt_name: Option<Option<String>>The prompt name associated with the observation
prompt_version: Option<Option<i32>>The prompt version associated with the observation
latency: Option<Option<f64>>The latency in seconds
time_to_first_token: Option<Option<f64>>The time to first token in seconds
model_id: Option<Option<String>>The matched model ID
trace_name: Option<Option<String>>The name of the parent trace
Tags from the parent trace (denormalized onto the observation)
release: Option<Option<String>>The release version of the parent trace
Implementations§
Source§impl ObservationV2
impl ObservationV2
Sourcepub fn builder() -> ObservationV2Builder
pub fn builder() -> ObservationV2Builder
Create an instance of ObservationV2 using the builder syntax
Source§impl ObservationV2
impl ObservationV2
Sourcepub fn new(
id: String,
start_time: DateTime<FixedOffset>,
project_id: String,
type: String,
) -> ObservationV2
pub fn new( id: String, start_time: DateTime<FixedOffset>, project_id: String, type: String, ) -> ObservationV2
An observation from the v2 API with field-group-based selection. Core fields are always present. Other fields are included only when their field group is requested.
Trait Implementations§
Source§impl Clone for ObservationV2
impl Clone for ObservationV2
Source§fn clone(&self) -> ObservationV2
fn clone(&self) -> ObservationV2
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more