Skip to content

Commit

Permalink
feat: support instrumentation of restify@10 (elastic#3053)
Browse files Browse the repository at this point in the history
Restify v10 was recently released to support node >=18. No changes were
required for our instrumentation, other than allowing v10 to be
instrumentated.
  • Loading branch information
trentm authored and fpm-peter committed Aug 20, 2024
1 parent 0fec9ca commit b2f1ad0
Show file tree
Hide file tree
Showing 6 changed files with 315 additions and 421 deletions.
9 changes: 8 additions & 1 deletion .tav.yml
Original file line number Diff line number Diff line change
Expand Up @@ -423,13 +423,20 @@ restify-v8-v9:
commands:
- node test/instrumentation/modules/restify/basic.test.js
- node test/instrumentation/modules/restify/set-framework.test.js
restify:
restify-v9-v10:
name: restify
versions: '>=9.0.0'
node: '>=14.18.0 <18.0.0'
commands:
- node test/instrumentation/modules/restify/basic.test.js
- node test/instrumentation/modules/restify/set-framework.test.js
restify:
name: restify
versions: '>=10.0.0'
node: '>=14.18.0'
commands:
- node test/instrumentation/modules/restify/basic.test.js
- node test/instrumentation/modules/restify/set-framework.test.js

# https://www.fastify.io/docs/latest/LTS/
# - #1086 suggests fastify@2.4.0 was a broken release, skip it.
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ Notes:
captured errors) for Lambda functions triggered by API Gateway.
({issues}2419[#2419])
* Support instrumentation for restify@10.
[float]
===== Bug fixes
Expand Down
2 changes: 1 addition & 1 deletion docs/supported-technologies.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ These are the frameworks that we officially support:
| <<hapi,hapi>> | >=9.0.0 <19.0.0 | Deprecated. No longer tested.
| <<koa,Koa>> via koa-router or @koa/router | >=5.2.0 <13.0.0 | Koa doesn't have a built in router, so we can't support Koa directly since we rely on router information for full support. We currently support the most popular Koa router called https://github.com/koajs/koa-router[koa-router].
| <<nextjs,Next.js>> | >=11.1.0 <14.0.0 | (Technical Preview) This instruments Next.js routing to name transactions for incoming HTTP transactions; and reports errors in user pages. It supports the Next.js production server (`next start`) and development server (`next dev`). See the <<nextjs,Getting Started document>>.
| <<restify,Restify>> | >=5.2.0 |
| <<restify,Restify>> | >=5.2.0 <11.0.0 |
|=======================================================================

[float]
Expand Down
2 changes: 1 addition & 1 deletion lib/instrumentation/modules/restify.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = function (restify, agent, { version, enabled }) {
if (!enabled) {
return restify
}
if (!semver.satisfies(version, '>=5.2.0 <10.0.0')) {
if (!semver.satisfies(version, '>=5.2.0 <11.0.0')) {
agent.logger.debug('restify version %s not supported, skipping', version)
return restify
}
Expand Down
Loading

0 comments on commit b2f1ad0

Please sign in to comment.