-
Notifications
You must be signed in to change notification settings - Fork 53
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
feat: adding option to omit anonymous contexts in identify and index events #287
feat: adding option to omit anonymous contexts in identify and index events #287
Conversation
@@ -77,6 +78,7 @@ def initialize(opts = {}) | |||
@application = LaunchDarkly::Impl::Util.validate_application_info(opts[:application] || {}, @logger) | |||
@payload_filter_key = opts[:payload_filter_key] | |||
@hooks = (opts[:hooks] || []).keep_if { |hook| hook.is_a? Interfaces::Hooks::Hook } | |||
@omit_anonymous_contexts = opts.has_key?(:omit_anonymous_contexts) && opts[:omit_anonymous_contexts] |
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.
Should it follow same pattern of other boolean config options like on line 63?
opts.has_key?(:offline) ? opts[:offline] : Config.default_offline
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 question - I am trying to follow the pattern in line 71, but I don't know which one is more Ruby-ish
@diagnostic_opt_out = opts.has_key?(:diagnostic_opt_out) && opts[:diagnostic_opt_out]
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.
I am inclined to think it probably doesn't matter much, and if it does we could clean them both up after.
…github.com:launchdarkly/ruby-server-sdk into lc/sc-245755/adding-option-omit-anonymous-contexts
🤖 I have created a release *beep* *boop* --- ## [8.6.0](8.5.0...8.6.0) (2024-06-26) ### Features * adding option to omit anonymous contexts in identify and index events ([#287](#287)) ([554f965](554f965)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
From investigation, LaunchDarkly thinks we don't need these events to support any existing LaunchDarkly features. However, customers may depend on this behavior for data export, so instead of fully remove the identify and index events for anonymous context, we added a new option to the SDK to control this behavior.