Documentation ¶
Overview ¶
Package apmrestful provides a tracing and panic/exception reporting filter for for the go-restful framework.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Filter ¶
func Filter(o ...Option) restful.FilterFunction
Filter returns a new restful.Filter for tracing requests and recovering and reporting panics to Elastic APM.
By default, the filter will use apm.DefaultTracer. Use WithTracer to specify an alternative tracer.
Example ¶
package main import ( restful "github.com/emicklei/go-restful" "go.elastic.co/apm/module/apmrestful" ) func main() { // Install the filter into the default/global Container. restful.Filter(apmrestful.Filter()) }
Output:
Types ¶
Click to show internal directories.
Click to hide internal directories.