Skip to content

Add support for redisClient.v4 commands #2199

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
bizob2828 opened this issue May 20, 2024 · 1 comment · Fixed by #2200
Closed

Add support for redisClient.v4 commands #2199

bizob2828 opened this issue May 20, 2024 · 1 comment · Fixed by #2200
Assignees

Comments

@bizob2828
Copy link
Member

Is your feature request related to a problem? Please describe.

A customer reported upgraded from v3 to v4 and was using the legacy mode and it didn't capture spans.

Feature Description

const express = require("express");
const app = express();
const port = 3000;
const redis = require("redis");
const redisClient = redis.createClient({
  url: "redis://127.0.0.1:6379",
  legacyMode: true,
});

app.get("/redis-v4", (req, res) => {
  debugger
  redisClient.v4
    .set("baz", "qux")
    .then(() => redisClient.v4.get("baz"))
    .then((x) => {
      res.send(`baz is: ${x}`);
    });
});

redisClient.connect().then(() => {
  app.listen(port, () => {
    console.log(`Example app listening on port ${port}`);
  });
});

Additional context

This appears to be as simple as wrapping client.v4 with the same stuff as client.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant