telemetry

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClusterIDKey   = attribute.Key("varlog.cluster.id")
	TopicIDKey     = attribute.Key("varlog.topic.id")
	LogStreamIDKey = attribute.Key("varlog.logstream.id")
)

Variables

This section is empty.

Functions

func ClusterID added in v0.15.0

func ClusterID(val types.ClusterID) attribute.KeyValue

func GetGlobalMeterProvider added in v0.15.0

func GetGlobalMeterProvider() metric.MeterProvider

func LogStreamID added in v0.15.0

func LogStreamID(val types.LogStreamID) attribute.KeyValue

func NewOLTPExporter

func NewOLTPExporter(ctx context.Context, clientOpts ...otlpmetricgrpc.Option) (metricsdk.Exporter, error)

func NewStdoutExporter

func NewStdoutExporter(opts ...stdoutmetric.Option) (metricsdk.Exporter, error)

func SetGlobalMeterProvider

func SetGlobalMeterProvider(mp metric.MeterProvider)

func TopicID added in v0.15.0

func TopicID(val types.TopicID) attribute.KeyValue

Types

type MeterProviderOption

type MeterProviderOption func(*meterProviderConfig)

MeterProviderOption is the interface that applies the value to a meter provider configurations.

func WithExporter

func WithExporter(exporter metricsdk.Exporter) MeterProviderOption

WithExporter sets exporter and its shutdown function.

func WithHostInstrumentation

func WithHostInstrumentation() MeterProviderOption

WithHostInstrumentation enables host instrumentation.

func WithResource

func WithResource(resource *resource.Resource) MeterProviderOption

WithResource sets the Resource of a MeterProvider.

func WithRuntimeInstrumentation

func WithRuntimeInstrumentation(opts ...runtime.Option) MeterProviderOption

WithRuntimeInstrumentation enables runtime instrumentation.

type StopMeterProvider

type StopMeterProvider func(context.Context) error

StopMeterProvider is the type for stop function of meter provider. It stops both meter provider and exporter.

func NewMeterProvider

func NewMeterProvider(opts ...MeterProviderOption) (metric.MeterProvider, StopMeterProvider, error)

NewMeterProvider creates a new meter provider and its stop function.

Jump to

Keyboard shortcuts

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