metrics

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DistanceFromFinalizedSlot = promauto.NewGauge(
		prometheus.GaugeOpts{
			Namespace: "oracle",
			Name:      "distance_from_finalized_slot",
			Help:      "Distance from the latest finalized slot in slots",
		},
	)

	LatestProcessedSlot = promauto.NewGauge(
		prometheus.GaugeOpts{
			Namespace: "oracle",
			Name:      "latest_processed_slot",
			Help:      "Latest processed slot by the oracle",
		},
	)

	LatestProcessedBlock = promauto.NewGauge(
		prometheus.GaugeOpts{
			Namespace: "oracle",
			Name:      "latest_processed_block",
			Help:      "Latest processed block by the oracle",
		},
	)

	KnownRootAndSlot = promauto.NewGaugeVec(
		prometheus.GaugeOpts{
			Namespace: "oracle",
			Name:      "known_root_and_slot",
			Help:      "Known merkle root and the slot it belongs",
		},
		[]string{
			"slot",
			"merkle_root",
		},
	)

	Version = promauto.NewGaugeVec(
		prometheus.GaugeOpts{
			Namespace: "oracle",
			Name:      "version",
			Help:      "Oracle version",
		},
		[]string{
			"version",
		},
	)

	HttpRequestsTotal = promauto.NewCounterVec(
		prometheus.CounterOpts{
			Namespace: "oracle",
			Name:      "http_requests_total",
			Help:      "How many HTTP requests processed, partitioned by status code, method and HTTP path.",
		},
		[]string{"code", "method", "path"},
	)

	HttpRequestsLatency = promauto.NewHistogramVec(
		prometheus.HistogramOpts{
			Namespace: "oracle",
			Name:      "http_request_duration_seconds",
			Help:      "How long it took to process the request, partitioned by status code, method and HTTP path.",
			Buckets:   []float64{0.3, 1.0, 2.5, 5.0, 10.0},
		},
		[]string{"code", "method", "path"},
	)
)

Functions

func RunMetrics

func RunMetrics(port int)

Types

This section is empty.

Jump to

Keyboard shortcuts

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