uiconv

package
v1.45.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Extract

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

Extract reads anonymized file, finds spans for a given trace, and writes out that trace in the UI format.

Types

type Config

type Config struct {
	CapturedFile string `yaml:"captured_file"`
	UIFile       string `yaml:"ui_file"`
	TraceID      string `yaml:"trace_id"`
}

Config for the extractor.

type Extractor

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

Extractor reads the spans from reader, filters by traceID, and stores as JSON into uiFile.

func NewExtractor

func NewExtractor(uiFile string, traceID string, reader *Reader, logger *zap.Logger) (*Extractor, error)

NewExtractor creates Extractor.

func (*Extractor) Run

func (e *Extractor) Run() error

Run executes the extraction.

type Reader

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

Reader loads previously captured spans from a file.

func NewReader

func NewReader(capturedFile string, logger *zap.Logger) (*Reader, error)

NewReader creates a Reader.

func (*Reader) NextSpan

func (r *Reader) NextSpan() (*uimodel.Span, error)

NextSpan reads the next span from the capture file, or returns io.EOF.

Jump to

Keyboard shortcuts

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