metrics

package
v0.9.17 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// RequestDuration tracks the duration of VDB requests
	RequestDuration = promauto.NewHistogramVec(
		prometheus.HistogramOpts{
			Name:    "weave_request_duration_seconds",
			Help:    "Duration of VDB requests in seconds",
			Buckets: []float64{.001, .005, .01, .05, .1, .5, 1, 5, 10},
		},
		[]string{"vdb_type", "operation", "status"},
	)

	// DocumentCount tracks the number of documents processed
	DocumentCount = promauto.NewCounterVec(
		prometheus.CounterOpts{
			Name: "weave_documents_total",
			Help: "Total number of documents processed",
		},
		[]string{"vdb_type", "operation"},
	)

	// ErrorCount tracks errors encountered
	ErrorCount = promauto.NewCounterVec(
		prometheus.CounterOpts{
			Name: "weave_errors_total",
			Help: "Total number of errors encountered",
		},
		[]string{"vdb_type", "operation", "error_type"},
	)

	// ActiveConnections tracks active VDB connections
	ActiveConnections = promauto.NewGaugeVec(
		prometheus.GaugeOpts{
			Name: "weave_active_connections",
			Help: "Number of active VDB connections",
		},
		[]string{"vdb_type"},
	)
)

Functions

func DecrementActiveConnections

func DecrementActiveConnections(vdbType string)

DecrementActiveConnections decrements active connection count

func IncrementActiveConnections

func IncrementActiveConnections(vdbType string)

IncrementActiveConnections increments active connection count

func RecordDocument

func RecordDocument(vdbType, operation string, count int)

RecordDocument records document operations

func RecordError

func RecordError(vdbType, operation, errorType string)

RecordError records an error

func RecordRequest

func RecordRequest(vdbType, operation string, duration time.Duration, err error)

RecordRequest records a VDB request with timing

Types

This section is empty.

Jump to

Keyboard shortcuts

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