Skip to content

kunal-saini/newrelic-atreugo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

newrelic-atreugo

NewRelic instrumentation middleware for Atreugo

example

import (
"github.com/newrelic/go-agent/v3/newrelic"
newrelicAtreugo "github.com/kunal-saini/newrelic-atreugo"
)

newrelicApp, err := newrelic.NewApplication(
    newrelic.ConfigAppName("app name"),
    newrelic.ConfigLicense("license"),
    newrelic.ConfigDistributedTracerEnabled(true),
)

newrelicAtreugoMiddleware := newrelicAtreugo.NewRelicAtreugoWrapper(newrelicApp)
server := atreugo.New(atreugo.Config{
	Addr: "0.0.0.0:3000", 
	PanicView: newrelicAtreugoMiddleware.PanicView()
})

server.UseBefore(newrelicAtreugoMiddleware.BeginInstrumentationMiddleware())
server.UseAfter(newrelicAtreugoMiddleware.EndInstrumentationMiddleware())

About

NewRelic instrumentation middleware for Atreugo

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages