Documentation ¶
Overview ¶
Package echoapmkit for echo & APM functionalies
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandlerSpan ¶
HandlerSpan retrieve span for http.Handler / controller type.
func RecoverMiddleware ¶
func RecoverMiddleware(o ...APMOption) echo.MiddlewareFunc
RecoverMiddleware returns a new Echo middleware handler for tracing requests and reporting errors.
This middleware will recover and report panics, so it can be used instead of echo/middleware.Recover.
By default, the middleware will use apm.DefaultTracer. Use WithTracer to specify an alternative tracer.
Types ¶
type APMOption ¶
type APMOption func(*options)
APMOption sets options for tracing.
func WithElasticRequestIgnorer ¶
func WithElasticRequestIgnorer(r apmhttp.RequestIgnorerFunc) APMOption
WithElasticRequestIgnorer returns a APMOption which sets r as the function to use to determine whether or not a request should be ignored. If r is nil, all requests will be reported.
func WithElasticTracer ¶
WithElasticTracer returns an APMOption which sets t as the tracer to use for tracing server requests.