Skip to content

Commit

Permalink
Refactor Resque parameters storage (#1292)
Browse files Browse the repository at this point in the history
The Resque integration is sanitizing the parameters. This is already
done in the Transaction class, so we don't need to do it again in the
integration.

Move the value being set to a block, so the parameters are only fetched
when the transaction is sampled.

[skip changeset]
  • Loading branch information
tombruijn committed Sep 12, 2024
1 parent 0b41476 commit d1fbd83
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions lib/appsignal/integrations/resque.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,7 @@ def perform
ensure
if transaction
transaction.set_action_if_nil("#{payload["class"]}#perform")
args =
Appsignal::Utils::HashSanitizer.sanitize(
ResqueHelpers.arguments(payload),
Appsignal.config[:filter_parameters]
)
transaction.add_params_if_nil(args)
transaction.add_params_if_nil { ResqueHelpers.arguments(payload) }
transaction.add_tags("queue" => queue)

Appsignal::Transaction.complete_current!
Expand Down

0 comments on commit d1fbd83

Please sign in to comment.