Skip to content

feat(rails): run ActiveJob reporting through job extensions - #3130

Open
solnic wants to merge 2 commits into
chore/3121-queues-module-conformance-improvementsfrom
chore/3119-switch-activejob-integration-to-the-backend-extension-registry
Open

solnic wants to merge 2 commits into
chore/3121-queues-module-conformance-improvementsfrom
chore/3119-switch-activejob-integration-to-the-backend-extension-registry

Conversation

@solnic

@solnic solnic commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

The ActiveJob integration now runs on the job extension API from #3129. Backends subclass Sentry::Rails::ActiveJobExtension and register it for their queue adapter:

class MyBackendExtension < Sentry::Rails::ActiveJobExtension
  def initialize
    super(name: "my_backend")
  end

  def messaging_data(job:, **)
    super.merge(system: "my_backend")
  end
end

Sentry::Rails.register_active_job_extension(:my_backend, MyBackendExtension.new)

Jobs on an adapter without a registered extension use ActiveJobExtension itself. Every job keeps the active_job context, the queue tag and ActiveJob's error data. An extension's error_data is added on top of that.

Other changes:

  • Sentry::Rails.active_job_owns_adapter?(adapter) tells backend gems whether sentry-rails reports jobs for a queue adapter.
  • A backend that records its own queue.publish span returns false from record_publish_span?.
  • Consumer transactions report messaging.message.body.size when sampled.

Closes #3119

@solnic
solnic added this pull request to stack #3135 October 13, 2026 13:17
@solnic
solnic force-pushed the chore/3119-switch-activejob-integration-to-the-backend-extension-registry branch from 75aefea to 243c2a0 Compare October 13, 2026 13:23
@solnic
solnic marked this pull request as draft October 13, 2026 13:25

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

@solnic
solnic force-pushed the chore/3119-switch-activejob-integration-to-the-backend-extension-registry branch 3 times, most recently from e9dd3a1 to bb053a7 Compare October 14, 2026 09:17
@solnic
solnic force-pushed the chore/3119-switch-activejob-integration-to-the-backend-extension-registry branch from bb053a7 to 2fdd2a7 Compare October 14, 2026 10:34
@solnic
solnic force-pushed the chore/3119-switch-activejob-integration-to-the-backend-extension-registry branch from 2fdd2a7 to 0921325 Compare October 14, 2026 10:56
@solnic
solnic marked this pull request as ready for review October 14, 2026 11:14

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

@solnic
solnic force-pushed the chore/3119-switch-activejob-integration-to-the-backend-extension-registry branch from 0921325 to 0411b4d Compare October 14, 2026 11:42
@solnic
solnic removed this pull request from stack #3135 October 14, 2026 11:44
@solnic
solnic changed the base branch from feat/3117-public-backend-extension-registry-for-background-job-integrations to chore/3121-queues-module-conformance-improvements October 14, 2026 11:44
@solnic
solnic added this pull request to stack #3137 October 14, 2026 11:44
@solnic
solnic marked this pull request as draft October 15, 2026 08:25
@solnic
solnic force-pushed the chore/3119-switch-activejob-integration-to-the-backend-extension-registry branch from 0411b4d to ff06d8b Compare October 15, 2026 08:27
@solnic
solnic force-pushed the chore/3119-switch-activejob-integration-to-the-backend-extension-registry branch from ff06d8b to db6e8f6 Compare October 15, 2026 08:32
@solnic
solnic force-pushed the chore/3119-switch-activejob-integration-to-the-backend-extension-registry branch 3 times, most recently from c50b6dd to f9b1dda Compare October 15, 2026 10:20
@solnic
solnic force-pushed the chore/3119-switch-activejob-integration-to-the-backend-extension-registry branch from f9b1dda to 35d5037 Compare October 15, 2026 10:44
@solnic
solnic force-pushed the chore/3119-switch-activejob-integration-to-the-backend-extension-registry branch 2 times, most recently from 053d1df to ada3fa2 Compare October 23, 2026 11:49
@solnic solnic changed the title feat(rails): delegate ActiveJob to backend extensions feat(rails): run ActiveJob reporting through job extensions Nov 2, 2026
@solnic
solnic force-pushed the chore/3119-switch-activejob-integration-to-the-backend-extension-registry branch from ada3fa2 to 794f9e6 Compare November 2, 2026 15:56
@solnic
solnic marked this pull request as draft November 2, 2026 15:58
@solnic
solnic force-pushed the chore/3119-switch-activejob-integration-to-the-backend-extension-registry branch 2 times, most recently from c2a7302 to c675cb8 Compare November 2, 2026 16:45
@solnic
solnic force-pushed the chore/3119-switch-activejob-integration-to-the-backend-extension-registry branch from c675cb8 to fe10802 Compare November 3, 2026 09:19
@solnic
solnic force-pushed the chore/3119-switch-activejob-integration-to-the-backend-extension-registry branch 2 times, most recently from 7731c01 to 8429ff3 Compare November 3, 2026 12:01
@solnic
solnic force-pushed the chore/3119-switch-activejob-integration-to-the-backend-extension-registry branch from 9ede876 to 65c56c8 Compare November 3, 2026 14:46
@solnic
solnic marked this pull request as ready for review November 3, 2026 14:54
@solnic
solnic force-pushed the chore/3119-switch-activejob-integration-to-the-backend-extension-registry branch from 65c56c8 to 7678e20 Compare November 4, 2026 10:23
@solnic
solnic force-pushed the chore/3119-switch-activejob-integration-to-the-backend-extension-registry branch from 7678e20 to 4878f63 Compare November 4, 2026 10:26
@solnic
solnic force-pushed the chore/3119-switch-activejob-integration-to-the-backend-extension-registry branch from 4878f63 to c5e0f5f Compare November 4, 2026 10:52
@solnic
solnic force-pushed the chore/3119-switch-activejob-integration-to-the-backend-extension-registry branch from c5e0f5f to c45c2e8 Compare November 4, 2026 11:40

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 3341b0d. Configure here.

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.

Switch ActiveJob integration to the backend-extension registry

2 participants