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 ServiceNameForNode(node *commonpb.Node) string
- func StatsTagsForBatch(processorName, serviceName, spanFormat string) []tag.Mutator
- type Factory
- type MetricsProcessor
- type Processor
- type TraceProcessor
Constants ¶
This section is empty.
Variables ¶
var (
TagSourceFormatKey, _ = tag.NewKey("format")
TagServiceNameKey, _ = tag.NewKey("service")
TagExporterNameKey, _ = tag.NewKey("exporter")
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 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 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. 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 }
MetricsProcessor composes MetricsConsumer with some additional processor-specific functions.
func NewMetricsFanOutConnector ¶ added in v0.0.2
func NewMetricsFanOutConnector(mcs []consumer.MetricsConsumer) MetricsProcessor
NewMetricsFanOutConnector wraps multiple metrics consumers in a single one.
type TraceProcessor ¶
type TraceProcessor interface { consumer.TraceConsumer }
TraceProcessor composes TraceConsumer with some additional processor-specific functions.
func NewTraceFanOutConnector ¶ added in v0.0.2
func NewTraceFanOutConnector(tcs []consumer.TraceConsumer) TraceProcessor
NewTraceFanOutConnector wraps multiple trace consumers in a single one.
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 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. |
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. |
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. |