otel

package
v0.0.0-...-0be08e2 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultMetricsPath string = "/v1/metrics"

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

type Collector interface {
	Stop() error
	GetMetrics() []*metricpb.Metric
}

Collector is an interface that mock collectors should implements, so they can be used for the end-to-end testing.

type MetricsStorage

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

MetricsStorage stores the metrics. Mock collectors could use it to store metrics they have received.

func NewMetricsStorage

func NewMetricsStorage() MetricsStorage

NewMetricsStorage creates a new metrics storage.

func (*MetricsStorage) AddMetrics

AddMetrics adds metrics to the metrics storage.

func (*MetricsStorage) GetMetrics

func (s *MetricsStorage) GetMetrics() []*metricpb.Metric

GetMetrics returns the stored metrics.

Jump to

Keyboard shortcuts

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