metrics

package
v0.0.0-...-2ad163a Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	// StartSpanWithContext will generate an opentracing span within the given context
	StartSpanWithContext(ctx context.Context, name string) (opentracing.Span, context.Context)

	// BackgroundRate records a count metric for background session and task
	BackgroundRate(backgroundSessionID, taskName string, params map[string]string, value int64)

	// BackgroundDuration records a duration metric for how long a background session took to accomplish a task
	BackgroundDuration(backgroundSessionID, taskName string, params map[string]string, value time.Duration)

	// BackgroundError records an error & count metric for a background session and task
	BackgroundError(backgroundSessionID, taskName string, params map[string]string, code, message string, value int64)
}

Client is a metric client that can record metrics and create opentracing style spans to capture metric data Note that this is mostly implemented to fit the private interface that github.com/promoboxx/go-session-lock uses for metrics. This version will be used by the HqOapp fork of the same repository.

Jump to

Keyboard shortcuts

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