exporterhelper

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2020 License: Apache-2.0 Imports: 10 Imported by: 211

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLogsExporter

func NewLogsExporter(config configmodels.Exporter, pushLogsData PushLogsData, options ...ExporterOption) (component.LogExporter, error)

NewLogsExporter creates an LogsExporter that can record logs and can wrap every request with a Span. TODO: Add support for retries.

func NewMetricsExporter

func NewMetricsExporter(config configmodels.Exporter, pushMetricsData PushMetricsData, options ...ExporterOption) (component.MetricsExporter, 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 NewMetricsExporterOld

func NewMetricsExporterOld(config configmodels.Exporter, pushMetricsData PushMetricsDataOld, options ...ExporterOption) (component.MetricsExporterOld, error)

NewMetricsExporterOld 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

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 PushLogsData

type PushLogsData func(ctx context.Context, md data.Logs) (droppedTimeSeries int, err error)

PushLogsData is a helper function that is similar to ConsumeLogsData but also returns the number of dropped logs.

type PushMetricsData

type PushMetricsData func(ctx context.Context, md pdata.Metrics) (droppedTimeSeries int, err error)

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

type PushMetricsDataOld

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

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

type Shutdown

type Shutdown func(context.Context) 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