fix(go.d): unify histogram bucket dimension names - #23021
Merged
Conversation
stelfrag
approved these changes
Jul 7, 2026
ilyam8
enabled auto-merge (squash)
July 7, 2026 07:27
|
Contributor
There was a problem hiding this comment.
No issues found across 7 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Architecture diagram
sequenceDiagram
participant Prometheus as Prometheus Target
participant Collector as go.d Prometheus Collector
participant Metrix as metrix (ReadFlatten)
participant Autogen as chartengine autogen
participant Tpl as charttpl template
participant Charts as Netdata Charts
Note over Prometheus,Charts: Histogram bucket dimension naming flow
Collector->>Prometheus: scrape /metrics
Prometheus-->>Collector: histogram metrics (e.g., http_requests_duration_seconds_bucket{le="0.1"})
Collector->>Metrix: ReadFlatten(metrics)
Metrix-->>Collector: []FlattenedMetric (each with label le="0.1")
Note over Collector: bucket metrics are non‑cumulative range totals
alt Autogen path
Collector->>Autogen: buildHistogramBucketAutogenRoute(metric)
Autogen->>Autogen: chartID = metric.name + labels (excluding le)
Autogen->>Autogen: dimensionName = le value (e.g., "0.1")
Note right of Autogen: NEW: dimensionName no longer "bucket_" + upperBound
Autogen-->>Collector: autogenRoute{dimensionName: "0.1", ...}
Collector->>Charts: create chart with dimensions ["0.1", ..., "+Inf"]
else Template path
Collector->>Tpl: apply chart template
Tpl->>Tpl: infer bucket dimensions from metrix labels
Tpl->>Tpl: dimensionName = le value (bare)
Note right of Tpl: NEW: template also uses bare le (documented)
Tpl-->>Collector: resolved chart dimensions
Collector->>Charts: create chart with dimensions ["0.1", ..., "+Inf"]
end
Note over Charts: Dimensions ordered numerically, +Inf last
alt Example dimension list
Charts->>Charts: ["0.1", "0.5", "1", "2", "10", "+Inf"]
end
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.



Summary
Test Plan
Additional Information
For users: How does this change affect me?
Summary by cubic
Unifies histogram bucket dimension names to the bare
levalue (e.g.,0.1,+Inf) acrosschartengineautogen and template paths, ordered numerically with+Inflast. Removes thebucket_prefix for consistent heatmap dimensions and clearer docs/tests.Refactors
chartengineautogen setsdimensionNameto thelevalue; tests and Prometheus histogram golden updated.chartengine/README.md,charttpl/README.md, and SKILL to describe naming and ordering.Migration
bucket_<value>with<value>.Written for commit 834547d. Summary will update on new commits.