metrics

package
v1.9.5 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: MIT Imports: 1 Imported by: 1

Documentation

Index

Constants

View Source
const ContractsSubsystem = "contracts"

Variables

View Source
var NoopContractMetrics = &NoopMetrics{}

Functions

This section is empty.

Types

type ContractMetricer

type ContractMetricer interface {
	StartContractRequest(name string) EndTimer
}

type ContractMetrics

type ContractMetrics struct {
	ContractRequestsTotal          *prometheus.CounterVec
	ContractRequestDurationSeconds *prometheus.HistogramVec
}

func MakeContractMetrics

func MakeContractMetrics(ns string, factory Factory) *ContractMetrics

func (*ContractMetrics) StartContractRequest

func (m *ContractMetrics) StartContractRequest(method string) EndTimer

type EndTimer

type EndTimer func()

type Factory

type Factory interface {
	NewCounterVec(opts prometheus.CounterOpts, labelNames []string) *prometheus.CounterVec
	NewHistogramVec(opts prometheus.HistogramOpts, labelNames []string) *prometheus.HistogramVec
}

type NoopMetrics

type NoopMetrics struct {
}

func (*NoopMetrics) StartContractRequest

func (n *NoopMetrics) StartContractRequest(_ string) EndTimer

Jump to

Keyboard shortcuts

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