middleware

package
v0.16.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TraceContextFetcherForResponseHeaders = RestoreOrCreateTraceContextWithoutAPM

Functions

func ApmTraceResponseHeaders added in v0.5.0

func ApmTraceResponseHeaders(next http.Handler) http.Handler

func PanicRecoverer

func PanicRecoverer(next http.Handler) http.Handler

func RestoreOrCreateTraceContextWithoutAPM added in v0.5.0

func RestoreOrCreateTraceContextWithoutAPM(r *http.Request) apm.TraceContext

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 added in v0.5.0

func UseElasticApmTraceContext(r *http.Request) apm.TraceContext

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL