metrics

package module
v0.0.0-...-4b17603 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2016 License: BSD-3-Clause Imports: 7 Imported by: 0

README

Google Cloud Monitoring

Library to integrate Google Cloud Monitoring with go-metrics.

License

Copyright © Paul Ingles 2016.

BSD license, see LICENSE.

Documentation

Index

Constants

View Source
const (
	Int    = "int64"
	Double = "double"
)

Variables

This section is empty.

Functions

func CreateMetric

func CreateMetric(client *http.Client, project string, m *Metric) error

func DeleteMetric

func DeleteMetric(client *http.Client, project, name string) error

func GoogleCloudMonitoring

func GoogleCloudMonitoring(r metrics.Registry, d time.Duration, client *http.Client, project string)

func IsCustom

func IsCustom(desc *cm.MetricDescriptor) bool

func ListMetrics

func ListMetrics(client *http.Client, project string) ([]*cm.MetricDescriptor, error)

func NameInDomain

func NameInDomain(name string) string

ensures names are prefixed with the cloud monitoring domain. name would normally be hierarchically structured, separated with /.

func WriteTimeseries

func WriteTimeseries(client *http.Client, project string, timeseries []*Timeseries) error

Types

type Metric

type Metric struct {
	Name        string
	Description string
	Labels      map[string]string
	Type        string
}

type Timeseries

type Timeseries struct {
	MetricName  string
	Now         time.Time
	Int64Value  int64
	DoubleValue float64
	Labels      map[string]string
}

Jump to

Keyboard shortcuts

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