echoapmkit

package
v0.0.25 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package echoapmkit for echo & APM functionalies

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandlerSpan

func HandlerSpan(ctx echo.Context) *apm.Span

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

func WithElasticTracer(t *apm.Tracer) APMOption

WithElasticTracer returns an APMOption which sets t as the tracer to use for tracing server requests.

func WithPinpointAgent

func WithPinpointAgent(p pinpoint.Agent) APMOption

WithPinpointAgent ...

Jump to

Keyboard shortcuts

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