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

Dynamically adjusting configuration not intuitive since migrated to a struct #201

Open
Jeehut opened this issue Nov 5, 2024 · 0 comments · May be fixed by #206
Open

Dynamically adjusting configuration not intuitive since migrated to a struct #201

Jeehut opened this issue Nov 5, 2024 · 0 comments · May be fixed by #206
Assignees

Comments

@Jeehut
Copy link
Contributor

Jeehut commented Nov 5, 2024

A user has recently reported that they would like to dynamically disable TelemetryDeck based on user configuration changes. But with the recent change of the configuration to being a struct, a new call to TelemetryDeck.initialize needs to be made to adjust the configuration, because it's no longer a reference type which can be changed from anywhere. While that has been a potential thread-unsafety issue, we should provide a simpler API to make these kinds of adjustments anywhere where dynamically changing the configuration options makes sense. For example, we could simply turn the analyticsDisabled bool into a sendable closure that returns a bool, similar to the new defaultParameters. This makes the setting dynamic while being thread-safe.

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 a pull request may close this issue.

1 participant