Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Middleware ¶
func Middleware(tr opentracing.Tracer, options ...MWOption) gin.HandlerFunc
Middleware is a gin native version of the equivalent middleware in:
https://github.com/opentracing-contrib/go-stdlib/
Types ¶
type MWOption ¶
type MWOption func(*mwOptions)
MWOption controls the behavior of the Middleware.
func MWComponentName ¶
MWComponentName returns a MWOption that sets the component name for the server-side span.
func MWSpanObserver ¶
func MWSpanObserver(f func(span opentracing.Span, r *http.Request)) MWOption
MWSpanObserver returns a MWOption that observe the span for the server-side span.
func MWURLTagFunc ¶
MWURLTagFunc returns a MWOption that uses given function f to set the span's http.url tag. Can be used to change the default http.url tag, eg to redact sensitive information.
Click to show internal directories.
Click to hide internal directories.