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
feat(metrics): add histogram metric type for packet size distribution
Replace 20 individual counter metrics for packet size buckets with
two native Prometheus histograms (RX/TX). This maps SAI port stat
fields to cumulative histogram buckets via a new `histogram`
transform in the metrics config.
| `value` | no | — | Fixed metric value (ignores field value). Use for `_info` pattern metrics |
105
106
| `labels` | no | — | Map of label names to [value templates](#label-value-templates) |
@@ -191,6 +192,29 @@ transform:
191
192
dom_flag_severity: true
192
193
```
193
194
195
+
#### `histogram`
196
+
197
+
Maps multiple Redis hash fields to a single Prometheus histogram. Each entry in `buckets` maps an upper bound (float64) to a Redis hash field name. The transform reads each field, parses the count as an unsigned integer, and accumulates cumulative bucket counts. The resulting histogram has `sum=0` because SAI counters don't provide total bytes — but bucket-based percentile queries and heatmap visualizations still work. Requires `type: "histogram"`.
0 commit comments