Skip to content

Commit 212e4ae

Browse files
committed
feat: add grafana dashboards
1 parent 7595f9d commit 212e4ae

File tree

2 files changed

+238
-12
lines changed

2 files changed

+238
-12
lines changed

batcher/aligned-batcher/src/lib.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1560,9 +1560,12 @@ impl Batcher {
15601560
ETHEREUM_CALL_MAX_RETRY_DELAY,
15611561
)
15621562
.await;
1563+
self.metrics
1564+
.create_new_task_latency
1565+
.set(start.elapsed().as_millis() as i64);
15631566
// Set to zero since it is not always executed
15641567
self.metrics.cancel_create_new_task_latency.set(0);
1565-
let result = match retry_result {
1568+
match retry_result {
15661569
Ok(receipt) => {
15671570
if let Err(e) = self
15681571
.telemetry
@@ -1579,11 +1582,7 @@ impl Batcher {
15791582
Err(BatcherError::ReceiptNotFoundError)
15801583
}
15811584
Err(RetryError::Permanent(e)) | Err(RetryError::Transient(e)) => Err(e),
1582-
};
1583-
self.metrics
1584-
.create_new_task_latency
1585-
.set(start.elapsed().as_millis() as i64);
1586-
result
1585+
}
15871586
}
15881587

15891588
/// Sends a transaction to Ethereum with the same nonce as the previous one to override it.

grafana/provisioning/dashboards/aligned/aggregator_batcher.json

