go-agent: github.com/newrelic/go-agent/v3/integrations/nrecho-v3 Index | Files | Directories

package nrecho

import "github.com/newrelic/go-agent/v3/integrations/nrecho-v3"

Package nrecho instruments applications using https://github.com/labstack/echo v3.

Use this package to instrument inbound requests handled by an echo.Echo instance.

e := echo.New()
// Add the nrecho middleware before other middlewares or routes:
e.Use(nrecho.Middleware(app))

Example: https://github.com/newrelic/go-agent/tree/master/v3/integrations/nrecho-v3/example/main.go

Index

Package Files

nrecho.go

func FromContext Uses

func FromContext(c echo.Context) *newrelic.Transaction

FromContext returns the Transaction from the context if present, and nil otherwise.

func Middleware Uses

func Middleware(app *newrelic.Application) func(echo.HandlerFunc) echo.HandlerFunc

Middleware creates Echo middleware that instruments requests.

e := echo.New()
// Add the nrecho middleware before other middlewares or routes:
e.Use(nrecho.Middleware(app))

Directories

PathSynopsis
example

Package nrecho imports 5 packages (graph) and is imported by 1 packages. Updated 2019-12-18. Refresh now. Tools for package owners.