metrics

package
v1.35.0 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package metrics provides the Provider interface for sending APM metrics

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Nop

type Nop struct{}

Nop is a Provider that does nothing

func NewNop

func NewNop() *Nop

NewNop creates a new Nop Provider

func (*Nop) Shutdown

func (n *Nop) Shutdown(_ context.Context) error

Shutdown shuts down the Provider

func (*Nop) Start

func (n *Nop) Start(_ context.Context) error

Start starts the Provider

type OTLP

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

OTLP is an OTLP metrics provider

func (*OTLP) Shutdown

func (p *OTLP) Shutdown(ctx context.Context) error

Shutdown shuts down the provider

func (*OTLP) Start

func (p *OTLP) Start(ctx context.Context) error

Start just sets the provider as the OTel global meter provider

type Provider

type Provider interface {
	// Start starts the provider
	Start(context.Context) error
	// Shutdown shuts down the provider
	Shutdown(context.Context) error
}

Provider is a metrics provider

func NewOTLP

func NewOTLP(cfg *config.OTLPMetrics, interval time.Duration, resource *resource.Resource) (Provider, error)

NewOTLP returns a new OTLP metrics provider

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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