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
- Variables
- func MetricViews(level telemetry.Level) []*view.View
- func QueuedProcessorMetricViews(level telemetry.Level) []*view.View
- func WrapWithSpanSink(format string, p SpanProcessor) receiver.TraceReceiverSink
- type MultiProcessorOption
- type Option
- type SpanProcessor
- func NewMultiSpanProcessor(procs []SpanProcessor, options ...MultiProcessorOption) SpanProcessor
- func NewNoopSpanProcessor(logger *zap.Logger) SpanProcessor
- func NewQueuedSpanProcessor(sender SpanProcessor, opts ...Option) SpanProcessor
- func NewTraceExporterProcessor(traceExporters ...exporter.TraceExporter) SpanProcessor
Constants ¶
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 ¶
var Options options
Options is a factory for all available Option's
Functions ¶
func MetricViews ¶ added in v0.1.0
MetricViews return the metrics views according to given telemetry level.
func QueuedProcessorMetricViews ¶ added in v0.1.0
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.