Commit 2a86710
metrics-proxy: config-driven mapping as a map keyed by service (review)
Address gjoranv's review on metric-dimension-mapping.def:
- Change `mapping[].service` + `mapping[].dimension[]` to a map keyed by
service name: `service{}.dimension[]`. Models service -> dimensions
directly, drops the redundant service field, and makes duplicate-service
entries impossible (the array form silently allowed duplicates).
- Use the generated Consumer<Builder> lambda overload at the three build
sites (TestUtil.standardDimensionMapping, MetricDimensionMappingTest,
MetricsProxyContainerCluster.getConfig) instead of building the inner
struct explicitly.
No behaviour change: MetricDimensionMapping.allowedFor/managedDimensions and
all of ExternalMetrics/MetricsManager are unchanged; only how the config is
expressed and parsed changed.
metrics-proxy 155 green, config-model metricsproxy 23 green.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent f9097a5 commit 2a86710
6 files changed
Lines changed: 11 additions & 17 deletions
File tree
- config-model/src
- main/java/com/yahoo/vespa/model/admin/metricsproxy
- test/java/com/yahoo/vespa/model/admin/metricsproxy
- metrics-proxy/src
- main
- java/ai/vespa/metricsproxy/metric/dimensions
- resources/configdefinitions
- test/java/ai/vespa/metricsproxy
- metric/dimensions
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
206 | | - | |
207 | | - | |
| 206 | + | |
208 | 207 | | |
209 | 208 | | |
210 | 209 | | |
| |||
Lines changed: 3 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
122 | | - | |
123 | | - | |
| 121 | + | |
124 | 122 | | |
125 | | - | |
| 123 | + | |
126 | 124 | | |
127 | 125 | | |
128 | 126 | | |
129 | 127 | | |
130 | 128 | | |
131 | 129 | | |
132 | 130 | | |
133 | | - | |
| 131 | + | |
134 | 132 | | |
135 | 133 | | |
136 | 134 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | | - | |
35 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
Lines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
9 | | - | |
| 7 | + | |
| 8 | + | |
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | | - | |
| 42 | + | |
44 | 43 | | |
45 | 44 | | |
46 | 45 | | |
| |||
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
| 23 | + | |
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
| |||
0 commit comments