Repository navigation
Add support for Solid Queue - #1623
Merged
Merged
Conversation
|
💚 CLA has been signed |
Contributor
Author
Already signed |
lairtonmendes
commented
Jun 7, 2026
lairtonmendes
force-pushed
the
feat/solid-queue-spy
branch
from
June 7, 2026 15:28
c9622e2 to
446ce28
Compare
smith
previously approved these changes
Aug 5, 2026
smith
left a comment
Contributor
There was a problem hiding this comment.
Tested on latest rails and works as described.
smith
enabled auto-merge (squash)
August 5, 2026 17:53
trentm
reviewed
Aug 5, 2026
auto-merge was automatically disabled
August 6, 2026 00:16
Head branch was pushed to by a user without write access
trentm
approved these changes
Aug 6, 2026
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.
What does this pull request do?
Adds support for Solid Queue, the
Active Record–backed queue adapter that became the default in Rails 8.
The new spy instruments
SolidQueue::ClaimedExecution#performand produces one APM transaction per job:transaction.name= the job's class name (the wrapped ActiveJob)transaction.type=SolidQueue:queue= the queue the job was claimed fromElasticAPM.reportand mark the transactionoutcome=failureImplementation notes worth surfacing for review:
SolidQueue::ClaimedExecutionlives underapp/modelsand is autoloaded by the Rails engine via Zeitwerk, so the spies'Kernel.requirehook never fires. The prepend is installed insideRails.application.reloader.to_prepare, which both delays installation until the engine's autoload paths are in place and re-applies the patch after dev-mode reloads.Agent#detect_forking!, which runs on everystart_transaction/start_span/reportand rebuilds the agent's background threads in the forked child. No spy-side lifecycle hooks are needed.Gemfilegatesgem 'solid_queue'to Rails ≥ 7.1 so the older Rails matrix entries keep resolving.Why is it important?
Solid Queue is the default Active Job adapter in Rails 8 and is the queue shipped by
rails newfor every new Rails app from 8.0 onward. Without this instrumentation, jobs executed by solid_queue produce no APM transactions, leaving an entire class of work invisible in Kibana.Checklist
rubocopclean on the new files)spec/elastic_apm/spies/solid_queue_spec.rb, 6 examples covering success, failure, queue label, multi-perform, prepend, and graceful no-op when agent is not running)bundle exec rspec spec/elastic_apm/spies/→ 110 examples, 0 failures)docs/release-notes/index.mddocs/reference/supported-technologies.mdVerification
End-to-end smoke test against a Rails 8.1 app using
solid_queueas theActive Job adapter, with traces captured by a mock APM server:
Agent#detect_forking!.Related issues
N/A