Skip to content

Add Redis Object Cache exception reporting integration#237

Merged
stayallive merged 4 commits into
stayallive:masterfrom
LordSimal:redis-object-cache
May 20, 2026
Merged

Add Redis Object Cache exception reporting integration#237
stayallive merged 4 commits into
stayallive:masterfrom
LordSimal:redis-object-cache

Conversation

@LordSimal

Copy link
Copy Markdown
Contributor

Refs: rhubarbgroup/redis-cache#605

This adds custom exception integration for the Redis Object cache Plugin

The action being used is defined in https://github.com/rhubarbgroup/redis-cache/blob/a456c15c9a09269e0418759f644e88b9dc8f9dc0/includes/object-cache.php#L2927

Without this the exception being thrown by the Redis Client (or anything related in that plugin) don't get reported to sentry as it does a wp_die() and does not re-throw them so the Worpdress error handler can process it.

For now there is only the thrown exception as a context in there, but maybe this can be improved in a future version of that plugin to give a bit more context.

Warning

I have NOT yet tested this change. But will try to do that in the upcoming days.

@LordSimal LordSimal force-pushed the redis-object-cache branch 2 times, most recently from f9bb443 to 5833020 Compare March 19, 2026 16:08
@LordSimal LordSimal changed the title add sentry object cache integration add redis object cache integration Mar 19, 2026
@LordSimal LordSimal force-pushed the redis-object-cache branch from 5833020 to faed719 Compare March 19, 2026 16:31
@LordSimal

Copy link
Copy Markdown
Contributor Author
image

Seems to look good now

Comment thread src/plugins/class-wp-sentry-redis-object-cache-integration.php Outdated
@LordSimal

Copy link
Copy Markdown
Contributor Author

The callstack up till the constructor is as follows:

class-wp-sentry-redis-object-cache-integration.php:30, WP_Sentry_Redis_Object_Cache_Integration->__construct()
class-wp-sentry-redis-object-cache-integration.php:23, WP_Sentry_Redis_Object_Cache_Integration::get_instance()
wp-sentry.php:128, require_once()
wp-config.php:124, require_once()
wp-load.php:50, require_once()
admin.php:35, require_once()
options-general.php:10, {main}()

don't know what we can use at this point to properly detect, that this plugin is present and active

@LordSimal LordSimal force-pushed the redis-object-cache branch from faed719 to 422ef2d Compare March 19, 2026 16:50
@tillkruss

Copy link
Copy Markdown

Nice, I'm gonna see if we can add this easily to Object Cache Pro as well.

@LordSimal

Copy link
Copy Markdown
Contributor Author

@stayallive any objections?

@LordSimal

Copy link
Copy Markdown
Contributor Author

ping @stayallive

@stayallive stayallive changed the title add redis object cache integration Add redis object cache integration May 20, 2026

@stayallive stayallive left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay, this looks good!

@stayallive stayallive changed the title Add redis object cache integration Add Redis Object Cache exception reporting integration May 20, 2026
@stayallive stayallive merged commit af864b2 into stayallive:master May 20, 2026
@LordSimal LordSimal deleted the redis-object-cache branch May 20, 2026 09:56
@LordSimal

Copy link
Copy Markdown
Contributor Author

May I request a new release for this new feature please 🙏🏻
Otherwise it's a bit cumbersome to update all my instances 😅

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants