Documentation
¶
Index ¶
- Variables
- func ApmTraceResponseHeaders(next http.Handler) http.Handler
- func ConstructContextCancellationLoggerMiddleware(description string) func(http.Handler) http.Handler
- func PanicRecoverer(next http.Handler) http.Handler
- func RestoreOrCreateTraceContextWithoutAPM(r *http.Request) apm.TraceContext
- func UseElasticApmTraceContext(r *http.Request) apm.TraceContext
Constants ¶
This section is empty.
Variables ¶
View Source
var TraceContextFetcherForResponseHeaders = RestoreOrCreateTraceContextWithoutAPM
Functions ¶
func ConstructContextCancellationLoggerMiddleware ¶ added in v0.26.0
func RestoreOrCreateTraceContextWithoutAPM ¶
RestoreOrCreateTraceContextWithoutAPM is designed as a fallback to enable trace propagation even if Elastic APM is not configured or disabled. It uses some Elastic apm go agent functions for compatibility but does not require the middleware to be active.
func UseElasticApmTraceContext ¶
UseElasticApmTraceContext extracts the apm.TraceContext from the apm.Transaction stored in the Context. The transaction is contained in the context if Elastic APM is enabled and the apmhttp handler has started the transaction. See https://pkg.go.dev/go.elastic.co/apm/module/apmhttp/v2@v2.1.0#StartTransactionWithBody
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.