Skip to content

Commit

Permalink
dashboard: add uptime [stagingdeploy]
Browse files Browse the repository at this point in the history
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
  • Loading branch information
jsign committed Oct 12, 2022
1 parent c4b726a commit fcaffdd
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,71 @@
"title": "Last Hash Calculation Elapsed Time",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "P1809F7CD0C75ACF3"
},
"description": "",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "ms"
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 3,
"x": 10,
"y": 15
},
"id": 84,
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "9.0.1",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "P1809F7CD0C75ACF3"
},
"editorMode": "code",
"exemplar": true,
"expr": "runtime_uptime{job=\"validator\"}",
"interval": "",
"legendFormat": "objects",
"range": true,
"refId": "A"
}
],
"title": "Uptime",
"type": "stat"
},
{
"collapsed": false,
"datasource": {
Expand Down Expand Up @@ -2813,13 +2878,13 @@
"list": []
},
"time": {
"from": "now-6h",
"from": "now-5m",
"to": "now"
},
"timepicker": {},
"timezone": "",
"title": "Validator",
"uid": "2Le7qt_7z",
"version": 13,
"version": 12,
"weekStart": ""
}
2 changes: 1 addition & 1 deletion pkg/metrics/instrumenting.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func SetupInstrumentation(prometheusAddr string) error {
func startCollectingRuntimeMetrics() error {
meter := global.MeterProvider().Meter("runtime")

uptime, err := meter.AsyncInt64().Counter(
uptime, err := meter.AsyncInt64().Gauge(
"runtime.uptime",
instrument.WithUnit(unit.Milliseconds),
instrument.WithDescription("Milliseconds since application was initialized"),
Expand Down

0 comments on commit fcaffdd

Please sign in to comment.