MCPcopy
hub / github.com/redpanda-data/console / Handle

Method Handle

backend/pkg/logger/prometheus.go:68–74  ·  view source on GitHub ↗

Handle increments the appropriate counter and passes the record to the next handler.

(ctx context.Context, record slog.Record)

Source from the content-addressed store, hash-verified

66
67// Handle increments the appropriate counter and passes the record to the next handler.
68func (h *PrometheusHandler) Handle(ctx context.Context, record slog.Record) error {
69 // Increment the counter for this log level
70 h.messageCounterVec.WithLabelValues(record.Level.String()).Inc()
71
72 // Pass the record to the next handler in the chain
73 return h.Handler.Handle(ctx, record)
74}
75
76// Enabled delegates to the wrapped handler.
77func (h *PrometheusHandler) Enabled(ctx context.Context, level slog.Level) bool {

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected