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

package fileexporter

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

Index

type Config

type Config struct {
	configmodels.ExporterSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct.

	// Path of the file to write to. Path is relative to current directory.
	Path string `mapstructure:"path"`
}

Config defines configuration for file exporter.

type Exporter

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

Exporter is the implementation of file exporter that writes telemetry data to a file in Protobuf-JSON format.

func (*Exporter) ConsumeLogs

func (e *Exporter) ConsumeLogs(ctx context.Context, ld data.Logs) error

func (*Exporter) ConsumeMetricsData

func (e *Exporter) ConsumeMetricsData(ctx context.Context, md consumerdata.MetricsData) error

func (*Exporter) ConsumeTraceData

func (e *Exporter) ConsumeTraceData(ctx context.Context, td consumerdata.TraceData) error

func (*Exporter) Shutdown

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

Shutdown stops the exporter and is invoked during shutdown.

func (*Exporter) Start

func (e *Exporter) Start(ctx context.Context, host component.Host) error

type Factory

type Factory struct {
}

Factory is the factory for logging exporter.

func (*Factory) CreateDefaultConfig

func (f *Factory) CreateDefaultConfig() configmodels.Exporter

CreateDefaultConfig creates the default configuration for exporter.

func (*Factory) CreateLogExporter

func (f *Factory) CreateLogExporter(
	ctx context.Context,
	params component.ExporterCreateParams,
	cfg configmodels.Exporter,
) (component.LogExporter, error)

CreateLogExporter creates a log exporter based on this config.

func (*Factory) CreateMetricsExporter

func (f *Factory) CreateMetricsExporter(logger *zap.Logger, config configmodels.Exporter) (component.MetricsExporterOld, error)

CreateMetricsExporter creates a metrics exporter based on this config.

func (*Factory) CreateTraceExporter

func (f *Factory) CreateTraceExporter(logger *zap.Logger, config configmodels.Exporter) (component.TraceExporterOld, error)

CreateTraceExporter creates a trace exporter based on this config.

func (*Factory) Type

func (f *Factory) Type() configmodels.Type

Type gets the type of the Exporter config created by this factory.

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

Jump to identifier

Keyboard shortcuts

? : This menu
f or F : Jump to identifier