Skip to content

Commit d7a21a7

Browse files
joshleecreatesjulianocosta89puckpuck
authored
Changes interval on grafana dashboards to match scrape interval (#1669)
* Changes interval on grafana dashboards to match scrape interval * fix out of order sample * use 2m interval for spanmetrics * use 30m for out of order samples --------- Co-authored-by: Juliano Costa <[email protected]> Co-authored-by: Pierre Tessier <[email protected]>
1 parent 070beca commit d7a21a7

File tree

2 files changed

+24
-10
lines changed

2 files changed

+24
-10
lines changed

src/grafana/provisioning/dashboards/demo/demo-dashboard.json

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"editable": true,
2525
"fiscalYearStartMonth": 0,
2626
"graphTooltip": 0,
27+
"id": 2,
2728
"links": [],
2829
"liveNow": false,
2930
"panels": [
@@ -52,6 +53,7 @@
5253
"mode": "palette-classic"
5354
},
5455
"custom": {
56+
"axisBorderShow": false,
5557
"axisCenteredZero": false,
5658
"axisColorMode": "text",
5759
"axisLabel": "",
@@ -107,6 +109,7 @@
107109
"y": 1
108110
},
109111
"id": 2,
112+
"interval": "2m",
110113
"options": {
111114
"legend": {
112115
"calcs": [],
@@ -187,6 +190,7 @@
187190
"mode": "palette-classic"
188191
},
189192
"custom": {
193+
"axisBorderShow": false,
190194
"axisCenteredZero": false,
191195
"axisColorMode": "text",
192196
"axisLabel": "",
@@ -241,6 +245,7 @@
241245
"y": 1
242246
},
243247
"id": 10,
248+
"interval": "2m",
244249
"options": {
245250
"legend": {
246251
"calcs": [],
@@ -281,6 +286,7 @@
281286
"mode": "palette-classic"
282287
},
283288
"custom": {
289+
"axisBorderShow": false,
284290
"axisCenteredZero": false,
285291
"axisColorMode": "text",
286292
"axisLabel": "",
@@ -336,10 +342,11 @@
336342
"y": 9
337343
},
338344
"id": 12,
345+
"interval": "2m",
339346
"options": {
340347
"legend": {
341348
"calcs": [],
342-
"displayMode": "list",
349+
"displayMode": "table",
343350
"placement": "bottom",
344351
"showLegend": true
345352
},
@@ -431,7 +438,7 @@
431438
},
432439
"showHeader": true
433440
},
434-
"pluginVersion": "10.1.2",
441+
"pluginVersion": "10.4.3",
435442
"targets": [
436443
{
437444
"alias": "",
@@ -518,7 +525,7 @@
518525
},
519526
"showHeader": true
520527
},
521-
"pluginVersion": "10.1.2",
528+
"pluginVersion": "10.4.3",
522529
"targets": [
523530
{
524531
"alias": "",
@@ -577,6 +584,7 @@
577584
"mode": "palette-classic"
578585
},
579586
"custom": {
587+
"axisBorderShow": false,
580588
"axisCenteredZero": false,
581589
"axisColorMode": "text",
582590
"axisLabel": "",
@@ -695,6 +703,7 @@
695703
"mode": "palette-classic"
696704
},
697705
"custom": {
706+
"axisBorderShow": false,
698707
"axisCenteredZero": false,
699708
"axisColorMode": "text",
700709
"axisLabel": "",
@@ -798,6 +807,7 @@
798807
"mode": "palette-classic"
799808
},
800809
"custom": {
810+
"axisBorderShow": false,
801811
"axisCenteredZero": false,
802812
"axisColorMode": "text",
803813
"axisLabel": "",
@@ -892,6 +902,7 @@
892902
"mode": "palette-classic"
893903
},
894904
"custom": {
905+
"axisBorderShow": false,
895906
"axisCenteredZero": false,
896907
"axisColorMode": "text",
897908
"axisLabel": "",
@@ -946,6 +957,7 @@
946957
"y": 35
947958
},
948959
"id": 16,
960+
"interval": "2m",
949961
"options": {
950962
"legend": {
951963
"calcs": [],
@@ -965,7 +977,7 @@
965977
"uid": "webstore-metrics"
966978
},
967979
"editorMode": "code",
968-
"expr": "rate(otel_trace_span_processor_spans{job=\"opentelemetry-demo/quoteservice\"}[2m])*120",
980+
"expr": "rate(otel_trace_span_processor_spans{job=\"quoteservice\"}[2m])*120",
969981
"interval": "2m",
970982
"legendFormat": "{{state}}",
971983
"range": true,
@@ -978,17 +990,16 @@
978990
],
979991
"refresh": "",
980992
"revision": 1,
981-
"schemaVersion": 38,
982-
"style": "dark",
993+
"schemaVersion": 39,
983994
"tags": [],
984995
"templating": {
985996
"list": [
986997
{
987998
"allValue": "",
988999
"current": {
9891000
"selected": true,
990-
"text": "adservice",
991-
"value": "adservice"
1001+
"text": "frontend",
1002+
"value": "frontend"
9921003
},
9931004
"datasource": {
9941005
"type": "prometheus",
@@ -1013,7 +1024,7 @@
10131024
]
10141025
},
10151026
"time": {
1016-
"from": "now-3h",
1027+
"from": "now-1h",
10171028
"to": "now"
10181029
},
10191030
"timepicker": {},
@@ -1022,4 +1033,4 @@
10221033
"uid": "W2gX2zHVk",
10231034
"version": 1,
10241035
"weekStart": ""
1025-
}
1036+
}

src/prometheus/prometheus-config.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
global:
55
evaluation_interval: 30s
66
scrape_interval: 5s
7+
storage:
8+
tsdb:
9+
out_of_order_time_window: 30m
710
scrape_configs:
811
- job_name: otel-collector
912
static_configs:

0 commit comments

Comments
 (0)