Back to godoc.org

Package nrecho

v1.7.1
Latest Go to latest

The highest tagged major version is .

Published: Apr 24, 2020 | License: Apache-2.0 | Module: github.com/tuckyapps/lit-go-tools

Overview

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

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/_integrations/nrecho/example/main.go

(RB): This new version was made for compatibility with v4

Index

func FromContext

func FromContext(c echo.Context) newrelic.Transaction

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

func Middleware

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))
Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier