loggingexporter

package
v0.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2020 License: Apache-2.0 Imports: 12 Imported by: 36

README

Logging Exporter

Exports traces and/or metrics to the console via zap.Logger. This includes generic information about the package (with info loglevel) or details of the trace (when debug is set)

The following settings can be configured:

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

Example:

exporters:
  logging:
    loglevel: info
    sampling_initial: 5
    sampling_thereafter: 200

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

func NewFactory added in v0.7.0

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.

Jump to

Keyboard shortcuts

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