Compare commits

...

1 Commits

Author SHA1 Message Date
Anna Khanova
a104c4bd5b proxy: introdice is cold start for analytics 2024-02-26 10:12:04 +01:00
2 changed files with 4 additions and 0 deletions

View File

@@ -98,6 +98,7 @@ pub struct MetricsAuxInfo {
pub endpoint_id: EndpointId, pub endpoint_id: EndpointId,
pub project_id: ProjectId, pub project_id: ProjectId,
pub branch_id: BranchId, pub branch_id: BranchId,
pub is_cold_start: Option<bool>,
} }
#[cfg(test)] #[cfg(test)]

View File

@@ -40,6 +40,7 @@ pub struct RequestMonitoring {
error_kind: Option<ErrorKind>, error_kind: Option<ErrorKind>,
pub(crate) auth_method: Option<AuthMethod>, pub(crate) auth_method: Option<AuthMethod>,
success: bool, success: bool,
is_cold_start: Option<bool>,
// extra // extra
// This sender is here to keep the request monitoring channel open while requests are taking place. // This sender is here to keep the request monitoring channel open while requests are taking place.
@@ -79,6 +80,7 @@ impl RequestMonitoring {
error_kind: None, error_kind: None,
auth_method: None, auth_method: None,
success: false, success: false,
is_cold_start: None,
sender: LOG_CHAN.get().and_then(|tx| tx.upgrade()), sender: LOG_CHAN.get().and_then(|tx| tx.upgrade()),
latency_timer: LatencyTimer::new(protocol), latency_timer: LatencyTimer::new(protocol),
@@ -102,6 +104,7 @@ impl RequestMonitoring {
self.branch = Some(x.branch_id); self.branch = Some(x.branch_id);
self.endpoint_id = Some(x.endpoint_id); self.endpoint_id = Some(x.endpoint_id);
self.project = Some(x.project_id); self.project = Some(x.project_id);
self.is_cold_start = x.is_cold_start;
} }
pub fn set_project_id(&mut self, project_id: ProjectId) { pub fn set_project_id(&mut self, project_id: ProjectId) {