assistant: Add health telemetry (#19928)

This PR adds a bit of telemetry for Anthropic models, in order to
understand model health. With this logging, we can monitor and diagnose
dips in performance, for example due to model rollouts.

Release Notes:

- N/A

---------

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
This commit is contained in:
Boris Cherny
2024-10-31 16:21:26 -07:00
committed by GitHub
co-authored by Max Brunsfeld
parent a0988508f0
commit b87c4a1e13
10 changed files with 354 additions and 144 deletions
+7
View File
@@ -341,6 +341,13 @@ impl Telemetry {
.detach();
}
pub fn metrics_enabled(self: &Arc<Self>) -> bool {
let state = self.state.lock();
let enabled = state.settings.metrics;
drop(state);
return enabled;
}
pub fn set_authenticated_user_info(
self: &Arc<Self>,
metrics_id: Option<String>,