mw

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2022 License: MIT Imports: 8 Imported by: 1 module, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package ginmw offers a collection of middleware to enforce cross service policies, such as observabilities and context passing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Metrics

func Metrics(rds *srvhttp.RequestDurationSeconds, addPath bool) gin.HandlerFunc

Metrics is a gin middleware that adds request histogram. Setting addPath to true will make histogram to use request path as a dimension. This is ok with few total number of paths, but incurs performance issue if the cardinality of request path is high.

func Trace

func Trace(tracer stdtracing.Tracer, keyer contract.Keyer) gin.HandlerFunc

Trace is a gin middleware that adds opentracing support.

Types

This section is empty.

Jump to

Keyboard shortcuts

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