-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from instrumentl/feat_sidekiq
feat(sidekiq): add a Sidekiq Server middleware for sampling
- Loading branch information
Showing
2 changed files
with
21 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
module ScoutApm | ||
module Sampling | ||
module Sidekiq | ||
include Callbacks | ||
|
||
class ServerMiddleware | ||
# @param [Object] worker the worker instance | ||
# @param [Hash] job the full job payload | ||
# * @see https://github.com/mperham/sidekiq/wiki/Job-Format | ||
# @param [String] queue the name of the queue the job was pulled from | ||
# @yield the next middleware in the chain or worker `perform` method | ||
# @return [Void] | ||
def call(worker, job, queue) | ||
sample_workers_for_scout | ||
yield | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
module ScoutApm | ||
module Sampling | ||
VERSION = "3.0.0".freeze | ||
VERSION = "3.0.1".freeze | ||
end | ||
end |