Add Explicit Remote Logging Permission to SDK #42
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request implements a new setting to our SDK, which allows users to explicitly set if they want to allow our SDK to send diagnostics logs to DataDog. This has been implemented to comply with GDPR regulations, ensuring that we only send information to DataDog when the user has consented
Breaking Change
A new required
trackingConsentparameter has been added to SDK initialization. All existing integrations must be updated to pass a consent status when initializing the SDK instance:Consent Levels
There are three levels of consent that users can set:
.pending- SDK collects and batches data but doesn't send it to remote endpoints.granted- SDK collects and sends data to remote logging endpoints.notGranted- SDK doesn't collect any data for remote loggingNote: This only affects remote DataDog logging. Local logs sent through Swift's os.log continue to work regardless of the tracking consent setting, so messages are still displayed on Xcode's console
Updating Consent
It's also possible to update the consent status after initializing the SDK:
When updating consent:
.pending→.grantedsends all batched data to DataDog.pending→.notGrantedwipes all batched data