Documentation
¶
Index ¶
- func Auth() gin.HandlerFunc
- func AuthAdmin() gin.HandlerFunc
- func Cors() gin.HandlerFunc
- func Logging(opts ...Option) gin.HandlerFunc
- func Tracing(serviceName string, opts ...traceOption) gin.HandlerFunc
- func WithPropagators(propagators propagation.TextMapPropagator) traceOption
- func WithTracerProvider(provider oteltrace.TracerProvider) traceOption
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Tracing ¶ added in v1.3.0
func Tracing(serviceName string, opts ...traceOption) gin.HandlerFunc
Tracing returns middleware that will trace incoming requests. The service parameter should describe the name of the (virtual) server handling the request.
func WithPropagators ¶ added in v1.3.0
func WithPropagators(propagators propagation.TextMapPropagator) traceOption
WithPropagators specifies propagators to use for extracting information from the HTTP requests. If none are specified, global ones will be used.
func WithTracerProvider ¶ added in v1.3.0
func WithTracerProvider(provider oteltrace.TracerProvider) traceOption
WithTracerProvider specifies a tracer provider to use for creating a tracer. If none is specified, the global provider is used.
Types ¶
type Option ¶
type Option func(*options)
Option logger middleware options
func WithIgnoreRoutes ¶
WithIgnoreRoutes no logger content routes
func WithRequestID ¶
WithRequestID name is field in header, eg:X-Request-Id
Click to show internal directories.
Click to hide internal directories.