Documentation ¶
Overview ¶
Package o11ynethttp contains middleware for the standard Go HTTP server.
Package o11ynethttp provides common http middleware for tracing requests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Middleware ¶
Middleware returns an http.Handler which wraps an http.Handler and adds an o11y.Provider to the context. A new span is created from the request headers.
This code is based on github.com/beeline-go/wrappers/hnynethttp/nethttp.go
Types ¶
type RouteRecorder ¶
type RouteRecorder struct {
// contains filtered or unexported fields
}
func GetRouteRecorderFromContext ¶
func GetRouteRecorderFromContext(ctx context.Context) *RouteRecorder
func NewRouteRecorder ¶
func NewRouteRecorder() *RouteRecorder
func (*RouteRecorder) Route ¶
func (r *RouteRecorder) Route() string
func (*RouteRecorder) SetRoute ¶
func (r *RouteRecorder) SetRoute(route string)
Click to show internal directories.
Click to hide internal directories.