Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ConfigDefault = Config{ Application: nil, License: "", AppName: "fiber-api", Enabled: false, ErrorStatusCodeHandler: DefaultErrorStatusCodeHandler, Next: nil, }
Functions ¶
func DefaultErrorStatusCodeHandler ¶ added in v1.1.0
func FromContext ¶ added in v1.2.0
func FromContext(c *fiber.Ctx) *newrelic.Transaction
FromContext returns the Transaction from the context if present, and nil otherwise.
Types ¶
type Config ¶
type Config struct { // License parameter is required to initialize newrelic application License string // AppName parameter passed to set app name, default is fiber-api AppName string // Enabled parameter passed to enable/disable newrelic Enabled bool // TransportType can be HTTP or HTTPS, default is HTTP // Deprecated: The Transport type now acquiring from request URL scheme internally TransportType string // Application field is required to use an existing newrelic application Application *newrelic.Application // ErrorStatusCodeHandler is executed when an error is returned from handler // Optional. Default: DefaultErrorStatusCodeHandler ErrorStatusCodeHandler func(c *fiber.Ctx, err error) int // Next defines a function to skip this middleware when returned true. // Optional. Default: nil Next func(c *fiber.Ctx) bool }
Click to show internal directories.
Click to hide internal directories.