Documentation ¶
Index ¶
- type FakePluginMetrics
- func (m *FakePluginMetrics) AddSample(key []string, val float32)
- func (m *FakePluginMetrics) AddSampleWithLabels(key []string, val float32, labels []telemetry.Label)
- func (m *FakePluginMetrics) AllMetrics() []fakemetrics.MetricItem
- func (m *FakePluginMetrics) EmitKey(key []string, val float32)
- func (m *FakePluginMetrics) IncrCounter(key []string, val float32)
- func (m *FakePluginMetrics) IncrCounterWithLabels(key []string, val float32, labels []telemetry.Label)
- func (m *FakePluginMetrics) MeasureSince(key []string, start time.Time)
- func (m *FakePluginMetrics) MeasureSinceWithLabels(key []string, start time.Time, labels []telemetry.Label)
- func (m *FakePluginMetrics) SetGauge(key []string, val float32)
- func (m *FakePluginMetrics) SetGaugeWithLabels(key []string, val float32, labels []telemetry.Label)
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 (*FakePluginMetrics) SetGauge ¶
func (m *FakePluginMetrics) SetGauge(key []string, val float32)
func (*FakePluginMetrics) SetGaugeWithLabels ¶
func (m *FakePluginMetrics) SetGaugeWithLabels(key []string, val float32, labels []telemetry.Label)
Click to show internal directories.
Click to hide internal directories.