diff --git a/currencies.json b/currencies.json index 4f74f9bec9..2d170b5075 100644 --- a/currencies.json +++ b/currencies.json @@ -972,10 +972,11 @@ "core": false, "versions": [ { - "v": "5.12.1" + "v": "6.0.0", + "node": ">=20" }, { - "v": "5.8.3" + "v": "5.12.1" }, { "v": "4.7.1" @@ -1334,4 +1335,4 @@ } ] } -] \ No newline at end of file +] diff --git a/packages/core/src/tracing/instrumentation/databases/redis.js b/packages/core/src/tracing/instrumentation/databases/redis.js index be81fdea7f..5652138e06 100644 --- a/packages/core/src/tracing/instrumentation/databases/redis.js +++ b/packages/core/src/tracing/instrumentation/databases/redis.js @@ -48,9 +48,13 @@ function captureCommands(file) { } function instrument(redis) { - // NOTE: v4 no longer exposes the RedisClient. We need to wait till `createClient` get's called - // to get the instance of the redis client - if (!redis.RedisClient) { + // NOTE: Redis versions differ in export shape: + // v4/v5: are strictly factory-based (createClient/createCluster) and do not expose RedisClient. + // v6: expose RedisClient again, but this does NOT imply legacy/class-based behavior. + // RedisClient presence alone cannot be used to distinguish v3 from newer versions. + const isLegacyClassAPI = redis.RedisClient?.prototype && typeof redis.createClient !== 'function'; + + if (!isLegacyClassAPI) { // redis automatically loads @redis/client, which can trigger a second instrumentation call. // We track the instrumentation status via `isRedisClientInstrumented and skip second time. if (isRedisClientInstrumented) {