sentry-laravel
sentry-laravel copied to clipboard
Replace the cache key with a placeholder if the cache key is the session key
Problem Statement
Currently our session overview shows which cache keys are being HIT and MISS'ed etc. However many users are using their caches for sessions storage. This means that the session key is the cache key. This generates a lot of unique cache keys which are not interesting to look at, example:
This is an overview of my cache keys, however only sessions are shown.
Solution Brainstorm
It's probably best if we replace the span description for a cache operation with a placeholder like {sessionKey} if we detect that the cache key equals the current session key when a session is started.
We have to watch out that the code doing this does not start the session prematurely or starts a session when none would've been started by the application.