metrics

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package metrics provides a set of Prometheus metrics for monitoring the performance and behavior of a TR-069 simulator. This package includes counters, histograms, and gauges to track various aspects such as session attempts, connection latency, method calls, and parameter interactions. The metrics collected here are relevant for understanding the operational characteristics and performance of the TR-069 simulator. Additionally, this package includes a no-op implementation for cases where metrics collection is not required or needs to be disabled.

Package metrics provides a set of Prometheus metrics for monitoring the performance and behavior of a TR-069 simulator. This package includes counters, histograms, and gauges to track various aspects such as session attempts, connection latency, method calls, and parameter interactions. The metrics collected here are relevant for understanding the operational characteristics and performance of the TR-069 simulator. Additionally, this package includes a no-op implementation for cases where metrics collection is not required or needs to be disabled.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metrics

type Metrics struct {
	Bootstrapped        prometheus.Counter
	ConnectionLatency   prometheus.Histogram
	MethodCalls         prometheus_CounterVec
	RequestFailures     prometheus.Counter
	ResponseStatus      prometheus_CounterVec
	SessionsAttempted   prometheus.Counter
	SessionsEstablished prometheus.Counter
	SessionsCompleted   prometheus.Counter
	SessionDuration     prometheus_HistogramVec
	ConcurrentSessions  prometheus.Gauge
	InformEvents        prometheus_CounterVec
	ParametersRead      prometheus.Counter
	ParametersWritten   prometheus.Counter
}

Metrics holds Prometheus metrics for monitoring the TR-069 simulator's performance and behavior. It includes counters, histograms, and gauges to track session attempts, connection latency, method calls, and more.

func New

func New(reg prometheus.Registerer) *Metrics

New creates and registers a new Metrics instance with the provided Prometheus registerer.

func NewNoop

func NewNoop() *Metrics

NewNoop creates a new Metrics instance with no-op implementations of Prometheus metrics. This is useful for testing or disabling metrics collection.

Jump to

Keyboard shortcuts

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