prometheus

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const Name = "prometheus"

Variables

This section is empty.

Functions

func New

func New(tree config.Tree) (stats.Stats, error)

Types

type Client

type Client struct {
	Config Config
	Meta   map[string]string
	// contains filtered or unexported fields
}

func (*Client) Count

func (c *Client) Count(key string, n interface{}, tags ...map[string]string)

func (*Client) Dec

func (c *Client) Dec(key string, tags ...map[string]string)

func (*Client) Gauge

func (c *Client) Gauge(key string, n interface{}, tags ...map[string]string)

func (*Client) Histogram

func (c *Client) Histogram(key string, n interface{}, tags ...map[string]string)

func (*Client) Inc

func (c *Client) Inc(key string, tags ...map[string]string)

func (*Client) Log

func (c *Client) Log(l log.Logger) stats.Stats

func (*Client) Start

func (c *Client) Start()

func (*Client) Stop

func (c *Client) Stop()

func (*Client) Timing

func (c *Client) Timing(key string, t time.Duration, tags ...map[string]string)

func (*Client) With

func (c *Client) With(meta map[string]string) stats.Stats

type Config

type Config struct {
	Namespace string            `toml:"namespace"`
	Addr      string            `toml:"addr"`
	Port      string            `toml:"port"`
	Tags      map[string]string `toml:"tags"`
}

Jump to

Keyboard shortcuts

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