Documentation ¶
Overview ¶
Package metrics contains the HTTP server for exposing Prometheus metrics.
Index ¶
Constants ¶
View Source
const DefaultListenAddress = "[::]:8080"
DefaultListenAddress is the default listen address for the node Metrics.
View Source
const DefaultPath = "/metrics"
DefaultPath is the default path for the node Metrics.
Variables ¶
This section is empty.
Functions ¶
func AppendMetricsMiddlewares ¶
func AppendMetricsMiddlewares(log *slog.Logger, uu []grpc.UnaryServerInterceptor, ss []grpc.StreamServerInterceptor) ([]grpc.UnaryServerInterceptor, []grpc.StreamServerInterceptor, error)
AppendMetricsMiddlewares appends the Prometheus metrics middlewares to the gRPC server interceptors.
Types ¶
type Options ¶
type Options struct { // ListenAddress is the address to start the metrics server on. ListenAddress string // Path is the path to expose metrics on. Path string }
Options contains the configuration for exposing node metrics.
type Server ¶
type Server struct { Options // contains filtered or unexported fields }
Server is the metrics server.
func (*Server) ListenAndServe ¶
ListenAndServe starts the server and blocks until the server exits.
Click to show internal directories.
Click to hide internal directories.