Skip to content

Redis | Sentry for Next.js

Source URL: https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/integrations/redis

This integration only works in the Node.js and Bun runtimes.

Import name: Sentry.redisIntegration

This integration is enabled by default when performance monitoring is enabled. If you’d like to modify your default integrations, read this.

The redisIntegration adds instrumentation for the ioredis and redis library to capture spans using @opentelemetry/instrumentation-ioredis and @opentelemetry/instrumentation-redis-4.

Sentry.init({
integrations: [Sentry.redisIntegration()],
});
  • ioredis: >=2.0.0 <6
  • redis: >=4.0.0

Type: (string)[]

Define cache prefixes for cache keys that should be captured as a cache span. Setting this to, for example, ['user:'] will capture cache keys that start with user:.