Skip to content

Commit

Permalink
Jsonnet: Fix unit used by per-pod latency panel (#11104)
Browse files Browse the repository at this point in the history
**What this PR does / why we need it**:
The per-pod latency panel should use "ms" as the unit, instead of the
default (which is "short").
I'm also wrapping everything around "defaults", because that's how it is
used everywhere.

**Which issue(s) this PR fixes**:
N/A
  • Loading branch information
DylanGuedes authored Nov 3, 2023
1 parent 59a2afa commit 6d82292
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 62 deletions.
34 changes: 20 additions & 14 deletions production/loki-mixin-compiled-ssd/dashboards/loki-reads.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,14 +209,17 @@
"dashes": false,
"datasource": "$datasource",
"fieldConfig": {
"custom": {
"fillOpacity": 50,
"showPoints": "never",
"stacking": {
"group": "A",
"mode": "normal"
"defaults": {
"custom": {
"fillOpacity": 50,
"showPoints": "never",
"stacking": {
"group": "A",
"mode": "normal"
}
}
}
},
"unit": "ms"
},
"fill": 1,
"id": 3,
Expand Down Expand Up @@ -482,14 +485,17 @@
"dashes": false,
"datasource": "$datasource",
"fieldConfig": {
"custom": {
"fillOpacity": 50,
"showPoints": "never",
"stacking": {
"group": "A",
"mode": "normal"
"defaults": {
"custom": {
"fillOpacity": 50,
"showPoints": "never",
"stacking": {
"group": "A",
"mode": "normal"
}
}
}
},
"unit": "ms"
},
"fill": 1,
"id": 6,
Expand Down
102 changes: 60 additions & 42 deletions production/loki-mixin-compiled/dashboards/loki-reads.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,14 +209,17 @@
"dashes": false,
"datasource": "$datasource",
"fieldConfig": {
"custom": {
"fillOpacity": 50,
"showPoints": "never",
"stacking": {
"group": "A",
"mode": "normal"
"defaults": {
"custom": {
"fillOpacity": 50,
"showPoints": "never",
"stacking": {
"group": "A",
"mode": "normal"
}
}
}
},
"unit": "ms"
},
"fill": 1,
"id": 3,
Expand Down Expand Up @@ -482,14 +485,17 @@
"dashes": false,
"datasource": "$datasource",
"fieldConfig": {
"custom": {
"fillOpacity": 50,
"showPoints": "never",
"stacking": {
"group": "A",
"mode": "normal"
"defaults": {
"custom": {
"fillOpacity": 50,
"showPoints": "never",
"stacking": {
"group": "A",
"mode": "normal"
}
}
}
},
"unit": "ms"
},
"fill": 1,
"id": 6,
Expand Down Expand Up @@ -755,14 +761,17 @@
"dashes": false,
"datasource": "$datasource",
"fieldConfig": {
"custom": {
"fillOpacity": 50,
"showPoints": "never",
"stacking": {
"group": "A",
"mode": "normal"
"defaults": {
"custom": {
"fillOpacity": 50,
"showPoints": "never",
"stacking": {
"group": "A",
"mode": "normal"
}
}
}
},
"unit": "ms"
},
"fill": 1,
"id": 9,
Expand Down Expand Up @@ -1028,14 +1037,17 @@
"dashes": false,
"datasource": "$datasource",
"fieldConfig": {
"custom": {
"fillOpacity": 50,
"showPoints": "never",
"stacking": {
"group": "A",
"mode": "normal"
"defaults": {
"custom": {
"fillOpacity": 50,
"showPoints": "never",
"stacking": {
"group": "A",
"mode": "normal"
}
}
}
},
"unit": "ms"
},
"fill": 1,
"id": 12,
Expand Down Expand Up @@ -1301,14 +1313,17 @@
"dashes": false,
"datasource": "$datasource",
"fieldConfig": {
"custom": {
"fillOpacity": 50,
"showPoints": "never",
"stacking": {
"group": "A",
"mode": "normal"
"defaults": {
"custom": {
"fillOpacity": 50,
"showPoints": "never",
"stacking": {
"group": "A",
"mode": "normal"
}
}
}
},
"unit": "ms"
},
"fill": 1,
"id": 15,
Expand Down Expand Up @@ -1574,14 +1589,17 @@
"dashes": false,
"datasource": "$datasource",
"fieldConfig": {
"custom": {
"fillOpacity": 50,
"showPoints": "never",
"stacking": {
"group": "A",
"mode": "normal"
"defaults": {
"custom": {
"fillOpacity": 50,
"showPoints": "never",
"stacking": {
"group": "A",
"mode": "normal"
}
}
}
},
"unit": "ms"
},
"fill": 1,
"id": 18,
Expand Down
15 changes: 9 additions & 6 deletions production/loki-mixin/dashboards/loki-reads.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,17 @@ local utils = import 'mixin-utils/utils.libsonnet';
},
],
fieldConfig+: {
custom+: {
fillOpacity: 50,
showPoints: 'never',
stacking: {
group: 'A',
mode: 'normal',
defaults+: {
custom+: {
fillOpacity: 50,
showPoints: 'never',
stacking: {
group: 'A',
mode: 'normal',
},
},
},
unit: 'ms',
},
},

Expand Down

0 comments on commit 6d82292

Please sign in to comment.