mirror of
https://github.com/ChainSafe/lodestar.git
synced 2026-01-09 07:38:03 -05:00
tracking UnhandledPromiseRejection(s) (#3386)
This commit is contained in:
@@ -2236,6 +2236,87 @@
|
||||
"align": false,
|
||||
"alignLevel": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"datasource": null,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 0,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineInterpolation": "linear",
|
||||
"lineWidth": 1,
|
||||
"pointSize": 5,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"showPoints": "auto",
|
||||
"spanNulls": false,
|
||||
"stacking": {
|
||||
"group": "A",
|
||||
"mode": "none"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 51
|
||||
},
|
||||
"id": 268,
|
||||
"options": {
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom"
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "single"
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"exemplar": false,
|
||||
"expr": "rate(unhandeled_promise_rejections[$__rate_interval])",
|
||||
"interval": "",
|
||||
"legendFormat": "Errors",
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "UnhandledPromiseRejection rate",
|
||||
"type": "timeseries"
|
||||
}
|
||||
],
|
||||
"title": "VM Stats",
|
||||
|
||||
@@ -33,6 +33,9 @@ export function createMetrics(
|
||||
const clockSlot = getCurrentSlot(config, genesisTime);
|
||||
validatorMonitor.scrapeMetrics(clockSlot);
|
||||
});
|
||||
process.on("unhandledRejection", (_error) => {
|
||||
lodestar.unhandeledPromiseRejections.inc();
|
||||
});
|
||||
|
||||
collectDefaultMetrics({
|
||||
register,
|
||||
|
||||
@@ -529,5 +529,9 @@ export function createLodestarMetrics(
|
||||
help: "regen function total errors",
|
||||
labelNames: ["entrypoint", "caller"],
|
||||
}),
|
||||
unhandeledPromiseRejections: register.gauge({
|
||||
name: "unhandeled_promise_rejections",
|
||||
help: "UnhandeledPromiseRejection count",
|
||||
}),
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user