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 ¶
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
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)
Click to show internal directories.
Click to hide internal directories.