Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Wrap ¶
func Wrap(h httprouter.Handle, route string, o ...Option) httprouter.Handle
Wrap wraps h such that it will report requests as transactions to Elastic APM, using route in the transaction name.
By default, the returned Handle will use elasticapm.DefaultTracer. Use WithTracer to specify an alternative tracer.
By default, the returned Handle will recover panics, reporting them to the configured tracer. To override this behaviour, use WithRecovery.
Types ¶
type Option ¶
type Option func(*options)
Option sets options for tracing.
func WithRecovery ¶
func WithRecovery(r apmhttp.RecoveryFunc) Option
WithRecovery returns an Option which sets r as the recovery function to use for tracing server requests.
func WithTracer ¶
func WithTracer(t *elasticapm.Tracer) Option
WithTracer returns an Option which sets t as the tracer to use for tracing server requests.
Click to show internal directories.
Click to hide internal directories.