metrics

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package metrics centralizes Prometheus metric definitions.

Index

Constants

This section is empty.

Variables

View Source
var (
	ProcessedSuccess  = processedTotal.WithLabelValues("success")
	ProcessedFailure  = processedTotal.WithLabelValues("failure")
	ProcessedRejected = processedTotal.WithLabelValues("rejected")
	ProcessedAborted  = processedTotal.WithLabelValues("aborted")

	ProcessingDuration = promauto.NewHistogram(prometheus.HistogramOpts{
		Name: "texd_processing_duration_seconds",
		Help: "Overview of processing time per job",
		Buckets: []float64{
			.05, .1, .5,
			1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5,
			6, 7, 8, 9, 10, 20, 30, 60,
		},
	})

	InputSize = promauto.NewHistogramVec(prometheus.HistogramOpts{
		Name:    "texd_input_file_size_bytes",
		Help:    "Overview of input file sizes by category",
		Buckets: prometheus.ExponentialBuckets(512, 2, 13),
	}, []string{"type"})

	OutputSize = promauto.NewHistogram(prometheus.HistogramOpts{
		Name:    "texd_output_file_size_bytes",
		Help:    "Overview of genereted document sizes, success only",
		Buckets: prometheus.ExponentialBuckets(2048, 2, 13),
	})

	JobsQueueLength = promauto.NewGauge(prometheus.GaugeOpts{
		Name: "texd_job_queue_length",
		Help: "Length of rendering queue, i.e. how many documents are waiting for processing",
	})

	JobQueueRatio = promauto.NewGauge(prometheus.GaugeOpts{
		Name: "texd_job_queue_ratio",
		Help: "Queue capacity indicator, with 0 meaning empty and 1 meaning full queue",
	})

	Info = promauto.NewGaugeVec(prometheus.GaugeOpts{
		Name:        "texd_info",
		Help:        "Various runtime and configuration information",
		ConstLabels: prometheus.Labels{"version": texd.Version()},
	}, []string{"mode"})
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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