prometheus

package
v2.0.0-rc0 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package prometheus defines a Prometheus metric implementation for a DNS server middleware.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNewCounters = errors.New("failed creating metrics counters")
	ErrNewGauges   = errors.New("failed creating metrics gauges")
)

Functions

This section is empty.

Types

type Metrics

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

func New

func New(settings Settings) (metrics *Metrics, err error)

func (Metrics) AnswersInc

func (c Metrics) AnswersInc(class, qType string)

func (Metrics) InFlightRequestsDec

func (g Metrics) InFlightRequestsDec()

func (Metrics) InFlightRequestsInc

func (g Metrics) InFlightRequestsInc()

func (Metrics) QuestionsInc

func (c Metrics) QuestionsInc(class, qType string)

func (Metrics) RcodeInc

func (c Metrics) RcodeInc(rcode string)

func (Metrics) RequestsInc

func (c Metrics) RequestsInc()

func (Metrics) ResponsesInc

func (c Metrics) ResponsesInc()

type Settings

type Settings struct {
	// Prometheus defines common Prometheus settings.
	Prometheus prom.Settings
}

func (*Settings) SetDefaults

func (s *Settings) SetDefaults()

func (Settings) Validate

func (s Settings) Validate() (err error)

Jump to

Keyboard shortcuts

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