metrics

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2018 License: Apache-2.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ReadMetricsDecorator

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

ReadMetricsDecorator wraps a spanstore.Reader and collects metrics around each read operation.

func NewReadMetricsDecorator

func NewReadMetricsDecorator(spanReader spanstore.Reader, metricsFactory metrics.Factory) *ReadMetricsDecorator

NewReadMetricsDecorator returns a new ReadMetricsDecorator.

func (*ReadMetricsDecorator) FindTraces

func (m *ReadMetricsDecorator) FindTraces(traceQuery *spanstore.TraceQueryParameters) ([]*model.Trace, error)

FindTraces implements spanstore.Reader#FindTraces

func (*ReadMetricsDecorator) GetOperations

func (m *ReadMetricsDecorator) GetOperations(service string) ([]string, error)

GetOperations implements spanstore.Reader#GetOperations

func (*ReadMetricsDecorator) GetServices

func (m *ReadMetricsDecorator) GetServices() ([]string, error)

GetServices implements spanstore.Reader#GetServices

func (*ReadMetricsDecorator) GetTrace

func (m *ReadMetricsDecorator) GetTrace(traceID model.TraceID) (*model.Trace, error)

GetTrace implements spanstore.Reader#GetTrace

type WriteMetrics added in v0.5.2

type WriteMetrics struct {
	Attempts   metrics.Counter `metric:"attempts"`
	Inserts    metrics.Counter `metric:"inserts"`
	Errors     metrics.Counter `metric:"errors"`
	LatencyOk  metrics.Timer   `metric:"latency-ok"`
	LatencyErr metrics.Timer   `metric:"latency-err"`
}

WriteMetrics is a collection of metrics for write operations.

func NewWriteMetrics added in v0.5.2

func NewWriteMetrics(factory metrics.Factory, tableName string) *WriteMetrics

NewWriteMetrics takes a metrics scope and creates a metrics struct

func (*WriteMetrics) Emit added in v0.5.2

func (t *WriteMetrics) Emit(err error, latency time.Duration)

Emit will record success or failure counts and latency metrics depending on the passed error.

Jump to

Keyboard shortcuts

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