apm-agent-go: github.com/elastic/apm-agent-go/module/apmrestful Index | Examples | Files

package apmrestful

import "github.com/elastic/apm-agent-go/module/apmrestful"

Package apmrestful provides a tracing and panic/exception reporting filter for for the go-restful framework.



Package Files

doc.go filter.go route.go

func Filter Uses

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.


// Install the filter into the default/global Container.

type Option Uses

type Option func(*options)

Option sets options for tracing.

func WithTracer Uses

func WithTracer(t *apm.Tracer) Option

WithTracer returns an Option which sets t as the tracer to use for tracing server requests.

Package apmrestful imports 6 packages (graph). Updated 2020-07-14. Refresh now. Tools for package owners.