New features
Added hapi v17 instrumentation
Hapi v17 added support for promise-based middleware which broke transaction tracking in the agent. This caused issues in naming, as the agent will name the transaction after the path to the middleware that responded to a request.
Added instrumentation for
vision@5Due to the way
visionis mounted to the hapi server when using hapi v17.x, the agent's instrumentation would not pick up on the middleware being mounted. This new instrumentation now correctly times rendering done in thevisionmiddleware.Added
unwrapOncemethod to shim objectThis new method can be used to unwrap a single layer of instrumentation.
unwrapOnceis useful in cases where multiple instrumentations wrap the same method and unwrapping of the top level is required.Added
isErrorWarechecks aroundnameState.appendPath/nameState.popPathcalls to avoid doubling up paths in transaction namesPreviously, the agent would append its transaction name with the path fragment where an error handler middleware was mounted. The extraneous path fragment will now be omitted, and the transaction will be named properly after the middleware that threw the error.
Added support for
pg6 on Node 5 or higher
Improvements
- Added
parentproperty to webframework-shim segment description - Refactored existing hapi instrumentation for different
server.ext()invocations - Refactored webframework-shim
_recordMiddlewareto construct different segment descriptions for callback- or promise-based middleware - Updated
node-postgres@^6versioned tests to avoid deprecation warning on direct moduleconnectandendcalls - Fixed running domain tests on Node 9.3.0.
- Improved logging for CAT headers and transaction name-state management.
- All
json-safe-stringifycalls now wrapped intry/catch - Removed
lib/util/safe-json
Bug fixes
- Fixed creating supportability metric when mysql2 goes uninstrumented.
- Added a
segmentStack.popto the middlewareafterin cases when an error is caught and there is no next handler - Fixed determining parents for middleware segments when transaction state is lost and reinstated
- Added check to
_recordMiddlewareto avoid prepending a slash if originalrouteis an array - Changed logic in http instrumentation to attach
response.statusto the transaction as a string - Updated
startWebTransactionandstartBackgroundTransactionto add nested transactions as segments to parent transactions