Documentation
¶
Overview ¶
Package metricserver provides a dedicated HTTP server for operational endpoints: a /status health-check and a /metrics Prometheus scrape endpoint.
The server implements the runner.Service interface (Start, Stop, Name) and is designed to run independently from the main application server. This separation allows metrics and health to be monitored on a different port/interface from the API.
Basic usage:
msrv := metricserver.New(&metricserver.Config{
Host: "0.0.0.0",
Port: 9090,
})
err := msrv.Start(ctx)
defer msrv.Stop()
// Endpoints:
// GET /status returns {"status":"ok"}
// GET /metrics returns Prometheus-formatted metrics
The metrics endpoint integrates with Prometheus client via echoprometheus middleware.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.