backend

package
v5.9.8 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend interface {
	Collect(r *collector.Result) error
}

Backend is a receiver of metrics

type Closer

type Closer interface {
	Close() error
}

Closer is an interface for backends that need to dispose of resources

type CloudWatchBackend

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

CloudWatchBackend sends metrics to AWS CloudWatch

func NewCloudWatchBackend

func NewCloudWatchBackend(region string, dimensions []CloudWatchDimension, interval int64, enableHighResolution bool) *CloudWatchBackend

NewCloudWatchBackend returns a new CloudWatchBackend with optional dimensions

func (*CloudWatchBackend) Collect

func (cb *CloudWatchBackend) Collect(r *collector.Result) error

type CloudWatchDimension

type CloudWatchDimension struct {
	Key   string
	Value string
}

CloudWatchDimension is a dimension to add to metrics

func ParseCloudWatchDimensions

func ParseCloudWatchDimensions(ds string) ([]CloudWatchDimension, error)

type NewRelicBackend

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

NewRelicBackend sends metrics to New Relic Insights

func NewNewRelicBackend

func NewNewRelicBackend(appName string, licenseKey string) (*NewRelicBackend, error)

NewNewRelicBackend returns a backend for New Relic Where appName is your desired application name in New Relic

and licenseKey is your New Relic license key

func (*NewRelicBackend) Close

func (nr *NewRelicBackend) Close() error

Close by shutting down NR client

func (*NewRelicBackend) Collect

func (nr *NewRelicBackend) Collect(r *collector.Result) error

Collect metrics

type Prometheus

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

Prometheus this holds a list of prometheus gauges which have been created, one for each metric that we want to expose. These are created on the fly as we receive metrics from the agent.

Note: these metrics are not unique to a cluster / queue, as these labels are added to the value when it is set.

func NewPrometheusBackend

func NewPrometheusBackend() *Prometheus

func (*Prometheus) Collect

func (p *Prometheus) Collect(r *collector.Result) error

Collect receives a set of metrics from the agent and creates or updates the prometheus gauges

Note: This is called once per agent token per interval

func (*Prometheus) Serve

func (p *Prometheus) Serve(path, addr string)

Serve runs a Prometheus metrics HTTP server.

type StackDriverBackend

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

StackDriverBackend sends metrics to GCP Stackdriver

func NewStackDriverBackend

func NewStackDriverBackend(gcpProjectID string) (*StackDriverBackend, error)

NewStackDriverBackend returns a new StackDriverBackend for the specified project

func (*StackDriverBackend) Collect

func (sd *StackDriverBackend) Collect(r *collector.Result) error

Collect metrics

type StatsD

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

StatsD sends metrics to StatsD (Datadog spec)

func NewStatsDBackend

func NewStatsDBackend(host string, tagsSupported bool) (*StatsD, error)

func (*StatsD) Collect

func (cb *StatsD) Collect(r *collector.Result) error

Jump to

Keyboard shortcuts

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