metric

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActualMetrics

func ActualMetrics(t *testing.T, reader *metric.ManualReader) metricdata.ResourceMetrics

func ForceFlush

func ForceFlush(ctx context.Context)

func InitializeMetrics

func InitializeMetrics(ctx context.Context, config OtelConfig) (*metric.MeterProvider, error)

func MockMetric

func MockMetric(config OtelConfig) (*metric.ManualReader, *metric.MeterProvider)

Types

type OtelConfig added in v0.0.2

type OtelConfig struct {
	OtelMetricEndpoint string // is used by the otel sdk to identify the endpoint to send metrics to. According to document it Will be set implicitly by the otel sdk. But it does not work. I set it explicitly.
	OtelServiceName    string // is used by the otel sdk to identify the service name. I found no way to set it explicitly by the otel sdk. According to the specification setting an attribute with name "service.name" should work, but it does not.
}

Jump to

Keyboard shortcuts

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