Documentation ¶
Index ¶
- Constants
- Variables
- func AddFlags(flags *flag.FlagSet)
- func NewSpanProcessor(spanWriter spanstore.Writer, additional []ProcessSpan, opts ...Option) processor.SpanProcessor
- type Collector
- type CollectorOptions
- type CollectorParams
- type FilterSpan
- type Option
- type ProcessSpan
- type ProcessSpans
- type SpanCounts
- type SpanCountsByFormat
- type SpanCountsByTransport
- type SpanHandlerBuilder
- type SpanHandlers
- type SpanProcessorMetrics
Constants ¶
const ( // DefaultNumWorkers is the default number of workers consuming from the processor queue DefaultNumWorkers = 50 // DefaultQueueSize is the size of the processor's queue DefaultQueueSize = 2000 // DefaultGRPCMaxReceiveMessageLength is the default max receivable message size for the gRPC Collector DefaultGRPCMaxReceiveMessageLength = 4 * 1024 * 1024 )
Variables ¶
var Options options
Options is a factory for all available Option's
Functions ¶
func NewSpanProcessor ¶
func NewSpanProcessor( spanWriter spanstore.Writer, additional []ProcessSpan, opts ...Option, ) processor.SpanProcessor
NewSpanProcessor returns a SpanProcessor that preProcesses, filters, queues, sanitizes, and processes spans
Types ¶
type Collector ¶ added in v1.17.0
type Collector struct {
// contains filtered or unexported fields
}
Collector returns the collector as a manageable unit of work
func New ¶ added in v1.17.0
func New(params *CollectorParams) *Collector
New constructs a new collector component, ready to be started
func (*Collector) SpanHandlers ¶ added in v1.18.0
func (c *Collector) SpanHandlers() *SpanHandlers
SpanHandlers returns span handlers used by the Collector.
func (*Collector) Start ¶ added in v1.17.0
func (c *Collector) Start(builderOpts *CollectorOptions) error
Start the component and underlying dependencies
type CollectorOptions ¶ added in v1.17.0
type CollectorOptions struct { // DynQueueSizeMemory determines how much memory to use for the queue DynQueueSizeMemory uint // QueueSize is the size of collector's queue QueueSize int // NumWorkers is the number of internal workers in a collector NumWorkers int // CollectorHTTPHostPort is the host:port address that the collector service listens in on for http requests CollectorHTTPHostPort string // CollectorGRPCHostPort is the host:port address that the collector service listens in on for gRPC requests CollectorGRPCHostPort string // TLSGRPC configures secure transport for gRPC endpoint to collect spans TLSGRPC tlscfg.Options // TLSHTTP configures secure transport for HTTP endpoint to collect spans TLSHTTP tlscfg.Options // CollectorTags is the string representing collector tags to append to each and every span CollectorTags map[string]string // CollectorZipkinHTTPHostPort is the host:port address that the Zipkin collector service listens in on for http requests CollectorZipkinHTTPHostPort string // CollectorZipkinAllowedOrigins is a list of origins a cross-domain request to the Zipkin collector service can be executed from CollectorZipkinAllowedOrigins string // CollectorZipkinAllowedHeaders is a list of headers that the Zipkin collector service allowes the client to use with cross-domain requests CollectorZipkinAllowedHeaders string // CollectorGRPCMaxReceiveMessageLength is the maximum message size receivable by the gRPC Collector. CollectorGRPCMaxReceiveMessageLength int }
CollectorOptions holds configuration for collector
func (*CollectorOptions) InitFromViper ¶ added in v1.17.0
func (cOpts *CollectorOptions) InitFromViper(v *viper.Viper) *CollectorOptions
InitFromViper initializes CollectorOptions with properties from viper
type CollectorParams ¶ added in v1.17.0
type CollectorParams struct { ServiceName string Logger *zap.Logger MetricsFactory metrics.Factory SpanWriter spanstore.Writer StrategyStore strategystore.StrategyStore Aggregator strategystore.Aggregator HealthCheck *healthcheck.HealthCheck }
CollectorParams to construct a new Jaeger Collector.
type FilterSpan ¶
FilterSpan decides whether to allow or disallow a span
type Option ¶
type Option func(c *options)
Option is a function that sets some option on StorageBuilder.
type ProcessSpan ¶
ProcessSpan processes a Domain Model Span
func ChainedProcessSpan ¶
func ChainedProcessSpan(spanProcessors ...ProcessSpan) ProcessSpan
ChainedProcessSpan chains spanProcessors as a single ProcessSpan call
type ProcessSpans ¶
ProcessSpans processes a batch of Domain Model Spans
type SpanCounts ¶ added in v1.12.0
type SpanCounts struct { // ReceivedBySvc maintain by-service metrics. ReceivedBySvc metricsBySvc // RejectedBySvc is the number of spans we rejected (usually due to blacklisting) by-service. RejectedBySvc metricsBySvc }
SpanCounts contains counts for received and rejected spans.
type SpanCountsByFormat ¶ added in v1.12.0
type SpanCountsByFormat map[processor.SpanFormat]SpanCountsByTransport
SpanCountsByFormat groups metrics by different span formats (thrift, proto, etc.)
type SpanCountsByTransport ¶ added in v1.12.0
type SpanCountsByTransport map[processor.InboundTransport]SpanCounts
SpanCountsByTransport groups metrics by inbound transport (e.g http, grpc, tchannel)
type SpanHandlerBuilder ¶ added in v1.17.0
type SpanHandlerBuilder struct { SpanWriter spanstore.Writer CollectorOpts CollectorOptions Logger *zap.Logger MetricsFactory metrics.Factory }
SpanHandlerBuilder holds configuration required for handlers
func (*SpanHandlerBuilder) BuildHandlers ¶ added in v1.17.0
func (b *SpanHandlerBuilder) BuildHandlers(spanProcessor processor.SpanProcessor) *SpanHandlers
BuildHandlers builds span handlers (Zipkin, Jaeger)
func (*SpanHandlerBuilder) BuildSpanProcessor ¶ added in v1.17.1
func (b *SpanHandlerBuilder) BuildSpanProcessor(additional ...ProcessSpan) processor.SpanProcessor
BuildSpanProcessor builds the span processor to be used with the handlers
type SpanHandlers ¶ added in v1.17.1
type SpanHandlers struct { ZipkinSpansHandler handler.ZipkinSpansHandler JaegerBatchesHandler handler.JaegerBatchesHandler GRPCHandler *handler.GRPCHandler }
SpanHandlers holds instances to the span handlers built by the SpanHandlerBuilder
type SpanProcessorMetrics ¶
type SpanProcessorMetrics struct { //TODO - initialize metrics in the traditional factory way. Initialize map afterward. // SaveLatency measures how long the actual save to storage takes SaveLatency metrics.Timer // InQueueLatency measures how long the span spends in the queue InQueueLatency metrics.Timer // SpansDropped measures the number of spans we discarded because the queue was full SpansDropped metrics.Counter // SpansBytes records how many bytes were processed SpansBytes metrics.Gauge // BatchSize measures the span batch size BatchSize metrics.Gauge // size of span batch // QueueCapacity measures the capacity of the internal span queue QueueCapacity metrics.Gauge // QueueLength measures the current number of elements in the internal span queue QueueLength metrics.Gauge // SavedOkBySvc contains span and trace counts by service SavedOkBySvc metricsBySvc // spans actually saved SavedErrBySvc metricsBySvc // spans failed to save // contains filtered or unexported fields }
SpanProcessorMetrics contains all the necessary metrics for the SpanProcessor
func NewSpanProcessorMetrics ¶
func NewSpanProcessorMetrics(serviceMetrics metrics.Factory, hostMetrics metrics.Factory, otherFormatTypes []processor.SpanFormat) *SpanProcessorMetrics
NewSpanProcessorMetrics returns a SpanProcessorMetrics
func (*SpanProcessorMetrics) GetCountsForFormat ¶
func (m *SpanProcessorMetrics) GetCountsForFormat(spanFormat processor.SpanFormat, transport processor.InboundTransport) SpanCounts
GetCountsForFormat gets the SpanCounts for a given format and transport. If none exists, we use the Unknown format.