Redis with ioredis
Inspect ioredis commands, timings, request linkage, and failures.
ServerDevTools enables @opentelemetry/instrumentation-ioredis. The documented Redis integration is for ioredis; other Redis clients are not covered by this guide.
npm install server-devtools ioredisconst redis = new Redis(process.env.REDIS_URL);
await redis.set("user:123", "active");
const state = await redis.get("user:123");Commands appear as database spans linked to the active request. Successful commands include duration; failed commands carry error status and exception details. Pipelines and transactions are instrumented by the underlying ioredis instrumentation.
Import
ioredis only after ServerDevTools has started. ESM/CommonJS preload mistakes are a common reason Redis spans are absent.Last updated on