mirror of
https://github.com/openai/codex.git
synced 2026-11-14 06:48:26 +00:00
feat: metrics on remote models (#9528)
This commit is contained in:
1 parent
a3a97f3ea9
commit
6bbf506120
2 files changed
+25
-14
No files matched your search
@@ -170,3 +170,11 @@ impl OtelManager {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
/// Start a metrics timer using the globally installed metrics client.
|
||||
pub fn start_global_timer(name: &str, tags: &[(&str, &str)]) -> MetricsResult<Timer> {
|
||||
let Some(metrics) = crate::metrics::global() else {
|
||||
return Err(MetricsError::ExporterDisabled);
|
||||
};
|
||||
metrics.start_timer(name, tags)
|
||||
}
|
||||
Reference in new issue
Block a user