feat: metrics on remote models (#9528)

This commit is contained in:
jif-oai authored and GitHub committed 2026-01-20 13:02:55 +00:00
1 parent a3a97f3ea9
commit 6bbf506120
2 files changed
+25 -14

No files matched your search

+8
View File
@@ -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)
}