MCPcopy
hub / github.com/prometheus/node_exporter / handler

Struct handler

node_exporter.go:45–55  ·  view source on GitHub ↗

handler wraps an unfiltered http.Handler but uses a filtered handler, created on the fly, if filtering is requested. Create instances with newHandler.

Source from the content-addressed store, hash-verified

43// created on the fly, if filtering is requested. Create instances with
44// newHandler.
45type handler struct {
46 unfilteredHandler http.Handler
47 // enabledCollectors list is used for logging and filtering
48 enabledCollectors []string
49 // exporterMetricsRegistry is a separate registry for the metrics about
50 // the exporter itself.
51 exporterMetricsRegistry *prometheus.Registry
52 includeExporterMetrics bool
53 maxRequests int
54 logger *slog.Logger
55}
56
57func newHandler(includeExporterMetrics bool, maxRequests int, logger *slog.Logger) *handler {
58 h := &handler{

Callers 4

parseProcfsFileMethod · 0.85
parsePoolProcfsFileMethod · 0.85
parsePoolObjsetFileMethod · 0.85
parsePoolStateFileMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected