Skip to content

Respect log_arguments = false in ActiveJob #1487

Description

@goranMR

AppSignal currently collects ActiveJob arguments for error and performance events even when a job is configured with log_arguments = false. This can cause sensitive data to appear in AppSignal despite Rails being explicitly configured not to log them.

This enhancement proposes that AppSignal respects log_arguments = false when instrumenting ActiveJob, both when it is configured globally (e.g. on ApplicationJob) and per job class.

This is problematic for jobs like ActionMailer::MailDeliveryJob and DeviseMailers as they could use plain string arguments, which cannot be filtered using filter_parameters.

Intercom

Proposed behavior

When instrumenting ActiveJob, we should check the job’s effective log_arguments setting (including inherited values). If job.class.log_arguments == false, job arguments should not be collected or reported (or should be replaced with [FILTERED])

This behavior should apply:

  • when log_arguments is set globally on ApplicationJob
  • when it is set on individual ActiveJob classes

Acceptance criteria:

  • ActiveJob arguments are not collected or displayed when log_arguments = false
  • Both global (ApplicationJob) and per-job configurations are respected

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    choreA small task that takes a day or two at the most.featureA new feature for this component.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions