metrics

package
v0.0.0-...-26505bb Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: AGPL-3.0 Imports: 6 Imported by: 3

Documentation

Index

Constants

View Source
const (
	// WorkerExecResultSuccess for success result label
	WorkerExecResultSuccess = "success"
	// WorkerExecResultErrored for errored result label
	WorkerExecResultErrored = "errored"
)

Variables

View Source
var HTTPTotalDurations = prometheus.NewSummaryVec(
	prometheus.SummaryOpts{
		Namespace: "http",
		Subsystem: "all",
		Name:      "total_duration",

		Help: "Durations of http requests, labelled by method and status code",

		Objectives: map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001},
	},
	[]string{"method", "code"},
)

HTTPTotalDurations is a summary metric of the durations of http requests, labelled by method and status code

View Source
var WorkerExecCounter = prometheus.NewCounterVec(
	prometheus.CounterOpts{
		Namespace: "workers",
		Subsystem: "exec",
		Name:      "count",

		Help: `Number of total executions, without counting retries, of the workers labelled by
worker type and result. This should be equivalent to the number of jobs consumed
from the queue.`,
	},
	[]string{"worker_type", "result"},
)

WorkerExecCounter is a counter number of total executions, without counting retries, of the workers labelled by worker type and result.

View Source
var WorkerExecDurations = prometheus.NewHistogramVec(
	prometheus.HistogramOpts{
		Namespace: "workers",
		Subsystem: "exec",
		Name:      "durations",

		Help: "Execution duration in seconds of the workers labelled by worker type and result.",

		Buckets: prometheus.LinearBuckets(0, 30, 10),
	},
	[]string{"worker_type", "result"},
)

WorkerExecDurations is a histogram metric of the execution duration in seconds of the workers labelled by worker type and result.

View Source
var WorkerExecRetries = prometheus.NewHistogramVec(
	prometheus.HistogramOpts{
		Namespace: "workers",
		Subsystem: "exec",
		Name:      "retries",

		Help: `Number of retries of the workers labelled by worker type.`,

		Buckets: prometheus.LinearBuckets(0, 1, 5),
	},
	[]string{"worker_type"},
)

WorkerExecRetries is a histogram metric of the number of retries of the workers labelled by worker type.

View Source
var WorkerExecTimeoutsCounter = prometheus.NewCounterVec(
	prometheus.CounterOpts{
		Namespace: "workers",
		Subsystem: "exec",
		Name:      "timeouts",

		Help: `Number of total timeouts, of the workers labelled by worker type and slug.`,
	},
	[]string{"worker_type", "slug"},
)

WorkerExecTimeoutsCounter is a counter number of total timeouts, labelled by worker type and slug.

View Source
var WorkerKonnectorExecDeleteCounter = prometheus.NewCounterVec(
	prometheus.CounterOpts{
		Namespace: "workers",
		Subsystem: "konnectors",
		Name:      "delete_count",

		Help: `Number of konnectors executions, with the "account_deleted: true" parameter`,
	},
	[]string{"worker_type", "result"},
)

WorkerKonnectorExecDeleteCounter is a counter number of total executions, without counting retries, of the konnectors jobs with the "accound_deleted: true" parameter

View Source
var WorkersKonnectorsExecDurations = prometheus.NewHistogramVec(
	prometheus.HistogramOpts{
		Namespace: "workers",
		Subsystem: "konnectors",
		Name:      "durations",

		Help: `Execution durations of the commands executed for konnectors and services,
labelled by application slug. This should be a sub-duration of the
workers_exec_durations for the "konnector" and "service" worker types, but offers
a label by slug.`,

		Buckets: prometheus.LinearBuckets(0, 30, 10),
	},
	[]string{"slug", "result"},
)

WorkersKonnectorsExecDurations is a histogram metric of the number of execution durations of the commands executed for konnectors and services, labelled by application slug

Functions

func Routes

func Routes(g *echo.Group)

Routes set the /metrics routes.

Default prometheus handler comes with two collectors:

  • ProcessCollector: cpu, memory and file descriptor usage as well as the process start time for the given process id under the given namespace...
  • GoCollector: current go process, goroutines, GC pauses, ...

Types

This section is empty.

Jump to

Keyboard shortcuts

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