veneur: github.com/stripe/veneur/scopedstatsd Index | Files

package scopedstatsd

import "github.com/stripe/veneur/scopedstatsd"

Index

Package Files

client.go

type Client Uses

type Client interface {
    Gauge(name string, value float64, tags []string, rate float64) error
    Count(name string, value int64, tags []string, rate float64) error
    Incr(name string, tags []string, rate float64) error
    Histogram(name string, value float64, tags []string, rate float64) error
    TimeInMilliseconds(name string, value float64, tags []string, rate float64) error
    Timing(name string, value time.Duration, tags []string, rate float64) error
}

StatsdClient represents the statsd client functions that veneur's SSF sinks call (so as not to write-amplify by reporting its own metrics).

func Ensure Uses

func Ensure(cl Client) Client

Ensure takes a statsd client and wraps it in such a way that it is safe to store in a struct if it should be nil. Otherwise returns the Client unchanged.

type MetricScopes Uses

type MetricScopes struct {
    Gauge     ssf.SSFSample_Scope
    Count     ssf.SSFSample_Scope
    Histogram ssf.SSFSample_Scope
}

MetricScopes holds the scopes that are configured for each metric type.

type ScopedClient Uses

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

func NewClient Uses

func NewClient(inner *statsd.Client, addTags []string, scopes MetricScopes) *ScopedClient

func (*ScopedClient) Count Uses

func (s *ScopedClient) Count(name string, value int64, tags []string, rate float64) error

func (*ScopedClient) Gauge Uses

func (s *ScopedClient) Gauge(name string, value float64, tags []string, rate float64) error

func (*ScopedClient) Histogram Uses

func (s *ScopedClient) Histogram(name string, value float64, tags []string, rate float64) error

func (*ScopedClient) Incr Uses

func (s *ScopedClient) Incr(name string, tags []string, rate float64) error

func (*ScopedClient) TimeInMilliseconds Uses

func (s *ScopedClient) TimeInMilliseconds(name string, value float64, tags []string, rate float64) error

func (*ScopedClient) Timing Uses

func (s *ScopedClient) Timing(name string, value time.Duration, tags []string, rate float64) error

Package scopedstatsd imports 3 packages (graph) and is imported by 1 packages. Updated 2019-05-20. Refresh now. Tools for package owners.