Skip to content

Commit

Permalink
Changes interval on grafana dashboards to match scrape interval (#1669)
Browse files Browse the repository at this point in the history
* 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 <julianocosta89@outlook.com>
Co-authored-by: Pierre Tessier <pierre@pierretessier.com>
  • Loading branch information
3 people authored Jul 23, 2024
1 parent 070beca commit d7a21a7
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 10 deletions.
31 changes: 21 additions & 10 deletions src/grafana/provisioning/dashboards/demo/demo-dashboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": 2,
"links": [],
"liveNow": false,
"panels": [
Expand Down Expand Up @@ -52,6 +53,7 @@
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
Expand Down Expand Up @@ -107,6 +109,7 @@
"y": 1
},
"id": 2,
"interval": "2m",
"options": {
"legend": {
"calcs": [],
Expand Down Expand Up @@ -187,6 +190,7 @@
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
Expand Down Expand Up @@ -241,6 +245,7 @@
"y": 1
},
"id": 10,
"interval": "2m",
"options": {
"legend": {
"calcs": [],
Expand Down Expand Up @@ -281,6 +286,7 @@
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
Expand Down Expand Up @@ -336,10 +342,11 @@
"y": 9
},
"id": 12,
"interval": "2m",
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"displayMode": "table",
"placement": "bottom",
"showLegend": true
},
Expand Down Expand Up @@ -431,7 +438,7 @@
},
"showHeader": true
},
"pluginVersion": "10.1.2",
"pluginVersion": "10.4.3",
"targets": [
{
"alias": "",
Expand Down Expand Up @@ -518,7 +525,7 @@
},
"showHeader": true
},
"pluginVersion": "10.1.2",
"pluginVersion": "10.4.3",
"targets": [
{
"alias": "",
Expand Down Expand Up @@ -577,6 +584,7 @@
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
Expand Down Expand Up @@ -695,6 +703,7 @@
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
Expand Down Expand Up @@ -798,6 +807,7 @@
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
Expand Down Expand Up @@ -892,6 +902,7 @@
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
Expand Down Expand Up @@ -946,6 +957,7 @@
"y": 35
},
"id": 16,
"interval": "2m",
"options": {
"legend": {
"calcs": [],
Expand All @@ -965,7 +977,7 @@
"uid": "webstore-metrics"
},
"editorMode": "code",
"expr": "rate(otel_trace_span_processor_spans{job=\"opentelemetry-demo/quoteservice\"}[2m])*120",
"expr": "rate(otel_trace_span_processor_spans{job=\"quoteservice\"}[2m])*120",
"interval": "2m",
"legendFormat": "{{state}}",
"range": true,
Expand All @@ -978,17 +990,16 @@
],
"refresh": "",
"revision": 1,
"schemaVersion": 38,
"style": "dark",
"schemaVersion": 39,
"tags": [],
"templating": {
"list": [
{
"allValue": "",
"current": {
"selected": true,
"text": "adservice",
"value": "adservice"
"text": "frontend",
"value": "frontend"
},
"datasource": {
"type": "prometheus",
Expand All @@ -1013,7 +1024,7 @@
]
},
"time": {
"from": "now-3h",
"from": "now-1h",
"to": "now"
},
"timepicker": {},
Expand All @@ -1022,4 +1033,4 @@
"uid": "W2gX2zHVk",
"version": 1,
"weekStart": ""
}
}
3 changes: 3 additions & 0 deletions src/prometheus/prometheus-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
global:
evaluation_interval: 30s
scrape_interval: 5s
storage:
tsdb:
out_of_order_time_window: 30m
scrape_configs:
- job_name: otel-collector
static_configs:
Expand Down

0 comments on commit d7a21a7

Please sign in to comment.