README

File Exporter

This exporter will write pipeline data to a JSON file. The data is written in Protobuf JSON encoding using OpenTelemetry protocol.

Please note that there is no guarantee that exact field names will remain stable. This intended for primarily for debugging Collector without setting up backends.

Supported pipeline types: traces, metrics, logs

Getting Started

The following settings are required:

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

Example:

exporters:
  file:
    path: ./filename.json

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() component.ExporterFactory

NewFactory creates a factory for OTLP exporter.

Types

type Config

type Config struct {
	*config.ExporterSettings `mapstructure:"-"`

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

Config defines configuration for file exporter.

func (*Config) Validate

func (cfg *Config) Validate() error

Validate checks if the exporter configuration is valid