metrics

package
v4.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package metrics contains custom prometheus metrics and registry factories.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRegistry

func NewRegistry() *prometheus.Registry

NewRegistry creates new prometheus registry with pre-registered common collectors.

Types

type Generator

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

Generator contains script generation metric collectors.

func NewGenerator

func NewGenerator() Generator

NewGenerator creates new Generator metrics collector.

func (*Generator) IncrementCacheHits

func (g *Generator) IncrementCacheHits()

IncrementCacheHits increments cache hits counter.

func (*Generator) IncrementCacheMisses

func (g *Generator) IncrementCacheMisses()

IncrementCacheMisses increments cache misses counter.

func (*Generator) ObserveGenerationDuration

func (g *Generator) ObserveGenerationDuration(d time.Duration)

ObserveGenerationDuration adds a single observation to the script generation histogram.

func (*Generator) Register

func (g *Generator) Register(reg prometheus.Registerer) error

Register metrics with registerer.

Jump to

Keyboard shortcuts

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