newrelic

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Service = dependency.Service{
	Dependencies: fx.Provide(
		fx.Annotated{
			Group: "trippers",
			Target: func() httpclient.Tripper {
				return newrelic.NewRoundTripper
			},
		},
	),
	ConfigFunc: func(set dependency.FlagSet) {
		set.String("newrelic-app-name", filepath.Base(os.Args[0]), "The name of the application")
		set.String("newrelic-license-key", "", "Newrelic license key")
		set.Bool("newrelic-distributed-tracer-enabled", true, "Whether to add and read distributed tracing headers")
	},
	Constructor: NewApp,
}

Service allows newrelic to be added to an application, it adds the middleware aswell too

Functions

func NewApp

func NewApp(config dependency.ConfigGetter, logger *zap.Logger) (app *newrelic.Application, err error)

NewApp will create a new instance of the *newrelic.Application

Types

This section is empty.

Jump to

Keyboard shortcuts

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