feat: Add Prometheus metrics support
- Add /metrics endpoint for exporting metrics in Prometheus format - Add standard HTTP metrics (requests, latency, errors) - Add middleware to capture metrics from HTTP endpoints - Integrate with existing health server infrastructure
This commit is contained in:
parent
405d3dc746
commit
d1f056471d
1 changed files with 2 additions and 9 deletions
|
|
@ -353,15 +353,8 @@ func (m *Manager) SetupHTTPServer(addr string, healthServer *health.Server) {
|
|||
}
|
||||
}
|
||||
|
||||
m.httpServer = &http.Server{
|
||||
Addr: addr,
|
||||
Handler: m.mux,
|
||||
ReadTimeout: 30 * time.Second,
|
||||
WriteTimeout: 30 * time.Second,
|
||||
}
|
||||
|
||||
// Wrap the entire server handler with metrics tracking too
|
||||
m.httpServer.Handler = &metricMiddleware{handler: m.mux}
|
||||
}
|
||||
|
||||
func (m *Manager) StartAll(ctx context.Context) error {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue