Repository navigation
Conversation
solnic
added this pull request to stack #3135
October 13, 2026 13:17
solnic
marked this pull request as draft
October 13, 2026 13:25
solnic
force-pushed
the
feat/3117-public-backend-extension-registry-for-background-job-integrations
branch
from
October 14, 2026 09:17
120f7a3 to
24621bb
Compare
solnic
marked this pull request as ready for review
October 14, 2026 09:49
solnic
force-pushed
the
feat/3117-public-backend-extension-registry-for-background-job-integrations
branch
3 times, most recently
from
October 14, 2026 11:42
18edb4c to
605bebc
Compare
solnic
removed this pull request from stack #3135
October 14, 2026 11:44
solnic
added this pull request to stack #3137
October 14, 2026 11:44
solnic
marked this pull request as draft
October 15, 2026 08:25
solnic
force-pushed
the
feat/3117-public-backend-extension-registry-for-background-job-integrations
branch
3 times, most recently
from
October 15, 2026 11:00
2cddb72 to
3fa983c
Compare
solnic
marked this pull request as ready for review
October 15, 2026 12:19
solnic
force-pushed
the
feat/3117-public-backend-extension-registry-for-background-job-integrations
branch
2 times, most recently
from
October 15, 2026 12:51
27970e7 to
e3ade51
Compare
solnic
force-pushed
the
feat/3117-public-backend-extension-registry-for-background-job-integrations
branch
from
October 15, 2026 13:37
5eaa1a5 to
77e02b1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This introduces a new public API for queue systems (ActiveJob, Sidekiq, GoodJob, SolidQueue etc.) to integrate with Sentry by simply defining an extension class.
Here's how it works:
The registry selects the first registered extension that handles the job.
Hook defaults
A bare extension supplies these hook defaults:
{}adds no metadata,nilsupplies no override, and returning the original payload leaves it unchanged.falsefromreport_exception?explicitly suppresses capture.Integration defaults
An integration can supply its own default extension without registering it globally:
When no backend matches, the registry uses the default extension. Otherwise, both hook results are validated and combined through the default extension’s
merge_hook. Its base implementation uses the backend result unless it isnil;falseand{}remain explicit results.Validation and fallbacks
Integrations invoke hooks through the registry, which validates their results:
message_idmust be a String, so the malformed result is rejected. Both malformed results andStandardErrorfailures are logged and replaced with the hook’s fallback. Unknown metadata keys are dropped. Exceptions outsideStandardErrorpropagate.Fallbacks are specific to each hook:
{}nilnilpreserves trace handling, whereas a valid{}explicitly starts a new traceCustom validation
Standard validators work automatically. A backend can optionally supply its own rules:
Shared instrumentation
Adds shared producer and consumer helpers for spans, trace propagation, scope enrichment, retry decisions, and exception capture.
publish_messaging_datadefaults tomessaging_dataand can be overridden for enqueue-specific attributes.A backend that already instruments enqueueing can return a delegated producer to avoid creating another span:
Consumerapplies extension scope data, starts and finishes consumer transactions, and handles exception capture according to the backend’s reporting policy:The following PRs add core queue conformance and make ActiveJob and Sidekiq use these helpers.
Closes #3117
Closes #3123