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

Reduce logging from DfE::Analytics::SendEvent #7466

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ddippolito
Copy link
Contributor

Trello card URL

https://trello.com/c/ztsBOi77/1552-reduce-logging-from-worker-jobs

Changes in this PR:

Previously, our filter was checking for:

config.rails_semantic_logger.filter = proc { |log| log.name != "DfE::Analytics::SendEvents" }

But it seems the message in Logit has Rails set for the log.name, and that's probably preventing the log from being silenced. This changes the filter so that we can silence for the correct parameter.

You can see part of the JSON of the event being sent here:

"app": {
      "message": "Performed DfE::Analytics::SendEvents (Job ID: acf104ad-a91a-409b-bdb6-f4463403d6a7) to Sidekiq(default) in 15.01ms",
      "payload": {
        "provider_job_id": "ef550c408046c6901c059441",
        "job_id": "acf104ad-a91a-409b-bdb6-f4463403d6a7",
        "params_json": "null",
        "queue": "default",
        "event_name": "perform.active_job",
        "duration": 15.01,
        "arguments": "",
        "adapter": "Sidekiq",
        "job_class": "DfE::Analytics::SendEvents"
      },
      "name": "Rails",
      "application": "",
      "environment": "production",
    },

Copy link

Review app deployed to https://teaching-vacancies-review-pr-7466.test.teacherservices.cloud on AKS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant