expvar_prometheus

package
v2.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package expvar_prometheus provides a Prometheus collector for Go expvar. It exposes all variables it can automatically.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterDefault

func RegisterDefault()

Register a collector with the default Prometheus registry. We can't do this by default in case people are transitioning from missinggo/xprometheus. The collector could be a global instance since it is stateless?

Types

type Collector

type Collector struct {
	// contains filtered or unexported fields
}

A Prometheus collector that exposes all Go expvars.

func NewCollector

func NewCollector() Collector

func NewExpvarCollector deprecated

func NewExpvarCollector() Collector

Deprecated: Use NewCollector. This name stutters.

func (Collector) Collect

func (e Collector) Collect(ch chan<- prometheus.Metric)

Collect implements Collector.

func (Collector) Describe

func (e Collector) Describe(ch chan<- *prometheus.Desc)

Describe implements Collector.

Jump to

Keyboard shortcuts

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