ingestion

package
v0.37.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsIngestionError

func IsIngestionError(err error) bool

Types

type Error

type Error struct{ Err error }

func (Error) Error

func (e Error) Error() string

func (Error) Unwrap

func (e Error) Unwrap() error

type Format

type Format string
const (
	FormatPprof      Format = "pprof"
	FormatJFR        Format = "jfr"
	FormatTrie       Format = "trie"
	FormatTree       Format = "tree"
	FormatLines      Format = "lines"
	FormatGroups     Format = "groups"
	FormatSpeedscope Format = "speedscope"
)

type IngestInput

type IngestInput struct {
	Format   Format
	Profile  RawProfile
	Metadata Metadata
}

type Ingester

type Ingester interface {
	Ingest(context.Context, *IngestInput) error
}

type Metadata

type Metadata struct {
	StartTime       time.Time
	EndTime         time.Time
	Key             *segment.Key
	SpyName         string
	SampleRate      uint32
	Units           metadata.Units
	AggregationType metadata.AggregationType
}

type NoopIngester added in v0.22.1

type NoopIngester struct{}

func NewNoopIngester added in v0.22.1

func NewNoopIngester() *NoopIngester

func (*NoopIngester) Ingest added in v0.22.1

func (*NoopIngester) Ingest(_ context.Context, _ *IngestInput) error

type Parallelizer

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

func NewParallelizer

func NewParallelizer(log *logrus.Logger, ingesters ...Ingester) *Parallelizer

func (*Parallelizer) Ingest

func (p *Parallelizer) Ingest(ctx context.Context, in *IngestInput) error

type RawProfile

type RawProfile interface {
	Parse(context.Context, storage.Putter, storage.MetricsExporter, Metadata) error
	Bytes() ([]byte, error)
	// ContentType denotes Bytes output type. Must be only called after Bytes.
	ContentType() string
}

Jump to

Keyboard shortcuts

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