Constructor
new MiddlewareSpec(constructorParams)
Name | Type | Description |
---|---|---|
constructorParams | MiddlewareSpecParams |
Members
appendPath :boolean
Indicates if the route path for the middleware should be appended to the transaction name or not.
- boolean
next :number|RouteNextFunction
When a number, indicates the argument position of the "next" callback in the original middleware function's parameters list. Otherwise, it's a function that will be invoked with the arguments of the middleware and another function for wrapping calls that represent continuation from the instrumented middleware.
- number |
RouteNextFunction
params :RouteParameterFunction
A function to extract the route parameters from the instrumented middleware's arguments list.
req :number|RouteRequestFunction
When a number, indicates the argument position of the request object in the middleware function's arguments list. Otherwise, it's a function that extracts the request object from the middleware arguments.
- number |
RouteRequestFunction
res :number
Indicates the argument position of the response object in the middleware function's arguments list.
- number
route :number|string|null
When a number, indicates the argument position of the route string in the middleware function's arguments list. Otherwise, it is a string that represents the route path.
- number |
string | null
type :string
Indicates the type of middleware that is being instrumented.
- string
- See