fileexporter

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: 13 Imported by: 0

README

File Exporter

This exporter will write the pipeline data to a JSON file. The data is written in Protobuf JSON encoding (https://developers.google.com/protocol-buffers/docs/proto3#json). Note that there are no compatibility guarantees for this format, since it just a dump of internal structures which can be changed over time. This intended for primarily for debugging Collector without setting up backends.

The following settings are required:

  • path (no default): where to write information.

Example:

exporters:
  file:
    path: ./filename.json

The full list of settings exposed for this exporter are documented here with detailed sample configurations here.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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

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.

Jump to

Keyboard shortcuts

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