Back to godoc.org
go.opentelemetry.io/collector/exporter/loggingexporter

package loggingexporter

v0.4.0
Latest Go to latest
Published: Jun 16, 2020 | License: Apache-2.0 | Module: go.opentelemetry.io/collector

Index

func NewMetricsExporter

func NewMetricsExporter(config configmodels.Exporter, level string, logger *zap.Logger) (component.MetricsExporter, error)

NewMetricsExporter creates an exporter.MetricsExporter that just drops the received data and logs debugging messages.

func NewTraceExporter

func NewTraceExporter(config configmodels.Exporter, level string, logger *zap.Logger) (component.TraceExporter, error)

NewTraceExporter creates an exporter.TraceExporter that just drops the received data and logs debugging messages.

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.

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) CreateMetricsExporter

func (f *Factory) CreateMetricsExporter(_ context.Context, _ component.ExporterCreateParams, config configmodels.Exporter) (component.MetricsExporter, error)

CreateMetricsExporter creates a metrics exporter based on this config.

func (*Factory) CreateTraceExporter

func (f *Factory) CreateTraceExporter(_ context.Context, _ component.ExporterCreateParams, config configmodels.Exporter) (component.TraceExporter, 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.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
f or F : Jump to identifier