v1

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHandler

func NewHandler(read, write *url.URL, opts ...HandlerOption) http.Handler

NewHandler creates the new metrics v1 handler.

Types

type HandlerOption

type HandlerOption func(h *handlerConfiguration)

HandlerOption modifies the handler's configuration.

func HandlerInstrumenter

func HandlerInstrumenter(instrumenter handlerInstrumenter) HandlerOption

HandlerInstrumenter adds a custom HTTP handler instrument middleware for the handler to use.

func Logger

func Logger(logger log.Logger) HandlerOption

Logger add a custom logger for the handler to use.

func ReadMiddleware

func ReadMiddleware(m func(http.Handler) http.Handler) HandlerOption

ReadMiddleware adds a middleware for all read operations.

func Registry

func Registry(r *prometheus.Registry) HandlerOption

Registry adds a custom Prometheus registry for the handler to use.

func SpanRoutePrefix

func SpanRoutePrefix(spanRoutePrefix string) HandlerOption

SpanRoutePrefix adds a prefix before the value of route tag in tracing spans.

func WriteMiddleware

func WriteMiddleware(m func(http.Handler) http.Handler) HandlerOption

WriteMiddleware adds a middleware for all write operations.

Jump to

Keyboard shortcuts

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