Documentation ¶
Overview ¶
Package processor contains interfaces that compose trace/metrics consumers.
Index ¶
- Variables
- func Build(factories ...Factory) (map[string]Factory, error)
- func MetricTagKeys(level telemetry.Level) []tag.Key
- func MetricViews(level telemetry.Level) []*view.View
- func NewMetricsCloningFanOutConnector(mcs []consumer.MetricsConsumer) consumer.MetricsConsumer
- func NewMetricsFanOutConnector(mcs []consumer.MetricsConsumer) consumer.MetricsConsumer
- func NewTraceCloningFanOutConnector(tcs []consumer.TraceConsumer) consumer.TraceConsumer
- func NewTraceFanOutConnector(tcs []consumer.TraceConsumer) consumer.TraceConsumer
- func ServiceNameForNode(node *commonpb.Node) string
- func StatsTagsForBatch(processorName, serviceName, spanFormat string) []tag.Mutator
- type Capabilities
- type DualTypeProcessor
- type Factory
- type MetricsProcessor
- type Processor
- type TraceProcessor
Constants ¶
This section is empty.
Variables ¶
var (
TagSourceFormatKey, _ = tag.NewKey("source_format")
TagServiceNameKey, _ = tag.NewKey("service")
TagProcessorNameKey, _ = tag.NewKey("processor")
StatReceivedSpanCount = stats.Int64(
"spans_received",
"counts the number of spans received",
stats.UnitDimensionless)
StatDroppedSpanCount = stats.Int64(
"spans_dropped",
"counts the number of spans dropped",
stats.UnitDimensionless)
StatBadBatchDroppedSpanCount = stats.Int64(
"bad_batch_spans_dropped",
"counts the number of spans dropped due to being in bad batches",
stats.UnitDimensionless)
)
Keys and stats for telemetry.
Functions ¶
func Build ¶
Build takes a list of processor factories and returns a map of type map[string]Factory with factory type as keys. It returns a non-nil error when more than one factories have the same type.
func MetricTagKeys ¶
MetricTagKeys returns the metric tag keys according to the given telemetry level.
func MetricViews ¶
MetricViews return the metrics views according to given telemetry level.
func NewMetricsCloningFanOutConnector ¶
func NewMetricsCloningFanOutConnector(mcs []consumer.MetricsConsumer) consumer.MetricsConsumer
NewMetricsCloningFanOutConnector wraps multiple metrics consumers in a single one.
func NewMetricsFanOutConnector ¶
func NewMetricsFanOutConnector(mcs []consumer.MetricsConsumer) consumer.MetricsConsumer
NewMetricsFanOutConnector wraps multiple metrics consumers in a single one.
func NewTraceCloningFanOutConnector ¶
func NewTraceCloningFanOutConnector(tcs []consumer.TraceConsumer) consumer.TraceConsumer
NewTraceCloningFanOutConnector wraps multiple trace consumers in a single one.
func NewTraceFanOutConnector ¶
func NewTraceFanOutConnector(tcs []consumer.TraceConsumer) consumer.TraceConsumer
NewTraceFanOutConnector wraps multiple trace consumers in a single one.
func ServiceNameForNode ¶
ServiceNameForNode gets the service name for a specified node. Used for metrics.
func StatsTagsForBatch ¶
StatsTagsForBatch gets the stat tags based on the specified processorName, serviceName, and spanFormat.
Types ¶
type Capabilities ¶
type Capabilities struct { // MutatesConsumedData is set to true if ConsumeTraceData or ConsumeMetricsData // function of the processor modifies the input TraceData or MetricsData argument. // Processors which modify the input data MUST set this flag to true. If the processor // does not modify the data it MUST set this flag to false. If the processor creates // a copy of the data before modifying then this flag can be safely set to false. MutatesConsumedData bool }
Capabilities describes the capabilities of TraceProcessor or MetricsProcessor.
type DualTypeProcessor ¶ added in v0.2.3
type DualTypeProcessor interface { consumer.TraceConsumer consumer.MetricsConsumer Processor }
type Factory ¶
type Factory interface { // Type gets the type of the Processor created by this factory. Type() string // CreateDefaultConfig creates the default configuration for the Processor. // This method can be called multiple times depending on the pipeline // configuration and should not cause side-effects that prevent the creation // of multiple instances of the Processor. // The object returned by this method needs to pass the checks implemented by // 'conifgcheck.ValidateConfig'. It is recommended to have such check in the // tests of any implementation of the Factory interface. CreateDefaultConfig() configmodels.Processor // CreateTraceProcessor creates a trace processor based on this config. // If the processor type does not support tracing or if the config is not valid // error will be returned instead. CreateTraceProcessor(logger *zap.Logger, nextConsumer consumer.TraceConsumer, cfg configmodels.Processor) (TraceProcessor, error) // CreateMetricsProcessor creates a metrics processor based on this config. // If the processor type does not support metrics or if the config is not valid // error will be returned instead. CreateMetricsProcessor(logger *zap.Logger, nextConsumer consumer.MetricsConsumer, cfg configmodels.Processor) (MetricsProcessor, error) }
Factory is factory interface for processors.
type MetricsProcessor ¶
type MetricsProcessor interface { consumer.MetricsConsumer Processor }
MetricsProcessor composes MetricsConsumer with some additional processor-specific functions.
type Processor ¶ added in v0.2.2
type Processor interface { component.Component // GetCapabilities must return the capabilities of the processor. GetCapabilities() Capabilities }
Processor defines the common functions that must be implemented by TraceProcessor and MetricsProcessor.
type TraceProcessor ¶
type TraceProcessor interface { consumer.TraceConsumer Processor }
TraceProcessor composes TraceConsumer with some additional processor-specific functions.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package attributesprocessor contains the logic to modify attributes of a span.
|
Package attributesprocessor contains the logic to modify attributes of a span. |
Package memorylimiter provides a processor for OpenTelemetry Service pipeline that drops data on the pipeline according to the current state of memory usage.
|
Package memorylimiter provides a processor for OpenTelemetry Service pipeline that drops data on the pipeline according to the current state of memory usage. |
Package resourceprocessor implements a processor for specifying resource labels to be added to OpenCensus trace data and metrics data.
|
Package resourceprocessor implements a processor for specifying resource labels to be added to OpenCensus trace data and metrics data. |
samplingprocessor
|
|
tailsamplingprocessor/idbatcher
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. |
tailsamplingprocessor/sampling
Package sampling contains the interfaces and data types used to implement the various sampling policies.
|
Package sampling contains the interfaces and data types used to implement the various sampling policies. |
Package spanprocessor contains logic to modify top level settings of a span, such as its name.
|
Package spanprocessor contains logic to modify top level settings of a span, such as its name. |