reporter

package
v1.59.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2024 License: Apache-2.0 Imports: 15 Imported by: 93

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFlags added in v1.9.0

func AddFlags(flags *flag.FlagSet)

AddFlags adds flags for Options.

Types

type ClientMetricsReporter added in v1.17.0

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

ClientMetricsReporter is a decorator that emits data loss metrics on behalf of clients. The clients must send a Process.Tag `client-uuid` with a unique string for each client instance.

func WrapWithClientMetrics added in v1.17.0

func WrapWithClientMetrics(params ClientMetricsReporterParams) *ClientMetricsReporter

WrapWithClientMetrics creates ClientMetricsReporter.

func (*ClientMetricsReporter) Close added in v1.17.0

func (r *ClientMetricsReporter) Close() error

Close stops background gc goroutine for client stats map.

func (*ClientMetricsReporter) EmitBatch added in v1.17.0

func (r *ClientMetricsReporter) EmitBatch(ctx context.Context, batch *jaeger.Batch) error

EmitBatch processes client data loss metrics and delegates to the underlying reporter.

func (*ClientMetricsReporter) EmitZipkinBatch added in v1.17.0

func (r *ClientMetricsReporter) EmitZipkinBatch(ctx context.Context, spans []*zipkincore.Span) error

EmitZipkinBatch delegates to underlying Reporter.

type ClientMetricsReporterParams added in v1.17.0

type ClientMetricsReporterParams struct {
	Reporter        Reporter        // required
	Logger          *zap.Logger     // required
	MetricsFactory  metrics.Factory // required
	ExpireFrequency time.Duration
	ExpireTTL       time.Duration
}

ClientMetricsReporterParams is used as input to WrapWithClientMetrics.

type ConnectMetrics added in v1.22.0

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

ConnectMetrics include connectMetrics necessary params if want to modify metrics of connectMetrics, must via ConnectMetrics API

func NewConnectMetrics added in v1.22.0

func NewConnectMetrics(mf metrics.Factory) *ConnectMetrics

NewConnectMetrics will be initialize ConnectMetrics

func (*ConnectMetrics) OnConnectionStatusChange added in v1.22.0

func (cm *ConnectMetrics) OnConnectionStatusChange(connected bool)

OnConnectionStatusChange used for pass the status parameter when connection is changed 0 is disconnected, 1 is connected For quick view status via use `sum(jaeger_agent_connection_status_collector_connected{}) by (instance) > bool 0`

func (*ConnectMetrics) RecordTarget added in v1.22.0

func (cm *ConnectMetrics) RecordTarget(target string)

RecordTarget writes the current connection target to an expvar field.

type MetricsReporter added in v1.9.0

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

MetricsReporter is reporter with metrics integration.

func WrapWithMetrics added in v1.9.0

func WrapWithMetrics(reporter Reporter, mFactory metrics.Factory) *MetricsReporter

WrapWithMetrics wraps Reporter and creates metrics for its invocations.

func (*MetricsReporter) EmitBatch added in v1.9.0

func (r *MetricsReporter) EmitBatch(ctx context.Context, batch *jaeger.Batch) error

EmitBatch emits batch to collector.

func (*MetricsReporter) EmitZipkinBatch added in v1.9.0

func (r *MetricsReporter) EmitZipkinBatch(ctx context.Context, spans []*zipkincore.Span) error

EmitZipkinBatch emits batch to collector.

type MultiReporter

type MultiReporter []Reporter

MultiReporter provides serial span emission to one or more reporters. If more than one expensive reporter are needed, one or more of them should be wrapped and hidden behind a channel.

func NewMultiReporter

func NewMultiReporter(reps ...Reporter) MultiReporter

NewMultiReporter creates a MultiReporter from the variadic list of passed Reporters.

func (MultiReporter) EmitBatch

func (mr MultiReporter) EmitBatch(ctx context.Context, batch *jaeger.Batch) error

EmitBatch calls each EmitBatch, returning the first error.

func (MultiReporter) EmitZipkinBatch

func (mr MultiReporter) EmitZipkinBatch(ctx context.Context, spans []*zipkincore.Span) error

EmitZipkinBatch calls each EmitZipkinBatch, returning the first error.

type Options added in v1.9.0

type Options struct {
	ReporterType Type
	AgentTags    map[string]string
}

Options holds generic reporter configuration.

func (*Options) InitFromViper added in v1.9.0

func (b *Options) InitFromViper(v *viper.Viper, _ *zap.Logger) *Options

InitFromViper initializes Options with properties retrieved from Viper.

type Reporter

type Reporter interface {
	EmitZipkinBatch(ctx context.Context, spans []*zipkincore.Span) (err error)
	EmitBatch(ctx context.Context, batch *jaeger.Batch) (err error)
}

Reporter handles spans received by Processor and forwards them to central collectors.

type Type added in v1.9.0

type Type string

Type defines type of reporter.

const (

	// GRPC is name of gRPC reporter.
	GRPC Type = "grpc"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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