fakepluginmetrics

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakePluginMetrics

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

FakePluginMetrics mimics behavior of plugin metrics wrapper, delegates behavior to FakeMetrics, appending fixed labels

func New

func New(labels ...telemetry.Label) *FakePluginMetrics

New create new fake metrics wrapper for plugin test

func (*FakePluginMetrics) AddSample

func (m *FakePluginMetrics) AddSample(key []string, val float32)

func (*FakePluginMetrics) AddSampleWithLabels

func (m *FakePluginMetrics) AddSampleWithLabels(key []string, val float32, labels []telemetry.Label)

func (*FakePluginMetrics) AllMetrics

func (m *FakePluginMetrics) AllMetrics() []fakemetrics.MetricItem

AllMetrics return all collected metrics

func (*FakePluginMetrics) EmitKey

func (m *FakePluginMetrics) EmitKey(key []string, val float32)

func (*FakePluginMetrics) IncrCounter

func (m *FakePluginMetrics) IncrCounter(key []string, val float32)

func (*FakePluginMetrics) IncrCounterWithLabels

func (m *FakePluginMetrics) IncrCounterWithLabels(key []string, val float32, labels []telemetry.Label)

func (*FakePluginMetrics) MeasureSince

func (m *FakePluginMetrics) MeasureSince(key []string, start time.Time)

func (*FakePluginMetrics) MeasureSinceWithLabels

func (m *FakePluginMetrics) MeasureSinceWithLabels(key []string, start time.Time, labels []telemetry.Label)

func (*FakePluginMetrics) SetGauge

func (m *FakePluginMetrics) SetGauge(key []string, val float32)

func (*FakePluginMetrics) SetGaugeWithLabels

func (m *FakePluginMetrics) SetGaugeWithLabels(key []string, val float32, labels []telemetry.Label)

Jump to

Keyboard shortcuts

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