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

feat: adding option to omit anonymous contexts in identify and index events #287

Merged

Conversation

louis-launchdarkly
Copy link
Contributor

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.

@louis-launchdarkly louis-launchdarkly requested a review from a team June 26, 2024 00:40
@@ -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]
Copy link
Contributor

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

Copy link
Contributor Author

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]

Copy link
Member

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
@louis-launchdarkly louis-launchdarkly merged commit 554f965 into main Jun 26, 2024
6 checks passed
@louis-launchdarkly louis-launchdarkly deleted the lc/sc-245755/adding-option-omit-anonymous-contexts branch June 26, 2024 18:01
louis-launchdarkly pushed a commit that referenced this pull request Jun 26, 2024
🤖 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>
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.

4 participants