-
-
Notifications
You must be signed in to change notification settings - Fork 523
Optimize LogEvent to reduce memory consumption #2643
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2643 +/- ##
==========================================
+ Coverage 93.68% 96.70% +3.01%
==========================================
Files 133 133
Lines 5101 5131 +30
==========================================
+ Hits 4779 4962 +183
+ Misses 322 169 -153
🚀 New features to boost your workflow:
|
09006fa to
ecfe433
Compare
sentry-ruby/lib/sentry/log_event.rb
Outdated
| { value: value, type: value_type(value) } | ||
| end | ||
|
|
||
| VALUE_TYPES = Hash.new("string").merge!({ |
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.
Gotta be careful when using the default value
$ irb
irb(main):001> a = Hash.new("string")
=> {}
irb(main):002> a["foo"]
=> "string"
irb(main):003> a["bar"] << "bar"
=> "stringbar"
irb(main):004> a["foo"]
=> "stringbar"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.
@solnic 🙏
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.
@dentarg @sl0thentr0py I believe we're good since there's frozen string literals magic comment at the top of this file.
Current status
Closes #2641