exporterhelper

package
v0.2.9 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMetricsExporter

func NewMetricsExporter(config configmodels.Exporter, pushMetricsData PushMetricsData, options ...ExporterOption) (component.MetricsExporterOld, error)

NewMetricsExporter creates an MetricsExporter that can record metrics and can wrap every request with a Span. If no options are passed it just adds the exporter format as a tag in the Context. TODO: Add support for retries.

func NewTraceExporter

func NewTraceExporter(
	config configmodels.Exporter,
	dataPusher traceDataPusher,
	options ...ExporterOption,
) (component.TraceExporter, error)

NewTraceExporter creates a TraceExporter that can record metrics and can wrap every request with a Span.

func NewTraceExporterOld added in v0.2.9

func NewTraceExporterOld(
	config configmodels.Exporter,
	dataPusher traceDataPusherOld,
	options ...ExporterOption,
) (component.TraceExporterOld, error)

NewTraceExporterOld creates an TraceExporterOld that can record metrics and can wrap every request with a Span. If no options are passed it just adds the exporter format as a tag in the Context.

func NumTimeSeries

func NumTimeSeries(md consumerdata.MetricsData) int

NumTimeSeries returns the number of timeseries in a MetricsData.

Types

type ExporterOption

type ExporterOption func(*ExporterOptions)

ExporterOption apply changes to ExporterOptions.

func WithShutdown

func WithShutdown(shutdown Shutdown) ExporterOption

WithShutdown overrides the default Shutdown function for an exporter. The default shutdown function does nothing and always returns nil.

type ExporterOptions

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

ExporterOptions contains options concerning how an Exporter is configured.

type PushMetricsData

type PushMetricsData func(ctx context.Context, td consumerdata.MetricsData) (droppedTimeSeries int, err error)

PushMetricsData is a helper function that is similar to ConsumeMetricsData but also returns the number of dropped metrics.

type Shutdown

type Shutdown func() error

Shutdown specifies the function invoked when the exporter is being shutdown.

Jump to

Keyboard shortcuts

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