Skip to content

feat(astro): Add opt-out support for SDK telemetry - #3808

Merged
LekoArts merged 2 commits into
mainfrom
rob/eco-65-opt-out-of-telemetry-in-clerkastro
Jul 25, 2024
Merged

feat(astro): Add opt-out support for SDK telemetry#3808
LekoArts merged 2 commits into
mainfrom
rob/eco-65-opt-out-of-telemetry-in-clerkastro

Conversation

@wobsoriano

Copy link
Copy Markdown
Member

Description

Adds opt-out support to the TelemetryCollector by passing an option to the integration or with environment variables similar to existing frameworks.

Fixes ECO-65

Checklist

  • npm test runs as expected.
  • npm run build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

@changeset-bot

changeset-bot Bot commented Jul 24, 2024

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 6673e84

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@clerk/astro Patch

Not sure what this means? Click here to learn what changesets are.

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

Comment on lines +27 to +30
telemetry: paramTelemetry || {
disabled: isTruthy(import.meta.env.PUBLIC_CLERK_TELEMETRY_DISABLED),
debug: isTruthy(import.meta.env.PUBLIC_CLERK_TELEMETRY_DEBUG),
},

@wobsoriano wobsoriano Jul 24, 2024

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This gets passed to Clerk.load() function

clerkJsVersion: getContextEnvVar('PUBLIC_CLERK_JS_VERSION', context),
apiVersion: getContextEnvVar('CLERK_API_VERSION', context),
apiUrl: getContextEnvVar('CLERK_API_URL', context),
telemetryDisabled: isTruthy(getContextEnvVar('PUBLIC_CLERK_TELEMETRY_DISABLED', context)),

@wobsoriano wobsoriano Jul 24, 2024

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for the createClerkClient function

@wobsoriano
wobsoriano marked this pull request as ready for review July 24, 2024 20:08
@LekoArts
LekoArts merged commit cfeb5dd into main Jul 25, 2024
@LekoArts
LekoArts deleted the rob/eco-65-opt-out-of-telemetry-in-clerkastro branch July 25, 2024 08:12
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.

3 participants