prometheusbp

package
v0.10.2-beta.3 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2025 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package prometheusbp provides common code used for exporting Prometheus metrics.

Index

Constants

This section is empty.

Variables

View Source
var (
	// DefaultLatencyBuckets is the default bucket values for a prometheus latency histogram metric.
	//
	// These match the spec defined at https://github.snooguts.net/reddit/baseplate.spec/blob/master/component-apis/prom-metrics.md#latency-histograms
	DefaultLatencyBuckets = []float64{
		0.000_100,
		0.000_500,
		0.001_000,
		0.002_500,
		0.005_000,
		0.010_000,
		0.025_000,
		0.050_000,
		0.100_000,
		0.250_000,
		0.500_000,
		1.000_000,
		5.000_000,
		15.000_000,
		30.000_000,
	}

	// Deprecated: Please use DefaultLatencyBuckets instead for latencies if the buckets suit your needs, otherwise define your own buckets.
	DefaultBuckets = DefaultLatencyBuckets
)

Functions

func BoolString added in v0.9.5

func BoolString(b bool) string

BoolString returns the string version of a boolean value that should be used in a prometheus metric label.

func RecordModuleVersions added in v0.9.12

func RecordModuleVersions(info *debug.BuildInfo)

RecordModuleVersions records the modules linked into this binary in the baseplate_go_modules prometheus metric.

Users should not need to call this directly, as it is called by baseplate.New. This should generally not be called more than once, and it is not safe to call concurrently.

Types

This section is empty.

Directories

Path Synopsis
Package promtest provides test utilites for testing Prometheus metrics.
Package promtest provides test utilites for testing Prometheus metrics.

Jump to

Keyboard shortcuts

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