Documentation ¶
Index ¶
Constants ¶
const ( DefaultMaxQueueSize = 2048 DefaultScheduleDelay = 5000 DefaultExportTimeout = 30000 DefaultMaxExportBatchSize = 512 )
Defaults for BatchSpanProcessorOptions.
Variables ¶
This section is empty.
Functions ¶
func NewBatchLogProcessor ¶
func NewBatchLogProcessor(exporter LogExporter, options ...BatchLogProcessorOption) *batchLogProcessor
NewBatchLogProcessor creates a new SpanProcessor that will send completed span batches to the exporter with the supplied options.
If the exporter is nil, the span processor will perform no action.
Types ¶
type BatchLogProcessorOption ¶
type BatchLogProcessorOption func(o *BatchLogProcessorOptions)
BatchLogProcessorOption configures a BatchSpanProcessor.
func WithBatchTimeout ¶
func WithBatchTimeout(delay time.Duration) BatchLogProcessorOption
WithBatchTimeout returns a BatchSpanProcessorOption that configures the maximum delay allowed for a BatchSpanProcessor before it will export any held span (whether the queue is full or not).
func WithBlocking ¶
func WithBlocking() BatchLogProcessorOption
WithBlocking returns a BatchSpanProcessorOption that configures a BatchSpanProcessor to wait for enqueue operations to succeed instead of dropping data when the queue is full.
func WithExportTimeout ¶
func WithExportTimeout(timeout time.Duration) BatchLogProcessorOption
WithExportTimeout returns a BatchSpanProcessorOption that configures the amount of time a BatchSpanProcessor waits for an exporter to export before abandoning the export.
func WithMaxExportBatchSize ¶
func WithMaxExportBatchSize(size int) BatchLogProcessorOption
WithMaxExportBatchSize returns a BatchSpanProcessorOption that configures the maximum export batch size allowed for a BatchSpanProcessor.
func WithMaxQueueSize ¶
func WithMaxQueueSize(size int) BatchLogProcessorOption
WithMaxQueueSize returns a BatchSpanProcessorOption that configures the maximum queue size allowed for a BatchSpanProcessor.
type BatchLogProcessorOptions ¶
type BatchLogProcessorOptions struct { // MaxQueueSize is the maximum queue size to buffer spans for delayed processing. If the // queue gets full it drops the spans. Use BlockOnQueueFull to change this behavior. // The default value of MaxQueueSize is 2048. MaxQueueSize int // BatchTimeout is the maximum duration for constructing a batch. Processor // forcefully sends available spans when timeout is reached. // The default value of BatchTimeout is 5000 msec. BatchTimeout time.Duration // ExportTimeout specifies the maximum duration for exporting spans. If the timeout // is reached, the export will be cancelled. // The default value of ExportTimeout is 30000 msec. ExportTimeout time.Duration // MaxExportBatchSize is the maximum number of spans to process in a single batch. // If there are more than one batch worth of spans then it processes multiple batches // of spans one batch after the other without any delay. // The default value of MaxExportBatchSize is 512. MaxExportBatchSize int // BlockOnQueueFull blocks onEnd() and onStart() method if the queue is full // AND if BlockOnQueueFull is set to true. // Blocking option should be used carefully as it can severely affect the performance of an // application. BlockOnQueueFull bool }
BatchLogProcessorOptions is configuration settings for a BatchSpanProcessor.
type LogExporter ¶
type LogProcessor ¶
func NewSimpleLogProcessor ¶
func NewSimpleLogProcessor(exporter LogExporter) LogProcessor
type LoggerProvider ¶
type LoggerProvider struct { embedded.LoggerProvider // contains filtered or unexported fields }
func NewLoggerProvider ¶
func NewLoggerProvider(resource *resource.Resource) *LoggerProvider
func (*LoggerProvider) Logger ¶
func (p *LoggerProvider) Logger(name string, opts ...log.LoggerOption) log.Logger
func (*LoggerProvider) RegisterLogProcessor ¶
func (p *LoggerProvider) RegisterLogProcessor(lp LogProcessor)
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
internal/retry
Package retry provides request retry functionality that can perform configurable exponential backoff for transient errors and honor any explicit throttle responses received.
|
Package retry provides request retry functionality that can perform configurable exponential backoff for transient errors and honor any explicit throttle responses received. |