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

Sidekiq args filtration #2177

Merged
merged 17 commits into from
Aug 30, 2023
Merged

Sidekiq args filtration #2177

merged 17 commits into from
Aug 30, 2023

Conversation

fallwith
Copy link
Contributor

Attribute pre-filtering, Sidekiq args filtering

  • Added pre-filtering logic to the Attribute::Processing class,
    currently used only by Sidekiq
  • Added new sidekiq.args.include and sidekiq.args.exclude
    configuration options to permit the capturing of a subset of Sidekiq
    job arguments
  • Rewrote all existing Sidekiq multiverse tests. The suite should now
    complete in ~4 seconds instead of 32 and doesn't require Mocha.

- Added pre-filtering logic to the `Attribute::Processing` class,
  currently used only by Sidekiq
- Added new `sidekiq.args.include` and `sidekiq.args.exclude`
  configuration options to permit the capturing of a subset of Sidekiq
  job arguments
- Rewrote all existing Sidekiq multiverse tests. The suite should now
  complete in ~4 seconds instead of 32 and doesn't require Mocha.
explain `sidekiq.args.include` and `sidekiq.args.exclude` in
`CHANGELOG.md`
We don't typically break up the description lines, but our RuboCop todo
file has a threshold of the longest known line so let's not break that
threshold.
@fallwith
Copy link
Contributor Author

resolves #2150

@fallwith
Copy link
Contributor Author

@fallwith fallwith linked an issue Aug 28, 2023 that may be closed by this pull request
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
lib/new_relic/agent/configuration/default_source.rb Outdated Show resolved Hide resolved
fallwith and others added 3 commits August 29, 2023 11:35
Sidekiq args CHANGELOG entry grammar and typo fixes

Co-authored-by: Kayla Reopelle (she/her) <87386821+kaylareopelle@users.noreply.github.com>
Sidekiq args CHANGELOG entry improvements

Co-authored-by: Kayla Reopelle (she/her) <87386821+kaylareopelle@users.noreply.github.com>
We already use "capture" so stick with that instead of saying something
along the lines of "sent to New Relic".
fallwith and others added 3 commits August 29, 2023 11:52
Sidekiq arg capturing entry wording fix

Co-authored-by: Kayla Reopelle (she/her) <87386821+kaylareopelle@users.noreply.github.com>
Sidekiq arg capturing entry: specify YAML as the syntax to use for the newrelic.yml code block

Co-authored-by: Kayla Reopelle (she/her) <87386821+kaylareopelle@users.noreply.github.com>
Update the CHANGELOG entry for Sidekiq args filtration to more clearly
explain regexp, link to RubyDocs for regexp, and explain inexact
matches.
Sidekiq args filtering - in `default_source.rb`, use `dynamic_name:
true`, and use heredocs for the descriptions.

By using `dynamic_name: true`, we don't have to have an ignore list for
config scanning.
remove junk that was accidentally added
Given that the existing attributing processing methods and the new
attribute pre-filtering methods don't share any content or logic, have
the pre-filtering methods live in a separate dedicated
`AttributePreFiltering` class.
CHANGELOG.md Outdated Show resolved Hide resolved
lib/new_relic/agent/configuration/default_source.rb Outdated Show resolved Hide resolved
lib/new_relic/agent/configuration/default_source.rb Outdated Show resolved Hide resolved
test/new_relic/agent/attribute_pre_filtering_test.rb Outdated Show resolved Hide resolved
fallwith and others added 4 commits August 30, 2023 11:34
SIdekiq args filtering entry: "has" -> "hash" typo fix

Co-authored-by: Kayla Reopelle (she/her) <87386821+kaylareopelle@users.noreply.github.com>
sidekiq.args.include description text updates

Co-authored-by: Kayla Reopelle (she/her) <87386821+kaylareopelle@users.noreply.github.com>
sidekiq.args.exclude description text updates

Co-authored-by: Kayla Reopelle (she/her) <87386821+kaylareopelle@users.noreply.github.com>
the "without exclude" test should actually operate without an exclude
list. thanks, @kaylareopelle
@github-actions
Copy link

SimpleCov Report

Coverage Threshold
Line 94.27% 94%
Branch 85.81% 85%

Copy link
Contributor

@kaylareopelle kaylareopelle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I appreciate your deep thought on this topic. Your work here could benefit many other agents. Great job!

@fallwith fallwith merged commit c388203 into dev Aug 30, 2023
25 checks passed
@fallwith fallwith deleted the sidekiq_args_filtration branch August 30, 2023 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add filtering capabilities for Sidekiq job argument collection
4 participants