Versions in this module Expand all Collapse all v2 v2.2.2 Mar 2, 2023 v2.2.1 Mar 2, 2023 Changes in this version + const ElasticTraceparentHeader + const TraceparentHeader + const TracestateHeader + const W3CTraceparentHeader + func ClientRequestName(req *http.Request) string + func FormatTraceparentHeader(c apm.TraceContext) string + func IgnoreNone(*http.Request) bool + func ParseTraceparentHeader(h string) (apm.TraceContext, error) + func ParseTracestateHeader(h ...string) (apm.TraceState, error) + func RequestWithContext(ctx context.Context, req *http.Request) *http.Request + func ServerRequestName(req *http.Request) string + func SetContext(ctx *apm.Context, req *http.Request, resp *Response, body *apm.BodyCapturer) + func SetHeaders(req *http.Request, traceContext apm.TraceContext, propagateLegacyHeader bool) + func SetTransactionContext(tx *apm.Transaction, req *http.Request, resp *Response, body *apm.BodyCapturer) + func StartTransaction(tracer *apm.Tracer, name string, req *http.Request) (*apm.Transaction, *http.Request) + func StartTransactionWithBody(tracer *apm.Tracer, name string, req *http.Request) (*apm.Transaction, *apm.BodyCapturer, *http.Request) + func StatusCodeResult(statusCode int) string + func UnknownRouteRequestName(req *http.Request) string + func Wrap(h http.Handler, o ...ServerOption) http.Handler + func WrapClient(c *http.Client, o ...ClientOption) *http.Client + func WrapRoundTripper(r http.RoundTripper, o ...ClientOption) http.RoundTripper + type ClientOption func(*roundTripper) + func WithClientRequestName(r RequestNameFunc) ClientOption + func WithClientSpanType(spanType string) ClientOption + func WithClientTrace() ClientOption + type RecoveryFunc func(w http.ResponseWriter, req *http.Request, resp *Response, ...) + func NewTraceRecovery(t *apm.Tracer) RecoveryFunc + type RequestIgnorerFunc func(*http.Request) bool + func NewDynamicServerRequestIgnorer(t *apm.Tracer) RequestIgnorerFunc + func NewRegexpRequestIgnorer(re *regexp.Regexp) RequestIgnorerFunc + type RequestNameFunc func(*http.Request) string + type Response struct + Headers http.Header + StatusCode int + func WrapResponseWriter(w http.ResponseWriter) (http.ResponseWriter, *Response) + type ServerOption func(*handler) + func WithPanicPropagation() ServerOption + func WithRecovery(r RecoveryFunc) ServerOption + func WithServerRequestIgnorer(r RequestIgnorerFunc) ServerOption + func WithServerRequestName(r RequestNameFunc) ServerOption + func WithTracer(t *apm.Tracer) ServerOption