Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instrument resque without forking #514

Merged
merged 12 commits into from
Dec 23, 2024
Merged

Conversation

mitchh456
Copy link
Contributor

@mitchh456 mitchh456 commented Dec 6, 2024

  • Inject ourselves into Resque::Job's payload_class method upon initial setup so we don't rely on after_fork, which doesn't execute when FORK_PER_JOB=false.
  • Conditionally become_remote_client in instrumentation just like we start_remote_server based on start_resque_server_instrument config value. Also skip remote client if FORK_PER_JOB=false.
    • if FORK_PER_JOB=false, the remote server/client recording is unnecessary and actually (silently) breaks it.

@mitchh456 mitchh456 force-pushed the instrument-resque-without-fork branch from 1c390d0 to 81fc9b8 Compare December 20, 2024 13:38
@mitchh456 mitchh456 force-pushed the instrument-resque-without-fork branch from 81fc9b8 to a718950 Compare December 23, 2024 13:31
@mitchh456 mitchh456 merged commit 6a3133e into master Dec 23, 2024
30 checks passed
@mitchh456 mitchh456 deleted the instrument-resque-without-fork branch December 23, 2024 16:07
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.

2 participants