writer

package
v1.61.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrMaxSpansCountReached = errors.New("max spans count reached")

Functions

This section is empty.

Types

type Config

type Config struct {
	MaxSpansCount  int                `yaml:"max_spans_count" name:"max_spans_count"`
	CapturedFile   string             `yaml:"captured_file" name:"captured_file"`
	AnonymizedFile string             `yaml:"anonymized_file" name:"anonymized_file"`
	MappingFile    string             `yaml:"mapping_file" name:"mapping_file"`
	AnonymizerOpts anonymizer.Options `yaml:"anonymizer" name:"anonymizer"`
}

Config contains parameters to NewWriter.

type Writer

type Writer struct {
	// contains filtered or unexported fields
}

Writer is a span Writer that obfuscates the span and writes it to a JSON file.

func New

func New(config Config, logger *zap.Logger) (*Writer, error)

New creates an Writer

func (*Writer) Close added in v1.21.0

func (w *Writer) Close()

Close closes the captured and anonymized files.

func (*Writer) WriteSpan

func (w *Writer) WriteSpan(msg *model.Span) error

WriteSpan anonymized the span and appends it as JSON to w.file.

Jump to

Keyboard shortcuts

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