wasitelmetric

package
v0.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// DefaultPort is the default HTTP port of the collector.
	DefaultPort uint16 = 4318
	// DefaultHost is the host address the client will attempt
	// connect to if no collector address is provided.
	DefaultHost string = "localhost"
	// DefaultPath is a default URL path for endpoint that receives metrics.
	DefaultPath string = "/v1/metrics"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Exporter

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

func New

func New(opts ...Option) (*Exporter, error)

func (*Exporter) Aggregation

func (e *Exporter) Aggregation(k metric.InstrumentKind) metric.Aggregation

Aggregation returns the Aggregation to use for an instrument kind.

func (*Exporter) Export

func (e *Exporter) Export(ctx context.Context, data *metricdata.ResourceMetrics) error

func (*Exporter) ForceFlush

func (e *Exporter) ForceFlush(ctx context.Context) error

ForceFlush flushes any metric data held by an exporter.

This method returns an error if called after Shutdown. This method returns an error if the method is canceled by the passed context.

This method is safe to call concurrently.

func (*Exporter) MarshalLog

func (e *Exporter) MarshalLog() interface{}

MarshalLog is the marshaling function used by the logging system to represent this Exporter.

func (*Exporter) Shutdown

func (e *Exporter) Shutdown(ctx context.Context) error

Shutdown flushes all metric data held by an exporter and releases any held computational resources.

This method returns an error if called after Shutdown. This method returns an error if the method is canceled by the passed context.

This method is safe to call concurrently.

func (*Exporter) Temporality

Temporality returns the Temporality to use for an instrument kind.

type Option

type Option interface {
	// contains filtered or unexported methods
}

func WithEndpoint

func WithEndpoint(endpoint string) Option

func WithEndpointURL

func WithEndpointURL(eu string) Option

Directories

Path Synopsis
internal
types
Original source: https://github.com/open-telemetry/opentelemetry-proto-go/blob/v1.3.1/slim/otlp/common/v1/common.pb.go
Original source: https://github.com/open-telemetry/opentelemetry-proto-go/blob/v1.3.1/slim/otlp/common/v1/common.pb.go

Jump to

Keyboard shortcuts

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