metrics

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DatadogCollector

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

DatadogCollector represents a collector that pushes metrics to Datadog

func NewDatadogCollector

func NewDatadogCollector(addr string, defaultTags []string) (*DatadogCollector, error)

NewDatadogCollector returns a DatadogCollector using dogstatsd at addr

func (*DatadogCollector) BuildFailed

func (dc *DatadogCollector) BuildFailed(repo, ref string, userError bool) error

BuildFailed increments the counter for each build that fails

func (*DatadogCollector) BuildStarted

func (dc *DatadogCollector) BuildStarted(repo, ref string) error

BuildStarted increments the counter for each requested build

func (*DatadogCollector) BuildSucceeded

func (dc *DatadogCollector) BuildSucceeded(repo, ref string) error

BuildSucceeded increments the counter for each build that succeeds

func (*DatadogCollector) DiskFree

func (dc *DatadogCollector) DiskFree(bytes uint64) error

DiskFree reports the amount of disk space left on the Docker volume

func (*DatadogCollector) Duration

func (dc *DatadogCollector) Duration(name string, repo string, ref string, tags []string, d float64) error

Duration pushes duration d (seconds) to the metric name to dogstatsd

func (*DatadogCollector) FileNodesFree

func (dc *DatadogCollector) FileNodesFree(nodes uint64) error

FileNodesFree reports the number of file nodes (inodes) left on the Docker volume

func (*DatadogCollector) Float

func (dc *DatadogCollector) Float(name string, repo string, ref string, tags []string, val float64) error

Float pushes val to the metric name to dogstatsd

func (*DatadogCollector) GCBytesReclaimed

func (dc *DatadogCollector) GCBytesReclaimed(size uint64) error

GCBytesReclaimed reports the total bytes reclaimed during a GC run

func (*DatadogCollector) GCFailure

func (dc *DatadogCollector) GCFailure() error

GCFailure reports an occurence of GC failure

func (*DatadogCollector) GCUntaggedImageRemoved

func (dc *DatadogCollector) GCUntaggedImageRemoved() error

GCUntaggedImageRemoved reports a single untagged image removal

func (*DatadogCollector) ImageSize

func (dc *DatadogCollector) ImageSize(sz int64, vsz int64, repo string, ref string) error

ImageSize pushes sz (total size in bytes) and vxz (virtual size in bytes) to dogstatsd

func (*DatadogCollector) KafkaConsumerFailure

func (dc *DatadogCollector) KafkaConsumerFailure() error

KafkaConsumerFailure increments the counter for a Kafka read failure

func (*DatadogCollector) KafkaProducerFailure

func (dc *DatadogCollector) KafkaProducerFailure() error

KafkaProducerFailure increments the counter for a Kafka publish failure

func (*DatadogCollector) Size

func (dc *DatadogCollector) Size(name string, repo string, ref string, tags []string, sz int64) error

Size pushes sz (bytes) to the metric name to dogstatsd

func (*DatadogCollector) TriggerCompleted added in v0.6.0

func (dc *DatadogCollector) TriggerCompleted(repo, ref string, failed bool) error

TriggerCompleted reports the completion of the "trigger" subcommand

type MetricsCollector

type MetricsCollector interface {
	Duration(string, string, string, []string, float64) error
	Size(string, string, string, []string, int64) error
	Float(string, string, string, []string, float64) error
	ImageSize(int64, int64, string, string) error
	BuildStarted(string, string) error
	BuildFailed(string, string, bool) error
	BuildSucceeded(string, string) error
	TriggerCompleted(string, string, bool) error
	KafkaProducerFailure() error
	KafkaConsumerFailure() error
	GCFailure() error
	GCUntaggedImageRemoved() error
	GCBytesReclaimed(uint64) error
	DiskFree(uint64) error
	FileNodesFree(uint64) error
}

MetricsCollector describes an object capabale of pushing metrics somewhere

Jump to

Keyboard shortcuts

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