It also exports requests and events (response) triggered during verification. All requests made to the service (e.g.https://server-verify.hashscan.io/api-docs) will be included, for example
sourcify_http_request_duration_seconds_bucket{le="0.003",status_code="200",method="POST",path="/verify"} 3
sourcify_http_request_duration_seconds_bucket{le="0.03",status_code="200",method="POST",path="/verify"} 4
sourcify_http_request_duration_seconds_bucket{le="0.1",status_code="200",method="POST",path="/verify"} 5
sourcify_http_request_duration_seconds_bucket{le="0.3",status_code="200",method="POST",path="/verify"} 5
sourcify_http_request_duration_seconds_bucket{le="1.5",status_code="200",method="POST",path="/verify"} 6
sourcify_http_request_duration_seconds_bucket{le="10",status_code="200",method="POST",path="/verify"} 6
sourcify_http_request_duration_seconds_bucket{le="+Inf",status_code="200",method="POST",path="/verify"} 6
sourcify_http_request_duration_seconds_sum{status_code="200",method="POST",path="/verify"} 0.632749876
sourcify_http_request_duration_seconds_count{status_code="200",method="POST",path="/verify"} 6
# HELP sourcify_up 1 = up, 0 = not up
# TYPE sourcify_up gauge
sourcify_up 1
# HELP sourcify_event_count events that happened during verification labeled with: event and chainId
# TYPE sourcify_event_count counter
sourcify_event_count{event="Verification.MatchStored",chainId="298"} 2
Description:
This PR adds another endpoint,
/metrics
, where you can fetch service metrics to be ingested by Prometheus/Grafana.Using for instance the NodeJS Application Dashboard you can see NodeJS metrics
It also exports requests and events (response) triggered during verification. All requests made to the service (e.g. https://server-verify.hashscan.io/api-docs) will be included, for example
Note that the
sourcify_
prefix is used all metrics to easily differentiate in Grafana.The events exported are
(the ones omitted
[...]
areMonitor.*
related not used at the moment)Related issue(s):
Fixes #
Notes for reviewer:
Checklist