metrics

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WANStatsdFlushBytes     = 512
	LANStatsdFlushBytes     = 1432
	GigabitStatsdFlushBytes = 8932
	DefaultScope            = "default"
)

https://github.com/etsy/statsd/blob/master/docs/metric_types.md#multi-metric-packets

Variables

This section is empty.

Functions

func GetImageSizeCluster

func GetImageSizeCluster(imageData []byte) string

GetImageSizeCluster takes in byte array and return the size cluster for tracking purpose

func RegisterHystrixMetrics added in v0.0.4

func RegisterHystrixMetrics(config *config.StatsdCollectorConfig, prefix string) error

Types

type MetricService added in v0.3.0

type MetricService interface {
	TrackDuration(imageProcess string, start time.Time, ImageData []byte)

	CountImageHandlerErrors(kind string)
}

func InitializeStatsdCollector

func InitializeStatsdCollector(config *config.StatsdCollectorConfig) (MetricService, error)

InitializeStatsdCollector will start publishing metrics in the form {config.Prefix}.{updateOption.Scope|default}.{updateOption.Name}

func NewPrometheus added in v0.3.0

func NewPrometheus(reg *prometheus.Registry) MetricService

type MockMetricService added in v0.3.0

type MockMetricService struct {
	mock.Mock
}

func (*MockMetricService) CountImageHandlerErrors added in v0.3.0

func (m *MockMetricService) CountImageHandlerErrors(kind string)

func (*MockMetricService) TrackDuration added in v0.3.0

func (m *MockMetricService) TrackDuration(imageProcess string, start time.Time, ImageData []byte)

type NoOpMetricService added in v0.3.0

type NoOpMetricService struct{}

func (NoOpMetricService) CountImageHandlerErrors added in v0.3.0

func (NoOpMetricService) CountImageHandlerErrors(string)

func (NoOpMetricService) TrackDuration added in v0.3.0

func (NoOpMetricService) TrackDuration(string, time.Time, []byte)

Jump to

Keyboard shortcuts

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