loggingexporter

package module
v0.110.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: Apache-2.0 Imports: 9 Imported by: 35

README

Logging Exporter

Status
Stability deprecated: traces, metrics, logs
Distributions core, contrib
Issues Open issues Closed issues

This exporter is being deprecated in favour of the debug exporter. It will be removed in September 2024.

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.
    • Note: This option has been deprecated in favor of verbosity
  • verbosity (default = normal): the verbosity of the logging export (detailed|normal|basic). When set to detailed, 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.
Note

loglevel is deprecated, use verbosity instead.

Example:

exporters:
  logging:
    verbosity: detailed
    sampling_initial: 5
    sampling_thereafter: 200

Documentation

Overview

Package loggingexporter exports data to console as logs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() exporter.Factory

NewFactory creates a factory for Logging exporter

Types

type Config

type Config struct {
	// LogLevel defines log level of the logging exporter; options are debug, info, warn, error.
	// Deprecated: Use `Verbosity` instead.
	LogLevel zapcore.Level `mapstructure:"loglevel,omitempty"`

	// Verbosity defines the logging exporter verbosity.
	Verbosity configtelemetry.Level `mapstructure:"verbosity,omitempty"`

	// 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"`
	// contains filtered or unexported fields
}

Config defines configuration for logging exporter.

func (*Config) Unmarshal

func (cfg *Config) Unmarshal(conf *confmap.Conf) error

func (*Config) Validate

func (cfg *Config) Validate() error

Validate checks if the exporter configuration is valid

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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