Documentation ¶
Index ¶
- Constants
- type WrappedRouter
- func (r *WrappedRouter) DELETE(path string, handle httprouter.Handle)
- func (r *WrappedRouter) GET(path string, handle httprouter.Handle)
- func (r *WrappedRouter) HEAD(path string, handle httprouter.Handle)
- func (r *WrappedRouter) Handle(method, path string, handle httprouter.Handle)
- func (r *WrappedRouter) Handler(method, path string, handler http.Handler)
- func (r *WrappedRouter) HandlerFunc(method, path string, handler http.HandlerFunc)
- func (r *WrappedRouter) OPTIONS(path string, handle httprouter.Handle)
- func (r *WrappedRouter) PATCH(path string, handle httprouter.Handle)
- func (r *WrappedRouter) POST(path string, handle httprouter.Handle)
- func (r *WrappedRouter) PUT(path string, handle httprouter.Handle)
Constants ¶
const Version = "v1.0.0"
Version is the instrumentation module semantic version
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WrappedRouter ¶
type WrappedRouter struct { *httprouter.Router // contains filtered or unexported fields }
func Wrap ¶
func Wrap(r *httprouter.Router, sensor *instana.Sensor) *WrappedRouter
Wrap returns an instrumented instance of a httprouter.Router that instruments HTTP handlers with Instana upon registration.
func (*WrappedRouter) DELETE ¶
func (r *WrappedRouter) DELETE(path string, handle httprouter.Handle)
DELETE is a shortcut for router.Handle(http.MethodDelete, path, handle)
func (*WrappedRouter) GET ¶
func (r *WrappedRouter) GET(path string, handle httprouter.Handle)
GET is a shortcut for router.Handle(http.MethodGet, path, handle)
func (*WrappedRouter) HEAD ¶
func (r *WrappedRouter) HEAD(path string, handle httprouter.Handle)
HEAD is a shortcut for router.Handle(http.MethodHead, path, handle)
func (*WrappedRouter) Handle ¶
func (r *WrappedRouter) Handle(method, path string, handle httprouter.Handle)
Handle instruments and registers a new request handle with the given path and method.
For details please refer to the (*httprouter.Router).Handle() documentation: https://pkg.go.dev/github.com/julienschmidt/httprouter#Router.Handle
func (*WrappedRouter) Handler ¶
func (r *WrappedRouter) Handler(method, path string, handler http.Handler)
Handler is an adapter which allows the usage of an uninstrumented http.Handler as a request handle. The Params are available in the request context under ParamsKey.
func (*WrappedRouter) HandlerFunc ¶
func (r *WrappedRouter) HandlerFunc(method, path string, handler http.HandlerFunc)
HandlerFunc is an adapter which allows the usage of an uninstrumented http.HandlerFunc as a request handle.
func (*WrappedRouter) OPTIONS ¶
func (r *WrappedRouter) OPTIONS(path string, handle httprouter.Handle)
OPTIONS is a shortcut for router.Handle(http.MethodOptions, path, handle)
func (*WrappedRouter) PATCH ¶
func (r *WrappedRouter) PATCH(path string, handle httprouter.Handle)
PATCH is a shortcut for router.Handle(http.MethodPatch, path, handle)
func (*WrappedRouter) POST ¶
func (r *WrappedRouter) POST(path string, handle httprouter.Handle)
POST is a shortcut for router.Handle(http.MethodPost, path, handle)
func (*WrappedRouter) PUT ¶
func (r *WrappedRouter) PUT(path string, handle httprouter.Handle)
PUT is a shortcut for router.Handle(http.MethodPut, path, handle)