bprometheus

package module
v1.0.14 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2023 License: MIT Imports: 11 Imported by: 10

README

bprometheus

codecov

Prometheus brick to be used with Mortar

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefBuckets = []float64{.005, .01, .025, .05, .1, .25, .5, 1, 2.5, 5, 10, 30, 60, 120, 300, 600}
)

Functions

func HTTPHandler

func HTTPHandler() http.Handler

HTTPHandler provides the Prometheus HTTP scrape handler.

func PrometheusHTTPHandlerPatternPair

func PrometheusHTTPHandlerPatternPair(pattern string) types.HTTPHandlerPatternPair

PrometheusHTTPHandlerPatternPair provides mortar Internal HTTP Pattern Pair It can later be registered to serve metrics endpoint on internal port

Call this function to customize your http pattern

func PrometheusInternalHandlerFxOption

func PrometheusInternalHandlerFxOption() fx.Option

PrometheusInternalHandlerFxOption fx.Provide option that will register Prometheus HTTP handler to serve "/metrics" endpoint on internal port

Types

type PrometheusBuilder

type PrometheusBuilder interface {
	monitor.Builder
	// SetNamespace allows to set a default Prometheus Namespace
	SetNamespace(namespace string) PrometheusBuilder
	// AddPredefinedCollectors allows to register predefined Collectors to the same Prometheus Registry
	// *** Actual registration will occur only when the `monitor.BricksReporter.Connect(ctx)` is called ***
	// *** Any error returned during registration will fail the `Connect` method.
	AddPredefinedCollectors(collectors ...prometheus.Collector) PrometheusBuilder
}

PrometheusBuilder defines Prometheus builder

func Builder

func Builder() PrometheusBuilder

Builder creates a builder to create Prometheus client

Jump to

Keyboard shortcuts

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