metrics

package
v0.11.7 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LabelSource = "source"
)

Variables

View Source
var (
	PlayerStreamsRunning = promauto.NewGauge(prometheus.GaugeOpts{
		Namespace: nsPlayer,
		Subsystem: "streams",
		Name:      "running",
		Help:      "Number of streams currently playing",
	})
	PlayerRetrieverSpeed = promauto.NewGaugeVec(prometheus.GaugeOpts{
		Namespace: nsPlayer,
		Subsystem: "retriever",
		Name:      "speed_mbps",
		Help:      "Speed of blob/chunk retrieval",
	}, []string{LabelSource})

	PlayerInBytes = promauto.NewCounter(prometheus.CounterOpts{
		Namespace: nsPlayer,
		Name:      "in_bytes",
		Help:      "Total number of bytes downloaded",
	})
	PlayerOutBytes = promauto.NewCounter(prometheus.CounterOpts{
		Namespace: nsPlayer,
		Name:      "out_bytes",
		Help:      "Total number of bytes streamed out",
	})

	PlayerCacheHitCount = promauto.NewCounter(prometheus.CounterOpts{
		Namespace: nsPlayer,
		Subsystem: "cache",
		Name:      "hit_count",
		Help:      "Total number of blobs found in the local cache",
	})
	PlayerCacheMissCount = promauto.NewCounter(prometheus.CounterOpts{
		Namespace: nsPlayer,
		Subsystem: "cache",
		Name:      "miss_count",
		Help:      "Total number of blobs that were not in the local cache",
	})
	PlayerCacheErrorCount = promauto.NewCounter(prometheus.CounterOpts{
		Namespace: nsPlayer,
		Subsystem: "cache",
		Name:      "error_count",
		Help:      "Total number of errors retrieving blobs from the local cache",
	})

	PlayerCacheSize = promauto.NewGauge(prometheus.GaugeOpts{
		Namespace: nsPlayer,
		Subsystem: "cache",
		Name:      "size",
		Help:      "Current size of cache",
	})
	PlayerCacheDroppedCount = promauto.NewGauge(prometheus.GaugeOpts{
		Namespace: nsPlayer,
		Subsystem: "cache",
		Name:      "dropped_count",
		Help:      "Total number of blobs dropped at the admission time",
	})
	PlayerCacheRejectedCount = promauto.NewGauge(prometheus.GaugeOpts{
		Namespace: nsPlayer,
		Subsystem: "cache",
		Name:      "rejected_count",
		Help:      "Total number of blobs rejected at the admission time",
	})

	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", "endpoint"},
	)
	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", "endpoint"},
	)
)

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() *Timer

func (*Timer) Done added in v0.11.0

func (t *Timer) Done() float64

func (*Timer) Observe added in v0.11.2

func (t *Timer) Observe(hist prometheus.Histogram) *Timer

func (*Timer) String added in v0.11.2

func (t *Timer) String() string

Jump to

Keyboard shortcuts

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