telemetry

package
v0.0.0-...-077b43f Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2017 License: Apache-2.0 Imports: 3 Imported by: 12

Documentation

Overview

Package telemetry perists github.com/funkygao/go-metrics metrics.Registry to durable storage.

Index

Constants

View Source
const (
	SOSPort        = 9119
	SOSIdentHeader = "X-SOS-From"
)

Variables

This section is empty.

Functions

func Tag

func Tag(appid, topic, ver string) string

TODO replace '.' with '_'

func Untag

func Untag(name string) (appid, topic, ver, realname string)

Untag will extract the tags info from [encoded] metric name: sanitizeName

go-metrics pkg doesn't support tags feature, so we encode the tags into metric name.

func UpdateCounter

func UpdateCounter(appid, topic, ver, name string, n int64,
	mu *sync.RWMutex, m map[string]metrics.Counter)

Types

type Reporter

type Reporter interface {
	Name() string

	Start() error
	Stop()
}

A Reporter continuously scans metrics.Registry and persists all metrics to durable storage.

var Default Reporter

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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