You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
coremetrics.RegisterBuildInfo sets metric.WithUnit("1") (toolhive-core@v0.0.37/telemetry/metrics/buildinfo.go:50). The OTel Prometheus translator appends a unit suffix to a dimensionless gauge, so the metric exports as:
_ratio is semantically wrong.build_info is an identity gauge that always observes 1; the identity lives entirely in its labels. It is not a ratio. Prometheus convention for this shape is a bare *_build_info (go_build_info, node_exporter_build_info).
The name is easy to get wrong in queries. A dashboard joining on stacklok_build_info returns empty. require.Contains(body, "stacklok_build_info") also passes on the suffixed name by substring, so a naive test asserts nothing — that bit us in Standardize proxy + vMCP metrics to stacklok.*, delete legacy twins #5956 (now anchored at line start).
Fix
Drop metric.WithUnit("1") in toolhive-core so the gauge exports unitless as stacklok_build_info, then bump the pin in toolhive and drop the (_ratio)? accommodation from the test regex and the docs note.
This cannot be fixed from the toolhive repo — RegisterBuildInfo lives in toolhive-core, so it needs a core release plus a pin bump here.
Interim
docs/observability.md documents the actual exported _ratio name so operators query something that exists. RFC §3.4 / AT #2 is satisfied either way (the gauge is present with component/version/commit); this is about the name customers will put in dashboards, so it's worth fixing before the vocabulary spreads.
coremetrics.RegisterBuildInfosetsmetric.WithUnit("1")(toolhive-core@v0.0.37/telemetry/metrics/buildinfo.go:50). The OTel Prometheus translator appends a unit suffix to a dimensionless gauge, so the metric exports as:Two problems:
_ratiois semantically wrong.build_infois an identity gauge that always observes1; the identity lives entirely in its labels. It is not a ratio. Prometheus convention for this shape is a bare*_build_info(go_build_info,node_exporter_build_info).stacklok_build_inforeturns empty.require.Contains(body, "stacklok_build_info")also passes on the suffixed name by substring, so a naive test asserts nothing — that bit us in Standardize proxy + vMCP metrics to stacklok.*, delete legacy twins #5956 (now anchored at line start).Fix
Drop
metric.WithUnit("1")intoolhive-coreso the gauge exports unitless asstacklok_build_info, then bump the pin in toolhive and drop the(_ratio)?accommodation from the test regex and the docs note.This cannot be fixed from the toolhive repo —
RegisterBuildInfolives intoolhive-core, so it needs a core release plus a pin bump here.Interim
docs/observability.mddocuments the actual exported_rationame so operators query something that exists. RFC §3.4 / AT #2 is satisfied either way (the gauge is present withcomponent/version/commit); this is about the name customers will put in dashboards, so it's worth fixing before the vocabulary spreads.