metrics

package
v0.26.3 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SyncedBlockHeightMtc = prometheus.NewGauge(prometheus.GaugeOpts{
		Name: "synced_block_height",
		Help: "Height of the latest synced block.",
	})
	ProverMtc = prometheus.NewGauge(prometheus.GaugeOpts{
		Name: "prover_total",
		Help: "Total number of provers.",
	})
	NewTaskMtc = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: "new_tasks_total",
			Help: "Total number of new tasks.",
		}, []string{"projectID"})
	AssignedTaskMtc = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: "assigned_tasks_total",
			Help: "Total number of tasks that have been assigned.",
		}, []string{"projectID"})
	FailedAssignedTaskMtc = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: "failed_assigned_tasks_total",
			Help: "Total number of tasks that have failed to be assigned.",
		}, []string{"projectID"})
	TaskDurationMtc = prometheus.NewGaugeVec(prometheus.GaugeOpts{
		Name: "task_duration_seconds",
		Help: "Duration of task execution in seconds.",
	}, []string{"projectID", "projectVersion", "taskID"})
	FailedTaskNumMtc = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: "failed_tasks_total",
			Help: "Total number of tasks that have failed.",
		}, []string{"projectID"})
	SucceedTaskNumMtc = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: "successful_tasks_total",
			Help: "Total number of tasks that have completed successfully.",
		}, []string{"projectID"})
)

Functions

func Init added in v0.20.1

func Init()

func RegisterMetrics added in v0.20.1

func RegisterMetrics(r *gin.Engine)

RegisterMetrics adds prometheus metrics endpoint to gin engine

Types

This section is empty.

Jump to

Keyboard shortcuts

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