Documentation
¶
Overview ¶
Package metrics provides Prometheus instrumentation for Wadjet.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Metrics ¶
type Metrics struct {
Registry *prometheus.Registry
// Query metrics
QueriesTotal *prometheus.CounterVec
QueryDuration *prometheus.HistogramVec
QueryRowsScanned *prometheus.CounterVec
QueryBytesRead prometheus.Counter
ActiveQueries prometheus.Gauge
// Scanner metrics
FilesScanned prometheus.Counter
FilesPruned prometheus.Counter
RowGroupsScanned prometheus.Counter
RowGroupsPruned prometheus.Counter
PartitionsScanned prometheus.Counter
PartitionsPruned prometheus.Counter
// Worker metrics
WorkerTasks *prometheus.CounterVec
WorkerTaskDuration *prometheus.HistogramVec
WorkerActive prometheus.Gauge
WorkerMemory prometheus.Gauge
// Coordinator metrics
RegisteredWorkers prometheus.Gauge
// Pipeline metrics
BatchesProcessed prometheus.Counter
RowsOutput prometheus.Counter
// Memory/Spill metrics
SpillEvents prometheus.Counter
SpillBytesWritten prometheus.Counter
MemoryBudgetBytes prometheus.Gauge
MemoryUsedBytes prometheus.Gauge
// Cache metrics
CacheHits prometheus.Counter
CacheMisses prometheus.Counter
CacheBytes prometheus.Gauge
// Object-store circuit breaker. Labelled by operation class (read /
// write / delete) because the classes are independent breakers: an
// operator needs to see that DELETEs are tripping without concluding
// that reads are (ADR-0028).
CircuitBreakerOpened *prometheus.CounterVec
}
Metrics holds all Prometheus metrics for a Wadjet node. Uses a custom registry to avoid conflicts with the global default.
func New ¶
func New() *Metrics
New creates and registers all Prometheus metrics with a custom registry.
func (*Metrics) Handler ¶
Handler returns an HTTP handler for the /metrics endpoint using the custom registry.
func (*Metrics) QueryTimer ¶
QueryTimer returns a function that records query duration when called.
Click to show internal directories.
Click to hide internal directories.