-
Notifications
You must be signed in to change notification settings - Fork 374
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
Add cache_key.enabled
option for ActiveSupport
#4022
Conversation
BenchmarksBenchmark execution time: 2024-11-29 20:06:00 Comparing candidate commit 3c24e29 in PR branch Found 0 performance improvements and 1 performance regressions! Performance is the same for 30 metrics, 2 unstable metrics. scenario:profiler - sample timeline=false
|
8049a04
to
e8188fc
Compare
lib/datadog/tracing/contrib/active_support/cache/events/cache.rb
Outdated
Show resolved
Hide resolved
lib/datadog/tracing/contrib/active_support/cache/instrumentation.rb
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! Clean and well tested 👍
I thing that is missing is the public facing documentation, at https://github.com/DataDog/dd-trace-rb/blob/master/docs/GettingStarted.md#active-support.
(I guess this is related to #4017 ?) |
Yes it is @ivoanjo! I posted in the slack channel some context surrounding this I didn't link to it yet as this was just a draft and was waiting to determine whether or not this is something acceptable to do within the Ruby Datadog SDK or if the expected solution would be to add obfuscation rules to this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall the implementation is clean! I do have one suggestion for the public API, I think should be weighed before we merge.
lib/datadog/tracing/contrib/active_support/configuration/settings.rb
Outdated
Show resolved
Hide resolved
45ef5e6
to
d90c4f7
Compare
Datadog ReportBranch report: ✅ 0 Failed, 22050 Passed, 1461 Skipped, 5m 23.17s Total Time |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4022 +/- ##
==========================================
- Coverage 97.76% 97.75% -0.01%
==========================================
Files 1351 1351
Lines 81733 81845 +112
Branches 4147 4150 +3
==========================================
+ Hits 79904 80009 +105
- Misses 1829 1836 +7 ☔ View full report in Codecov by Sentry. |
d90c4f7
to
2933c34
Compare
cache_key_enabled
option for ActiveSupportcache_key.enabled
option for ActiveSupport
Hey @bouwkast thoughts on merging this in? Looks like a nice improvement |
I was out on PTO, looked like I just had a couple of conversations that needed to be resolved for it to be merged, so did that |
No worries! I was doing a big clean-up and leaving a similar comment on PRs I saw in good shape :D |
Change log entry
Adds a new option for
ActiveSupport
to disable adding thecache_key
as a Span Tag with thecache_key_enabled
option.What does this PR do?
cache_key.enabled
toActiveSupport
(defaults to true)cache_key.enabled
isfalse
it will no longer set thecache_key
as a Span TagMotivation:
Customer feature request #4017
Additional Notes:
I have basic grasp on Ruby.
An alternative here is to obfuscate/quantize
cache_key
values when we add them, the issue here is I'm not entirely sure what these values would look like and if they'd be valuable if they were obfuscated/quantized.How to test the change?
Unsure? Have a question? Request a review!