telemetry

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetGlobalMeterProvider

func SetGlobalMeterProvider(mp metric.MeterProvider)

Types

type MeterProviderOption

type MeterProviderOption func(*meterProviderConfig)

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

func WithAggregatorSelector

func WithAggregatorSelector(aggregatorSelector metricsdk.AggregatorSelector) MeterProviderOption

WithAggregatorSelector sets selector of aggregator.

func WithCollectPeriod

func WithCollectPeriod(collectPeriod time.Duration) MeterProviderOption

WithCollectPeriod sets CollectPeriod of a MeterProvider.

CollectPeriod is the interval between calls to Collect a checkpoint.

func WithCollectTimeout

func WithCollectTimeout(collectTimeout time.Duration) MeterProviderOption

WithCollectTimeout sets CollectTimeout of a MeterProvider.

CollectTimeout is the timeout of the Context passed to Collect() and subsequently to Observer instrument callbacks.

func WithExporter

func WithExporter(exporter metricsdk.Exporter, shutdownExporter ShutdownExporter) MeterProviderOption

WithExporter sets exporter and its shutdown function.

func WithHostInstrumentation

func WithHostInstrumentation() MeterProviderOption

WithHostInstrumentation enables host instrumentation.

func WithPushTimeout

func WithPushTimeout(pushTimeout time.Duration) MeterProviderOption

WithPushTimeout sets PushTimeout of a MeterProvider.

PushTimeout is the timeout of the Context when a exporter is configured.

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 ShutdownExporter

type ShutdownExporter func(context.Context)

func NewOLTPExporter

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

func NewStdoutExporter

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

type StopMeterProvider

type StopMeterProvider func(context.Context)

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