writer

package
v1.46.0-tgt.2 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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

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