-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(redis): Add cache logic for redis-4 #12429
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
Conversation
return createClient().connect(); | ||
} | ||
|
||
let client; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
l: Can we rename this (and the method below) to e.g. redisClient
? Can be a bit confusing otherwise as we also have a sentry client :)
|
||
const spanDescription = safeKey.join(', '); | ||
|
||
span.updateName(spanDescription.length > 1024 ? `${spanDescription.substring(0, 1024)}...` : spanDescription); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW, I just remembered we have a truncate
method in utils, we should probably use this here!
8f338e4
to
38ef208
Compare
@@ -17,6 +20,7 @@ import { | |||
getCacheOperation, | |||
shouldConsiderForCache, | |||
} from '../../utils/redisCache'; | |||
import { truncate } from '@sentry/utils/src'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this import is not correct, should not have the /src
part (this probably comes from the editor...)
size-limit report 📦
|
Follow-up as cache logic for
ioredis
was already added.