README

Logging Exporter

Exports data to the console via zap.Logger.

Supported pipeline types: traces, metrics, logs

Getting Started

The following settings are optional:

  • loglevel (default = info): the log level of the logging export (debug|info|warn|error). When set to debug, pipeline data is verbosely logged.
  • sampling_initial (default = 2): number of messages initially logged each second.
  • sampling_thereafter (default = 500): sampling rate after the initial messages are logged (every Mth message is logged). Refer to Zap docs for more details. on how sampling parameters impact number of messages.

Example:

exporters:
  logging:
    loglevel: debug
    sampling_initial: 5
    sampling_thereafter: 200
Expand ▾ Collapse ▴

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() component.ExporterFactory

    NewFactory creates a factory for Logging exporter

    Types

    type Config

    type Config struct {
    	configmodels.ExporterSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct.
    
    	// LogLevel defines log level of the logging exporter; options are debug, info, warn, error.
    	LogLevel string `mapstructure:"loglevel"`
    
    	// SamplingInitial defines how many samples are initially logged during each second.
    	SamplingInitial int `mapstructure:"sampling_initial"`
    
    	// SamplingThereafter defines the sampling rate after the initial samples are logged.
    	SamplingThereafter int `mapstructure:"sampling_thereafter"`
    }

      Config defines configuration for logging exporter.