otelweb

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2023 License: MIT Imports: 10 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HTML

func HTML(c *gin.Context, code int, name string, obj any)

HTML will trace the rendering of the template as a child of the span in the given context. This is a replacement for gin.Context.HTML function - it invokes the original function after setting up the span.

Types

type Middleware

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

Middleware returns middleware that will trace incoming requests.

func NewMiddleware

func NewMiddleware() *Middleware

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