spanprocessor

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package spanprocessor contains logic to modify top level settings of a span, such as its name.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTraceProcessor

func NewTraceProcessor(nextConsumer consumer.TraceConsumer, config Config) (processor.TraceProcessor, error)

NewTraceProcessor returns the span processor.

Types

type Config

type Config struct {
	configmodels.ProcessorSettings `mapstructure:",squash"`

	// Rename specifies the components required to re-name a span.
	// The `from_attributes` field needs to be set for this processor to be properly
	// configured.
	// Note: The field name is `Rename` to avoid collision with the Name() method
	// from configmodels.ProcessorSettings.NamedEntity
	Rename Name `mapstructure:"name"`
}

Config is the configuration for the span processor.

type Factory

type Factory struct {
}

Factory is the factory for the Span processor.

func (*Factory) CreateDefaultConfig

func (f *Factory) CreateDefaultConfig() configmodels.Processor

CreateDefaultConfig creates the default configuration for processor.

func (*Factory) CreateMetricsProcessor

func (f *Factory) CreateMetricsProcessor(
	logger *zap.Logger,
	nextConsumer consumer.MetricsConsumer,
	cfg configmodels.Processor) (processor.MetricsProcessor, error)

CreateMetricsProcessor creates a metric processor based on this config.

func (*Factory) CreateTraceProcessor

func (f *Factory) CreateTraceProcessor(
	logger *zap.Logger,
	nextConsumer consumer.TraceConsumer,
	cfg configmodels.Processor) (processor.TraceProcessor, error)

CreateTraceProcessor creates a trace processor based on this config.

func (*Factory) Type

func (f *Factory) Type() string

Type gets the type of the config created by this factory.

type Name

type Name struct {
	// Separator is the string used to separate attributes values in the new
	// span name. If no value is set, no separator is used between attribute
	// values.
	Separator string `mapstructure:"separator"`
	// FromAttributes represents the attribute keys to pull the values from to
	// generate the new span name. All attribute keys are required in the span
	// to re-name a span. If any attribute is missing from the span, no re-name
	// will occur.
	// Note: The new span name is constructed in order of the `from_attributes`
	// specified in the configuration. This field is required and cannot be empty.
	FromAttributes []string `mapstructure:"from_attributes"`
}

Name specifies the attributes to use to re-name a span.

Jump to

Keyboard shortcuts

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