Setup basic prom metrics endpoint (#624)

* Setup basic prom metrics endpoint
* Use default prom handler to expose go runtime metrics
This commit is contained in:
Dan Sosedoff
2022-12-20 10:13:42 -06:00
committed by GitHub
parent 837e25be74
commit b31e7f1ea7
9 changed files with 143 additions and 16 deletions

View File

@@ -58,6 +58,9 @@ type Options struct {
Cors bool `long:"cors" description:"Enable Cross-Origin Resource Sharing (CORS)"`
CorsOrigin string `long:"cors-origin" description:"Allowed CORS origins" default:"*"`
BinaryCodec string `long:"binary-codec" description:"Codec for binary data serialization, one of 'none', 'hex', 'base58', 'base64'" default:"none"`
MetricsEnabled bool `long:"metrics" description:"Enable Prometheus metrics endpoint"`
MetricsPath string `long:"metrics-path" description:"Path prefix for Prometheus metrics endpoint" default:"/metrics"`
MetricsAddr string `long:"metrics-addr" description:"Listen host and port for Prometheus metrics server"`
}
var Opts Options