telemetry

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ObserveAgentRequest

func ObserveAgentRequest(path string, status int, d time.Duration)

func ObserveAuditAppend

func ObserveAuditAppend(err error)

func ObserveHTTPRequest

func ObserveHTTPRequest(path string, status int, d time.Duration, slow bool)

func ObserveStoreSave

func ObserveStoreSave(d time.Duration, err error)

func Prometheus

func Prometheus() string

func ResetForTest

func ResetForTest()

Types

type Registry

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

func NewRegistry

func NewRegistry() *Registry

func (*Registry) ObserveAgentRequest

func (r *Registry) ObserveAgentRequest(path string, status int, d time.Duration)

func (*Registry) ObserveAuditAppend

func (r *Registry) ObserveAuditAppend(err error)

func (*Registry) ObserveHTTPRequest

func (r *Registry) ObserveHTTPRequest(path string, status int, d time.Duration, slow bool)

func (*Registry) ObserveStoreSave

func (r *Registry) ObserveStoreSave(d time.Duration, err error)

func (*Registry) Prometheus

func (r *Registry) Prometheus() string

func (*Registry) Reset

func (r *Registry) Reset()

func (*Registry) Snapshot

func (r *Registry) Snapshot() Snapshot

type Snapshot

type Snapshot struct {
	StartedAt time.Time
	Uptime    time.Duration
	Store     map[string]durationStats
	Audit     map[string]uint64
	HTTP      map[httpKey]durationStats
	HTTPSlow  map[string]uint64
	Agent     map[httpKey]durationStats
}

func CurrentSnapshot

func CurrentSnapshot() Snapshot

Jump to

Keyboard shortcuts

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