Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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
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 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) 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) EmitZipkinBatch ¶
func (mr MultiReporter) EmitZipkinBatch(ctx context.Context, spans []*zipkincore.Span) error
EmitZipkinBatch calls each EmitZipkinBatch, returning the first error.