Skip to content

Respect activejob log arguments per library rebased - #1506

Closed
tombruijn wants to merge 4 commits into
mainfrom
respect-activejob-log-arguments-per-library-rebased
Closed

Respect activejob log arguments per library rebased#1506
tombruijn wants to merge 4 commits into
mainfrom
respect-activejob-log-arguments-per-library-rebased

Conversation

@tombruijn

@tombruijn tombruijn commented Mar 30, 2026

Copy link
Copy Markdown
Member

Test PR, ignore.

jvanbaarsen and others added 4 commits March 30, 2026 18:27
When an ActiveJob class has log_arguments set to false, AppSignal now
skips collecting job arguments for that transaction. This prevents
sensitive data from appearing in AppSignal when Rails is explicitly
configured not to log them.

This applies when log_arguments is set:
- Directly on a job class (e.g. self.log_arguments = false)
- On a parent class (e.g. ApplicationJob), inherited by subclasses

The implementation adds a log_arguments? helper that resolves the job
class from the serialized job data and checks the class-level
log_arguments? setting. It defaults to true (collect arguments) when
the class cannot be resolved or does not support the method, ensuring
backward compatibility.

Closes #1487
Guard the log_arguments tests with a Rails 6.1+ version check
since the log_arguments class attribute was introduced in
Rails 6.1. Add a test that verifies fallback behavior when
log_arguments? is not supported by the job class.

Fixes #1487
Document the Lintje commit message rules so that AI
assistants follow the project's commit conventions.

[skip changeset]
Part of #1487
When a customer Configures ActiveJob `log_arguments` to be false, it
would not adhere to this in the other integrations like Sidekiq,
DelayedJob, etc.

Implemented this logic in Sidekiq so that it doesn't set the parameters
if they're unset on ActiveJob.
@tombruijn tombruijn added the chore A small task that takes a day or two at the most. label Mar 30, 2026
@tombruijn tombruijn self-assigned this Mar 30, 2026
@tombruijn tombruijn closed this Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore A small task that takes a day or two at the most.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants