writer

package
v0.0.0-...-e57142c Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2019 License: BSD-3-Clause Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ServiceWriter

type ServiceWriter struct {
	InServices <-chan pb.ServicesMetadata
	// contains filtered or unexported fields
}

ServiceWriter ingests service metadata and flush them to the API.

func NewServiceWriter

func NewServiceWriter(conf *config.AgentConfig, InServices <-chan pb.ServicesMetadata) *ServiceWriter

NewServiceWriter returns a new writer for services.

func (*ServiceWriter) Run

func (w *ServiceWriter) Run()

Run runs the main loop of the writer goroutine. If buffers services read from input chan and flushes them when necessary.

func (*ServiceWriter) Start

func (w *ServiceWriter) Start()

Start starts the writer.

func (*ServiceWriter) Stop

func (w *ServiceWriter) Stop()

Stop stops the main Run loop.

type StatsWriter

type StatsWriter struct {

	// InStats is the stream of stat buckets to send out.
	InStats <-chan []agent.StatsBucket
	// contains filtered or unexported fields
}

StatsWriter ingests stats buckets and flushes them to the API.

func NewStatsWriter

func NewStatsWriter(conf *config.AgentConfig, InStats <-chan []agent.StatsBucket) *StatsWriter

NewStatsWriter returns a new writer for stats.

func (*StatsWriter) Run

func (w *StatsWriter) Run()

Run runs the event loop of the writer's main goroutine. It reads stat buckets from InStats, builds stat payloads and sends them out using the base writer.

func (*StatsWriter) Start

func (w *StatsWriter) Start()

Start starts the writer, awaiting stat buckets and flushing them.

func (*StatsWriter) Stop

func (w *StatsWriter) Stop()

Stop stops the writer

type TracePackage

type TracePackage struct {
	// Trace will contain a trace if it was sampled or be empty if it wasn't.
	Trace pb.Trace
	// Events contains all APMEvents extracted from a trace. If no events were extracted, it will be empty.
	Events []*pb.Span
}

TracePackage represents the result of a trace sampling operation.

NOTE: A TracePackage can be valid even if any of its fields is nil/empty. In particular, a common case is that of empty Trace but non-empty Events. This happens when events are extracted from a trace that wasn't sampled.

func (*TracePackage) Empty

func (s *TracePackage) Empty() bool

Empty returns true if this TracePackage has no data.

type TraceWriter

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

TraceWriter ingests sampled traces and flushes them to the API.

func NewTraceWriter

func NewTraceWriter(conf *config.AgentConfig, in <-chan *TracePackage) *TraceWriter

NewTraceWriter returns a new writer for traces.

func (*TraceWriter) Run

func (w *TraceWriter) Run()

Run runs the main loop of the writer goroutine. It sends traces to the payload constructor, flushing it periodically and collects stats which are also reported periodically.

func (*TraceWriter) Start

func (w *TraceWriter) Start()

Start starts the writer.

func (*TraceWriter) Stop

func (w *TraceWriter) Stop()

Stop stops the main Run loop.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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