processor

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2019 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package processor is the central point on the collector processing: it aggregates and performs any operation that applies to all traces in the pipeline. Traces reach it after being converted to the OpenCensus protobuf format.

Index

Constants

View Source
const (
	// DefaultNumWorkers is the default number of workers consuming from the processor queue
	DefaultNumWorkers = 10
	// DefaultQueueSize is the default maximum number of span batches allowed in the processor's queue
	DefaultQueueSize = 1000
)

Variables

View Source
var Options options

Options is a factory for all available Option's

Functions

func MetricViews added in v0.1.0

func MetricViews(level telemetry.Level) []*view.View

MetricViews return the metrics views according to given telemetry level.

func QueuedProcessorMetricViews added in v0.1.0

func QueuedProcessorMetricViews(level telemetry.Level) []*view.View

QueuedProcessorMetricViews return the metrics views according to given telemetry level.

func WrapWithSpanSink

func WrapWithSpanSink(format string, p SpanProcessor) receiver.TraceReceiverSink

WrapWithSpanSink wraps a processor to be used as a span sink by receivers.

Types

type MultiProcessorOption added in v0.1.0

type MultiProcessorOption func(*multiSpanProcessor)

MultiProcessorOption represents options that can be applied to a MultiSpanProcessor.

func WithAddAttributes added in v0.1.0

func WithAddAttributes(attributes map[string]interface{}, overwrite bool) MultiProcessorOption

WithAddAttributes returns a MultiProcessorOption that adds the provided attributes to all spans in each ExportTraceServiceRequest.

func WithPreProcessFn added in v0.1.0

func WithPreProcessFn(preProcFn preProcessFn) MultiProcessorOption

WithPreProcessFn returns a MultiProcessorOption that applies some preProcessFn to all ExportTraceServiceRequests.

type Option

type Option func(c *options)

Option is a function that sets some option on the component.

type SpanProcessor

type SpanProcessor interface {
	// ProcessSpans processes spans and return with the number of spans that failed and an error.
	ProcessSpans(batch *agenttracepb.ExportTraceServiceRequest, spanFormat string) (uint64, error)
}

SpanProcessor handles batches of spans converted to OpenCensus proto format.

func NewMultiSpanProcessor

func NewMultiSpanProcessor(procs []SpanProcessor, options ...MultiProcessorOption) SpanProcessor

NewMultiSpanProcessor creates a multiSpanProcessor from the variadic list of passed SpanProcessors and options.

func NewNoopSpanProcessor

func NewNoopSpanProcessor(logger *zap.Logger) SpanProcessor

NewNoopSpanProcessor creates an OC SpanProcessor that just drops the received data.

func NewQueuedSpanProcessor

func NewQueuedSpanProcessor(sender SpanProcessor, opts ...Option) SpanProcessor

NewQueuedSpanProcessor returns a span processor that maintains a bounded in-memory queue of span batches, and sends out span batches using the provided sender

func NewTraceExporterProcessor

func NewTraceExporterProcessor(traceExporters ...exporter.TraceExporter) SpanProcessor

NewTraceExporterProcessor creates processor that feeds SpanData to the given trace exporters.

Directories

Path Synopsis
Package idbatcher defines a pipeline of fixed size in which the elements are batches of ids.
Package idbatcher defines a pipeline of fixed size in which the elements are batches of ids.

Jump to

Keyboard shortcuts

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