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
Sourcepub fn builder() -> ObservationBuilder
pub fn builder() -> ObservationBuilder
Create an instance of Observation using the builder syntax
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§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Observation
impl Debug for Observation
Source§impl Default for Observation
impl Default for Observation
Source§fn default() -> Observation
fn default() -> Observation
Source§impl<'de> Deserialize<'de> for Observation
impl<'de> Deserialize<'de> for Observation
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for Observation
impl PartialEq for Observation
Source§impl Serialize for Observation
impl Serialize for Observation
impl StructuralPartialEq for Observation
Auto Trait Implementations§
impl Freeze for Observation
impl RefUnwindSafe for Observation
impl Send for Observation
impl Sync for Observation
impl Unpin for Observation
impl UnwindSafe for Observation
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)