metrics

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ActiveBrowserSessions = promauto.NewGauge(prometheus.GaugeOpts{
		Namespace: metricsNs,
		Subsystem: metricsSubsystem,
		Name:      "active_browser_sessions",
		Help:      "Active browser sessions",
	})

	BrowserSessions = promauto.NewGauge(prometheus.GaugeOpts{
		Namespace: metricsNs,
		Subsystem: metricsSubsystem,
		Name:      "browser_sessions",
		Help:      "Available browser sessions",
	})

	PagesTotal = promauto.NewCounter(prometheus.CounterOpts{
		Namespace: metricsNs,
		Subsystem: metricsSubsystem,
		Name:      "pages_total",
		Help:      "Total pages processed",
	})

	PagesFailedTotal = promauto.NewCounterVec(prometheus.CounterOpts{
		Namespace: metricsNs,
		Subsystem: metricsSubsystem,
		Name:      "pages_failed_total",
		Help:      "Total pages failed processing",
	},
		[]string{"code"},
	)

	PageFetchSeconds = promauto.NewHistogram(prometheus.HistogramOpts{
		Namespace: metricsNs,
		Subsystem: metricsSubsystem,
		Name:      "pages_fetch_seconds",
		Help:      "Time for fetching a complete page in seconds",
		Buckets:   []float64{.005, .01, .025, .05, .075, .1, .25, .5, .75, 1, 2.5, 5, 7.5, 10, 20, 30, 40, 50, 60, 120, 180, 240},
	})
)

Functions

This section is empty.

Types

type Server

type Server struct {
	*http.Server
}

Server is the Prometheus metrics endpoint for the Browser Controller

func NewServer

func NewServer(listenInterface string, listenPort int, path string) *Server

NewServer returns a new instance of Server listening on the given port

func (*Server) Close

func (a *Server) Close() error

func (*Server) Start

func (a *Server) Start() error

Jump to

Keyboard shortcuts

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