otelweb

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2023 License: MIT Imports: 11 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New added in v0.1.2

func New() handler.Middleware

New see handler.MiddlewareNewFunc

func RegisterMiddleware added in v0.1.2

func RegisterMiddleware() web.Option

RegisterMiddleware return a web Option for otel middleware

Types

type Middleware

type Middleware struct {
	// contains filtered or unexported fields
}

Middleware returns middleware that will trace incoming requests.

func (*Middleware) ApplyFunc

func (h *Middleware) ApplyFunc(_ *conf.Configuration) gin.HandlerFunc

func (*Middleware) Name

func (h *Middleware) Name() string

func (*Middleware) Shutdown

func (h *Middleware) Shutdown(_ context.Context) error

Shutdown will flush the tracer's span processor and then shut it down.

the middleware uses the global tracer provider, so this function is empty.you should call otelwoocoo.Shutdown() when application shutdown.

Jump to

Keyboard shortcuts

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