Skip to content

Conversation

@Lms24
Copy link
Member

@Lms24 Lms24 commented Nov 15, 2022

This PR turns telemetry off for self-hosted users, meaning that the plugin will only send Sentry events to Sentry.io if the URL used in the plugin (i.e. where sourcemaps are uploaded to) is sentry.io.

Unfortunately, this isn't entirely straight forward. Sentry-CLI will read a config file (.sentryclirc) if it finds one. Either in the directory of a global CLI installation (default behaviour) or if a path to a config file was specified via the configFile option. At option conversion time, we therefore don't know exactly yet, if the plugin is used for SaaS or self-hosted. We can only check the url option and SENTRY_URL env variable to make a first decision.

Only at a later time, we can make a call to Sentry-CLI (with the info) command which returns us the used Sentry server URL. At this point we can finally definitely make the call to leave telemetry running for SaaS or turn sending off for self-hosted.

Note that I had to remove a call to Sentry for options validation which would until now have sent an error to Sentry in case of a validation error. However, given that this is mostly a user-facing config problem, I think we're not missing out on important data.

resolves #99

@Lms24 Lms24 changed the base branch from main to lms-bump-sentry November 15, 2022 12:57
@Lms24 Lms24 requested review from lforst and mydea November 15, 2022 12:57
Base automatically changed from lms-bump-sentry to main November 15, 2022 13:23
@Lms24 Lms24 force-pushed the lms-telemetry-selfhosted branch from 14cf90d to 674ccbe Compare November 15, 2022 13:32
@Lms24 Lms24 enabled auto-merge (squash) November 15, 2022 13:32
@Lms24 Lms24 merged commit 297f508 into main Nov 15, 2022
@Lms24 Lms24 deleted the lms-telemetry-selfhosted branch November 15, 2022 13:39
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.

Revisit telemetry option and only send minimal information to Sentry

4 participants