prometheus

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package prometheus implements a result exporter for prometheus.

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig = Config{
	Path:              "/metrics",
	Gauges:            true,
	Summaries:         true,
	Labels:            []string{"transaction", "application", "environment", "component"},
	SummaryObjectives: map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001},
}

DefaultConfig for prometheus config

Functions

This section is empty.

Types

type Config

type Config struct {
	Path              string              `json:"path" yaml:"path"`
	Labels            []string            `json:"labels" yaml:"labels"`
	Gauges            bool                `json:"gauges" yaml:"gauges"`
	Summaries         bool                `json:"summaries" yaml:"summaries"`
	SummaryObjectives map[float64]float64 `json:"summary_objectives" yaml:"summary_objectives"`
}

Config options

type Emitter

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

Emitter for prometheus

func New

func New(c Config, router *httprouter.Router) (emitter *Emitter, err error)

New creates a new transaction.Result emitter

func (*Emitter) Close

func (e *Emitter) Close()

Close emitter

func (*Emitter) Emit

func (e *Emitter) Emit(result transaction.Result)

Emit results

Jump to

Keyboard shortcuts

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