sgpm

package module
v0.0.0-...-12a5242 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2019 License: MIT Imports: 4 Imported by: 0

README

simple-go-prometheus-middleware

sgpm - Simple Go Prometheus Middleware

Based on github.com/slok/go-prometheus-middleware but simpler, without any support for specific go framework.

The example directory contains simple examples on how to use this package.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Middleware

func Middleware(cfg Config) func(http.Handler) http.Handler

Middleware collect metrics about requests for prometheus

Types

type Config

type Config struct {
	Prefix          string
	Source          string
	SourceLabel     string
	HandlerLabel    string
	MethodLabel     string
	StatusCodeLabel string
	DurationBuckets []float64
}

Config for Middleware

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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