Skip to content

Commit

Permalink
chore: clarify koa-router instrumentation range (#3837)
Browse files Browse the repository at this point in the history
No functional change. However, I was confused for a little while that
'12.0.1' satisfies '>=5.2.0 <=12'. To me it isn't self-explanatory
that '<=12' is not the same as '<=12.0.0'.
  • Loading branch information
trentm authored Jan 22, 2024
1 parent 6b3eb48 commit b2c3eba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/instrumentation/modules/koa-router.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var shimmer = require('../shimmer');

module.exports = function (Router, agent, { version, enabled }) {
if (!enabled) return Router;
if (!semver.satisfies(version, '>=5.2.0 <=12')) {
if (!semver.satisfies(version, '>=5.2.0 <13')) {
agent.logger.debug(
'koa-router version %s not supported - aborting...',
version,
Expand Down
2 changes: 1 addition & 1 deletion lib/instrumentation/modules/mongodb.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const HOSTNAME_PORT_RE = /^(.+):(\d+)$/;

module.exports = (mongodb, agent, { version, enabled }) => {
if (!enabled) return mongodb;
if (!semver.satisfies(version, '>=3.3 <7.0')) {
if (!semver.satisfies(version, '>=3.3 <7')) {
agent.logger.debug(
'mongodb version %s not instrumented (mongodb <3.3 is instrumented via mongodb-core)',
version,
Expand Down

0 comments on commit b2c3eba

Please sign in to comment.