Middleware returns a new negroni middleware handler for tracing requests and reporting errors.
This middleware will recover and report panics, so it can be used instead of the standard negroni.Recovery middleware.
By default, the middleware will use apm.DefaultTracer. Use WithTracer to specify an alternative tracer.
Option sets options for tracing.
WithPanicPropagation returns a Option which enable panic propagation. Any panic will be recovered and recorded as an error in a transaction, then panic will be caused again.
WithRecovery returns a Option which sets r as the recovery function to use for tracing server requests.
WithServerRequestIgnorer returns a Option which sets r as the function to use to determine whether or not a server request should be ignored. If r is nil, all requests will be reported.
WithServerRequestName returns a Option which sets r as the function to use to obtain the transaction name for the given server request.
WithTracer returns a Option which sets t as the tracer to use for tracing server requests.
RecoveryFunc is the type of a function for use in WithRecovery.
RequestIgnorerFunc is the type of a function for use in WithServerRequestIgnorer.
RequestNameFunc is the type of a function for use in WithServerRequestName.