Lines changed: 233 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"editable": true,
1919
"fiscalYearStartMonth": 0,
2020
"graphTooltip": 0,
21-
"id": 4,
21+
"id": 2,
2222
"links": [],
2323
"liveNow": false,
2424
"panels": [
@@ -2625,23 +2625,250 @@
26252625
}
26262626
],
26272627
"type": "timeseries"
2628+
},
2629+
{
2630+
"datasource": {
2631+
"type": "prometheus",
2632+
"uid": "prometheus"
2633+
},
2634+
"fieldConfig": {
2635+
"defaults": {
2636+
"color": {
2637+
"mode": "palette-classic"
2638+
},
2639+
"custom": {
2640+
"axisCenteredZero": false,
2641+
"axisColorMode": "text",
2642+
"axisLabel": "",
2643+
"axisPlacement": "auto",
2644+
"barAlignment": 0,
2645+
"drawStyle": "line",
2646+
"fillOpacity": 48,
2647+
"gradientMode": "opacity",
2648+
"hideFrom": {
2649+
"legend": false,
2650+
"tooltip": false,
2651+
"viz": false
2652+
},
2653+
"insertNulls": false,
2654+
"lineInterpolation": "smooth",
2655+
"lineWidth": 1,
2656+
"pointSize": 5,
2657+
"scaleDistribution": {
2658+
"type": "linear"
2659+
},
2660+
"showPoints": "auto",
2661+
"spanNulls": false,
2662+
"stacking": {
2663+
"group": "A",
2664+
"mode": "none"
2665+
},
2666+
"thresholdsStyle": {
2667+
"mode": "off"
2668+
}
2669+
},
2670+
"mappings": [],
2671+
"thresholds": {
2672+
"mode": "absolute",
2673+
"steps": [
2674+
{
2675+
"color": "green",
2676+
"value": null
2677+
}
2678+
]
2679+
},
2680+
"unit": "ms"
2681+
},
2682+
"overrides": []
2683+
},
2684+
"gridPos": {
2685+
"h": 8,
2686+
"w": 12,
2687+
"x": 0,
2688+
"y": 69
2689+
},
2690+
"id": 43,
2691+
"options": {
2692+
"legend": {
2693+
"calcs": [],
2694+
"displayMode": "list",
2695+
"placement": "bottom",
2696+
"showLegend": false
2697+
},
2698+
"tooltip": {
2699+
"mode": "single",
2700+
"sort": "none"
2701+
}
2702+
},
2703+
"targets": [
2704+
{
2705+
"datasource": {
2706+
"type": "prometheus",
2707+
"uid": "prometheus"
2708+
},
2709+
"disableTextWrap": false,
2710+
"editorMode": "code",
2711+
"expr": "s3_latency * 10 ^ (-3)",
2712+
"fullMetaSearch": false,
2713+
"includeNullMetadata": true,
2714+
"instant": false,
2715+
"legendFormat": "__auto",
2716+
"range": true,
2717+
"refId": "A",
2718+
"useBackend": false
2719+
}
2720+
],
2721+
"title": "S3 Latency",
2722+
"type": "timeseries"
2723+
},
2724+
{
2725+
"datasource": {
2726+
"type": "prometheus",
2727+
"uid": "prometheus"
2728+
},
2729+
"fieldConfig": {
2730+
"defaults": {
2731+
"color": {
2732+
"mode": "palette-classic"
2733+
},
2734+
"custom": {
2735+
"axisCenteredZero": false,
2736+
"axisColorMode": "text",
2737+
"axisLabel": "",
2738+
"axisPlacement": "auto",
2739+
"barAlignment": 0,
2740+
"drawStyle": "line",
2741+
"fillOpacity": 48,
2742+
"gradientMode": "opacity",
2743+
"hideFrom": {
2744+
"legend": false,
2745+
"tooltip": false,
2746+
"viz": false
2747+
},
2748+
"insertNulls": false,
2749+
"lineInterpolation": "smooth",
2750+
"lineWidth": 1,
2751+
"pointSize": 5,
2752+
"scaleDistribution": {
2753+
"type": "linear"
2754+
},
2755+
"showPoints": "auto",
2756+
"spanNulls": false,
2757+
"stacking": {
2758+
"group": "A",
2759+
"mode": "none"
2760+
},
2761+
"thresholdsStyle": {
2762+
"mode": "off"
2763+
}
2764+
},
2765+
"mappings": [],
2766+
"thresholds": {
2767+
"mode": "absolute",
2768+
"steps": [
2769+
{
2770+
"color": "green",
2771+
"value": null
2772+
},
2773+
{
2774+
"color": "red",
2775+
"value": 80
2776+
}
2777+
]
2778+
},
2779+
"unit": "s"
2780+
},
2781+
"overrides": []
2782+
},
2783+
"gridPos": {
2784+
"h": 8,
2785+
"w": 12,
2786+
"x": 0,
2787+
"y": 77
2788+
},
2789+
"id": 45,
2790+
"options": {
2791+
"legend": {
2792+
"calcs": [],
2793+
"displayMode": "list",
2794+
"placement": "right",
2795+
"showLegend": true
2796+
},
2797+
"tooltip": {
2798+
"mode": "single",
2799+
"sort": "none"
2800+
}
2801+
},
2802+
"targets": [
2803+
{
2804+
"datasource": {
2805+
"type": "prometheus",
2806+
"uid": "prometheus"
2807+
},
2808+
"disableTextWrap": false,
2809+
"editorMode": "code",
2810+
"expr": "cancel_create_new_task_latency * 10 ^ (-3)",
2811+
"fullMetaSearch": false,
2812+
"includeNullMetadata": true,
2813+
"instant": false,
2814+
"legendFormat": "cancel_new_task",
2815+
"range": true,
2816+
"refId": "A",
2817+
"useBackend": false
2818+
},
2819+
{
2820+
"datasource": {
2821+
"type": "prometheus",
2822+
"uid": "prometheus"
2823+
},
2824+
"disableTextWrap": false,
2825+
"editorMode": "code",
2826+
"expr": "create_new_task_latency * 10 ^(-3)",
2827+
"fullMetaSearch": false,
2828+
"hide": false,
2829+
"includeNullMetadata": true,
2830+
"instant": false,
2831+
"legendFormat": "create_new_task",
2832+
"range": true,
2833+
"refId": "B",
2834+
"useBackend": false
2835+
}
2836+
],
2837+
"title": "CreateNewTask Latency",
2838+
"transformations": [
2839+
{
2840+
"id": "calculateField",
2841+
"options": {
2842+
"alias": "total",
2843+
"mode": "reduceRow",
2844+
"reduce": {
2845+
"include": [
2846+
"cancel_new_task",
2847+
"create_new_task"
2848+
],
2849+
"reducer": "sum"
2850+
}
2851+
}
2852+
}
2853+
],
2854+
"type": "timeseries"
26282855
}
26292856
],
2630-
"refresh": "5s",
2857+
"refresh": false,
26312858
"schemaVersion": 38,
26322859
"style": "dark",
26332860
"tags": [],
26342861
"templating": {
26352862
"list": []
26362863
},
26372864
"time": {
2638-
"from": "now-30m",
2639-
"to": "now"
2865+
"from": "2024-12-04T20:38:45.381Z",
2866+
"to": "2024-12-04T20:42:55.440Z"
26402867
},
26412868
"timepicker": {},
26422869
"timezone": "browser",
26432870
"title": "System Data",
26442871
"uid": "aggregator",
2645-
"version": 9,
2872+
"version": 13,
26462873
"weekStart": ""
2647-
}
2874+
}

0 commit comments

Comments
 (0)