Back to godoc.org
go.opentelemetry.io/collector/exporter/exporterhelper

package exporterhelper

v0.4.0
Latest Go to latest
Published: Jun 16, 2020 | License: Apache-2.0 | Module: go.opentelemetry.io/collector

Index

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.

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.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
f or F : Jump to identifier