Repository navigation
fix(telemetry): seconds bucket bounds on every *_seconds histogram - #92
Merged
Merged
Conversation
The 13 duration histograms were created with no bucket bounds, and telemetry.Setup's provider has no View, so the SDK's defaults applied: [0, 5, 10, 25, 50, 75, 100, 250, 500, 750, 1000, 2500, 5000, 7500, 10000]. Those bounds suit milliseconds. On a seconds metric, everything under 5 s lands in one bucket, so a quantile is only a coarse upper bound. observability found it on krateo-057 (2026-11-15): reconcile means of 2.8-7.9 s all reported their p95 in the 75-250 s buckets. Each histogram now carries explicit bounds, from 1 ms to 10000 s: the list the composition-dynamic-controller's own histograms already use, so the two families compare bucket for bucket. The bounds are set on the instrument (metric.WithExplicitBucketBoundaries), so they apply under any provider, including a caller's own via NewWithMeter. A provider View still overrides them. Names and units are unchanged; only the bucket boundaries a consumer sees change. Test: every collected histogram (13, counted) carries the bounds, and a 0.3 s and a 2.8 s reconcile land in two different buckets. Mutants, each killed (3/3): reconcile.duration on the defaults; oldest_item_age on the defaults; the old millisecond list. Unit tests (18 packages) and vet under every tag pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N8HNbBzRpE6rUjMRzosAjG
braghettos
added a commit
to krateo-platformops/core-provider
that referenced
this pull request
Nov 15, 2026
v1.20.1 carries krateo-platformops/unstructured-runtime#92 alone: the 13 unstructured_runtime.*_seconds histograms used the OTel SDK's default bounds, which suit milliseconds. On seconds values, every reconcile under 5 s fell in one bucket, so a p95 read 75-250 s against means of 2.8-7.9 s (observability, krateo-057, 2026-11-15). They now use 1 ms .. 10000 s, the list the cdc's own composition_*_duration_seconds histograms already use. Consumer-visible: only ExplicitBounds on those histograms; names, units and attributes are unchanged. observability checked 057's readers: the only bucket readers are on span metrics, and obs-reconcile-perf reads UR histograms as Sum/Count only. The cutover is per pod, at the cdc roll. Only the cdc moves. chart-inspector pins unstructured-runtime v1.7.5 and records its own metrics. cdc unit tests (18 packages), vet under every tag, and the image-style build pass. Claude-Session: https://claude.ai/code/session_01N8HNbBzRpE6rUjMRzosAjG Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The 13 duration histograms were created with no bucket bounds, and
telemetry.Setup's provider has no View, so the SDK's defaults applied:
[0, 5, 10, 25, 50, 75, 100, 250, 500, 750, 1000, 2500, 5000, 7500, 10000].
Those bounds suit milliseconds. On a seconds metric, everything under 5 s
lands in one bucket, so a quantile is only a coarse upper bound.
observability found it on krateo-057 (2026-11-15): reconcile means of
2.8-7.9 s all reported their p95 in the 75-250 s buckets.
Each histogram now carries explicit bounds, from 1 ms to 10000 s: the
list the composition-dynamic-controller's own histograms already use, so
the two families compare bucket for bucket. The bounds are set on the
instrument (metric.WithExplicitBucketBoundaries), so they apply under any
provider, including a caller's own via NewWithMeter. A provider View
still overrides them. Names and units are unchanged; only the bucket
boundaries a consumer sees change.
Test: every collected histogram (13, counted) carries the bounds, and a
0.3 s and a 2.8 s reconcile land in two different buckets. Mutants, each
killed (3/3): reconcile.duration on the defaults; oldest_item_age on the
defaults; the old millisecond list. Unit tests (18 packages) and vet
under every tag pass.
🤖 Generated with Claude Code
https://claude.ai/code/session_01N8HNbBzRpE6rUjMRzosAjG