pub struct Observation {Show 21 fields
pub id: String,
pub trace_id: Option<Option<String>>,
pub type: String,
pub name: Option<Option<String>>,
pub start_time: String,
pub end_time: Option<Option<String>>,
pub completion_start_time: Option<Option<String>>,
pub model: Option<Option<String>>,
pub model_parameters: Option<Option<HashMap<String, MapValue>>>,
pub input: Option<Option<Value>>,
pub version: Option<Option<String>>,
pub metadata: Option<Option<Value>>,
pub output: Option<Option<Value>>,
pub usage: Option<Box<Usage>>,
pub level: ObservationLevel,
pub status_message: Option<Option<String>>,
pub parent_observation_id: Option<Option<String>>,
pub prompt_id: Option<Option<String>>,
pub usage_details: Option<Option<HashMap<String, i32>>>,
pub cost_details: Option<Option<HashMap<String, f64>>>,
pub environment: Option<Option<String>>,
}Fields§
§id: StringThe unique identifier of the observation
trace_id: Option<Option<String>>The trace ID associated with the observation
type: StringThe type of the observation
name: Option<Option<String>>The name of the observation
start_time: StringThe start time of the observation
end_time: Option<Option<String>>The end time of the observation.
completion_start_time: Option<Option<String>>The completion start time of the observation
model: Option<Option<String>>The model used for the observation
model_parameters: Option<Option<HashMap<String, MapValue>>>The parameters of the model used for the observation
input: Option<Option<Value>>The input data of the observation
version: Option<Option<String>>The version of the observation
metadata: Option<Option<Value>>Additional metadata of the observation
output: Option<Option<Value>>The output data of the observation
usage: Option<Box<Usage>>§level: ObservationLevel§status_message: Option<Option<String>>The status message of the observation
parent_observation_id: Option<Option<String>>The parent observation ID
prompt_id: Option<Option<String>>The prompt ID associated with the observation
usage_details: Option<Option<HashMap<String, i32>>>The usage details of the observation. Key is the name of the usage metric, value is the number of units consumed. The total key is the sum of all (non-total) usage metrics or the total value ingested.
cost_details: Option<Option<HashMap<String, f64>>>The cost details of the observation. Key is the name of the cost metric, value is the cost in USD. The total key is the sum of all (non-total) cost metrics or the total value ingested.
environment: Option<Option<String>>The environment from which this observation originated. Can be any lowercase alphanumeric string with hyphens and underscores that does not start with ‘langfuse’.
Implementations§
Source§impl Observation
impl Observation
pub fn new( id: String, type: String, start_time: String, level: ObservationLevel, ) -> Observation
Trait Implementations§
Source§impl Clone for Observation
impl Clone for Observation
Source§fn clone(&self) -> Observation
fn clone(&self) -> Observation
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more