telemetry

package
v1.0.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CanonicalizationsTotal = prometheus.NewCounter(prometheus.CounterOpts{
		Namespace: metricsNs,
		Subsystem: metricsSubsystem,
		Name:      "canonicalizations_total",
		Help:      "Total URIs canonicalized",
	})

	ScopechecksTotal = prometheus.NewCounter(prometheus.CounterOpts{
		Namespace: metricsNs,
		Subsystem: metricsSubsystem,
		Name:      "scopechecks_total",
		Help:      "Total URIs checked for scope inclusion",
	})

	ScopecheckResponseTotal = prometheus.NewCounterVec(prometheus.CounterOpts{
		Namespace: metricsNs,
		Subsystem: metricsSubsystem,
		Name:      "scopecheck_response_total",
		Help:      "Total scopecheck responses for each response code",
	},
		[]string{"code"},
	)

	CompileScriptSeconds = prometheus.NewHistogram(prometheus.HistogramOpts{
		Namespace: metricsNs,
		Subsystem: metricsSubsystem,
		Name:      "script_compile_seconds",
		Help:      "Time for compiling a script 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},
	})

	ExecuteScriptSeconds = prometheus.NewHistogram(prometheus.HistogramOpts{
		Namespace: metricsNs,
		Subsystem: metricsSubsystem,
		Name:      "script_execute_seconds",
		Help:      "Time for executing a script 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

func InitTracer

func InitTracer(service string) (opentracing.Tracer, io.Closer)

Init returns an instance of Jaeger Tracer that samples 100% of traces and logs all spans to stdout.

Types

type MetricsServer

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

MetricsServer is the Prometheus metrics endpoint for the Browser Controller

func NewMetricsServer

func NewMetricsServer(listenInterface string, listenPort int, path string) *MetricsServer

NewMetricsServer returns a new instance of MetricsServer listening on the given port

func (*MetricsServer) Close

func (a *MetricsServer) Close()

func (*MetricsServer) Start

func (a *MetricsServer) Start() error

Jump to

Keyboard shortcuts

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