prometheus

package module
v0.0.0-...-dba2c48 Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: MIT Imports: 7 Imported by: 0

README

Prometheus

License

Installation

go get github.com/gowool/middleware/prometheus

License

Distributed under MIT License, please see license file within the code for more details.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Middleware

func Middleware(cfg *Config) wool.Middleware

func Mount

func Mount(w *wool.Wool)

Types

type Config

type Config struct {
	Version              string `mapstructure:"version"`
	Namespace            string `mapstructure:"namespace"`
	ExcludeRegexStatus   string `mapstructure:"exclude_status"`
	ExcludeRegexMethod   string `mapstructure:"exclude_method"`
	ExcludeRegexEndpoint string `mapstructure:"exclude_endpoint"`
	EndpointLabelMapping RequestLabelMapping
	// contains filtered or unexported fields
}

func (*Config) Init

func (cfg *Config) Init()

type Prometheus

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

func New

func New(cfg *Config) *Prometheus

func (*Prometheus) Middleware

func (m *Prometheus) Middleware(next wool.Handler) wool.Handler

type RequestLabelMapping

type RequestLabelMapping func(wool.Ctx) string

Jump to

Keyboard shortcuts

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