metrics

package
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2026 License: Apache-2.0 Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package metrics implements a database watcher consumer that derives event-driven Prometheus metrics from entity changes: runner lifecycle durations and job queue/execution timings. The watcher only surfaces writes, which is all this worker needs; read-path metrics (provider operations, listener polls) are instrumented at their call sites.

The handler does no I/O and no network calls. It reads the event payload, consults the in-memory cache for label resolution and updates Prometheus collectors. The watcher consumer machinery guarantees a slow consumer only grows its own queue and can never block the producer.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Worker

type Worker struct {
	// contains filtered or unexported fields
}

Worker consumes database change events and updates event-driven metrics.

func NewWorker

func NewWorker(ctx context.Context) *Worker

func (*Worker) Start

func (w *Worker) Start() error

func (*Worker) Stop

func (w *Worker) Stop() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL