Skip to content

Conversation

@guilleasz-crossmint
Copy link
Contributor

Description

Adds an optional loggingConsent boolean property to CrossmintConfig that controls whether Datadog logging sinks are initialized. When loggingConsent is not set or is false, the SDK will not initialize Datadog logging. Only when loggingConsent === true will the Datadog sinks be added to the logger.

This change affects:

  • React base SDK (@crossmint/client-sdk-react-base)
  • React Native SDK (@crossmint/client-sdk-react-native-ui)
  • Wallets SDK (@crossmint/wallets-sdk)

Important behavioral change: Previously, Datadog logging was always initialized. Now it requires explicit opt-in via loggingConsent: true.

Human review checklist:

  • Verify the default behavior change (logging disabled by default) is the intended requirement
  • Confirm all logger initialization paths have been updated consistently
  • Check if any other packages also initialize loggers that need this change

Test plan

  • Manual verification that logger initialization respects the loggingConsent flag
  • Existing unit tests should continue to pass (no breaking API changes, only behavioral)

Package updates

The following packages are affected:

  • @crossmint/common-sdk-base
  • @crossmint/client-sdk-react-base
  • @crossmint/client-sdk-react-native-ui
  • @crossmint/wallets-sdk

Changesets need to be added via pnpm change:add.


Link to Devin run: https://app.devin.ai/sessions/9db5b04fc72b4917a805252a8e42bb79
Requested by: Guille (guille.a@paella.dev) (@guilleasz-crossmint)

- Add optional loggingConsent boolean to CrossmintConfig type
- Update logger initialization to only add Datadog sinks when loggingConsent is true
- Update React base, React Native, and wallets SDK logger init functions
- Pass loggingConsent through providers to logger initialization

Co-Authored-By: Guille <guille.a@paella.dev>
@changeset-bot
Copy link

changeset-bot bot commented Dec 17, 2025

⚠️ No Changeset found

Latest commit: 2305e27

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@devin-ai-integration
Copy link
Contributor

Original prompt from Guille
@Devin add to the sdk CrossmintConfig an optional property `loggingConsent`  as a boolean, in all packages where the logger is being initialized confirm the loggingConsent is equal to true before initializing.
Thread URL: https://crossmint.slack.com/archives/D085SCF9469/p1765961971099889

@devin-ai-integration
Copy link
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

- Pass loggingConsent to initReactLogger and BaseCrossmintProvider
- Ensure loggingConsent is properly propagated through the provider chain

Co-Authored-By: Guille <guille.a@paella.dev>
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.

2 participants