reporter

package
v0.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2022 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Overview

Package reporter provides functionality for reporting spans to Wavefront.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCompositeSpanReporter

func NewCompositeSpanReporter(reporters ...tracer.SpanReporter) tracer.SpanReporter

NewCompositeSpanReporter returns a SpanReporter with multiple sub reporters.

func NewConsoleSpanReporter

func NewConsoleSpanReporter(source string) tracer.SpanReporter

NewConsoleSpanReporter returns a ConsoleSpanReporter.

Types

type CompositeSpanReporter

type CompositeSpanReporter struct {
	// contains filtered or unexported fields
}

CompositeSpanReporter reports spans to multiple SpanReporter's.

func (CompositeSpanReporter) Close

func (c CompositeSpanReporter) Close() error

func (CompositeSpanReporter) ReportSpan

func (c CompositeSpanReporter) ReportSpan(span tracer.RawSpan)

ReportSpan complies with the `tracer.SpanReporter` interface.

type ConsoleSpanReporter

type ConsoleSpanReporter struct {
	// contains filtered or unexported fields
}

ConsoleSpanReporter reports spans to STDOUT.

func (*ConsoleSpanReporter) Close

func (r *ConsoleSpanReporter) Close() error

func (*ConsoleSpanReporter) ReportSpan

func (r *ConsoleSpanReporter) ReportSpan(span tracer.RawSpan)

ReportSpan complies with the `tracer.SpanReporter` interface.

type Option

type Option func(*reporter)

Option allow WavefrontSpanReporter customization

func BufferSize

func BufferSize(size int) Option

Buffer size for the in-memory buffer. Incoming spans are dropped if buffer is full. Defaults to 50,000.

func LogPercent

func LogPercent(percent float32) Option

Percent of log messages to be logged by this reporter. Between 0.0 and 1.0. Defaults to 0.1 or 10%.

func RedMetricsCustomTagKeys

func RedMetricsCustomTagKeys(redMetricsCustomTagKeys []string) Option

Custom RED metrics tags

func Source

func Source(source string) Option

Source tag for the spans

type WavefrontSpanReporter

type WavefrontSpanReporter interface {
	tracer.SpanReporter
	Flush()
}

WavefrontSpanReporter implements the wavefront.Reporter interface.

func New

func New(sender senders.Sender, app application.Tags, setters ...Option) WavefrontSpanReporter

New returns a WavefrontSpanReporter for the given `sender`.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL