l2met

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2019 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

Package l2met provides a basic log-based metrics provider for cases where a real provider is not available.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

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

Provider provides constructors for creating, tracking, and logging metrics.

func New

func New(l logrus.FieldLogger) *Provider

New returns a metrics provider for constructing and tracing metrics to report.

func (*Provider) NewCardinalityCounter

func (*Provider) NewCardinalityCounter(string) xmetrics.CardinalityCounter

NewCardinalityCounter implements the heroku/x metrics Provider interface. It is not implemented for the log-based provider.

func (*Provider) NewCounter

func (p *Provider) NewCounter(name string) metrics.Counter

NewCounter implements Provider.

func (*Provider) NewGauge

func (p *Provider) NewGauge(name string) metrics.Gauge

NewGauge implements Provider.

func (*Provider) NewHistogram

func (p *Provider) NewHistogram(name string, buckets int) metrics.Histogram

NewHistogram implements Provider.

func (*Provider) Run

func (p *Provider) Run(ctx context.Context) error

Run starts the provider, logging metrics once per minute until the context is canceled.

func (*Provider) Stop

func (p *Provider) Stop()

Stop implements Provider.

Jump to

Keyboard shortcuts

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