Help us shape the future of Go! Take the 2026 Go Developer Survey

metrics

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const COMPILATION_TIME = "compilation_time"

Metric names

View Source
const DATA_DOCUMENTS_LOADED = "data_documents_loaded"
View Source
const INPUT_IDX = "input_idx"
View Source
const MODULES_LOADED = "modules_loaded"
View Source
const PACKAGE = "package"

Label names

View Source
const POLICIES_LOADED = "policies_loaded"
View Source
const POLICY_ERRORS = "policy_errors"
View Source
const PROVIDERS_LOAD_TIME = "providers_load_time"
View Source
const RESULTS_PRODUCED = "results_produced"
View Source
const RULES_EVALUATED = "rules_evaluated"
View Source
const RULE_EVAL_TIME = "rule_evaluation_time"
View Source
const RULE_SELECTION_TIME = "rule_selection_time"
View Source
const TOTAL_RULE_EVAL_TIME = "total_rule_evaluation_time"

Variables

This section is empty.

Functions

This section is empty.

Types

type Buckets

type Buckets []float64

type Counter

type Counter interface {
	Inc()
	Add(val float64)
}

func NewLocalCounter

func NewLocalCounter(name, description string, labels Labels) Counter

type Histogram

type Histogram interface {
	Observe(val float64)
}

type Labels

type Labels = map[string]string

func MergeLabels added in v0.17.0

func MergeLabels(labels ...Labels) Labels

type LocalCounter

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

func (*LocalCounter) Add

func (l *LocalCounter) Add(val float64)

func (*LocalCounter) Count

func (l *LocalCounter) Count() float64

func (*LocalCounter) Inc

func (l *LocalCounter) Inc()

type LocalMetrics

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

func NewLocalMetrics

func NewLocalMetrics(logger logging.Logger) *LocalMetrics

func (*LocalMetrics) Counter

func (l *LocalMetrics) Counter(_ context.Context, name, description string, labels Labels) Counter

func (*LocalMetrics) Log

func (l *LocalMetrics) Log(ctx context.Context)

func (*LocalMetrics) Timer

func (l *LocalMetrics) Timer(_ context.Context, name, description string, labels Labels) Timer

type LocalTimer

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

func (*LocalTimer) Duration

func (l *LocalTimer) Duration() time.Duration

func (*LocalTimer) Record

func (l *LocalTimer) Record(d time.Duration)

type Metrics

type Metrics interface {
	Counter(ctx context.Context, name, description string, labels Labels) Counter
	Timer(ctx context.Context, name, description string, labels Labels) Timer
}

type Timer

type Timer interface {
	Record(d time.Duration)
}

func NewLocalTimer

func NewLocalTimer(name, description string, labels Labels) Timer

Jump to

Keyboard shortcuts

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