metrics

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PlayerStreamsRunning = promauto.NewGauge(prometheus.GaugeOpts{
		Namespace: nsPlayer,
		Subsystem: "streams",
		Name:      "running",
		Help:      "Number of streams currently playing",
	})
	PlayerBlobDownloadDurations = promauto.NewHistogram(prometheus.HistogramOpts{
		Namespace: nsPlayer,
		Subsystem: "blob",
		Name:      "download_seconds",
		Help:      "Blob download durations",
		Buckets:   []float64{0.1, 0.3, 0.6, 1.2},
	})
	PlayerBlobDeliveryDurations = promauto.NewHistogram(prometheus.HistogramOpts{
		Namespace: nsPlayer,
		Subsystem: "blob",
		Name:      "delivery_seconds",
		Help:      "Blob delivery durations",
		Buckets:   []float64{0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0},
	})

	PlayerSuccessesCount = promauto.NewCounter(prometheus.CounterOpts{
		Namespace: nsPlayer,
		Name:      "successes_total",
		Help:      "Total number of successfully loaded blobs",
	})
	PlayerFailuresCount = promauto.NewCounter(prometheus.CounterOpts{
		Namespace: nsPlayer,
		Name:      "failures_total",
		Help:      "Total number of errors getting blobs",
	})

	IAPIAuthSuccessDurations = promauto.NewHistogram(prometheus.HistogramOpts{
		Namespace: nsIAPI,
		Subsystem: "auth",
		Name:      "success_seconds",
		Help:      "Time to successful authentication",
	})
	IAPIAuthFailedDurations = promauto.NewHistogram(prometheus.HistogramOpts{
		Namespace: nsIAPI,
		Subsystem: "auth",
		Name:      "failed_seconds",
		Help:      "Time to failed authentication response",
	})

	ProxyCallDurations = promauto.NewSummaryVec(
		prometheus.SummaryOpts{
			Namespace:  nsProxy,
			Subsystem:  "calls",
			Name:       "total_seconds",
			Help:       "Method call latency distributions",
			Objectives: map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001},
		},
		[]string{"method"},
	)
	ProxyCallFailedDurations = promauto.NewSummaryVec(
		prometheus.SummaryOpts{
			Namespace:  nsProxy,
			Subsystem:  "calls",
			Name:       "failed_seconds",
			Help:       "Failed method call latency distributions",
			Objectives: map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001},
		},
		[]string{"method"},
	)
	ProxyCallHistogram = promauto.NewHistogram(prometheus.HistogramOpts{
		Namespace: nsProxy,
		Subsystem: "calls",
		Name:      "histogram_seconds",
		Help:      "Method calls latency histogram",
		Buckets:   []float64{0.01, 0.05, 0.1, 0.3, 0.6, 1.2, 3.0},
	})
)

Functions

This section is empty.

Types

type Server added in v0.9.1

type Server struct {
	monitor.ModuleLogger

	Address string
	Path    string
}

func NewServer added in v0.9.1

func NewServer(address string, path string) *Server

func (*Server) Serve added in v0.9.1

func (s *Server) Serve()

type Timer added in v0.11.0

type Timer struct {
	Started  time.Time
	Duration float64
	// contains filtered or unexported fields
}

func TimerStart added in v0.11.0

func TimerStart(hist prometheus.Histogram) *Timer

func (*Timer) Done added in v0.11.0

func (t *Timer) Done() float64

Jump to

Keyboard shortcuts

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