diff --git a/CHANGELOG.md b/CHANGELOG.md index 438e90e8..31cfa23c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - fix(sveltekit): Create bundler plugin env file instead of sentryclirc (#675) - fix(check-sdk-version): update sentry sdk packages (#676) +- feat(telemetry): Add telemetry for org and project CLI argument usage (#677) ## 3.30.0 diff --git a/src/android/android-wizard.ts b/src/android/android-wizard.ts index dae55f7a..eb2e4ab8 100644 --- a/src/android/android-wizard.ts +++ b/src/android/android-wizard.ts @@ -30,6 +30,7 @@ export async function runAndroidWizard(options: WizardOptions): Promise { { enabled: options.telemetryEnabled, integration: 'android', + wizardOptions: options, }, () => runAndroidWizardWithTelemetry(options), ); diff --git a/src/apple/apple-wizard.ts b/src/apple/apple-wizard.ts index a9800939..833c9a97 100644 --- a/src/apple/apple-wizard.ts +++ b/src/apple/apple-wizard.ts @@ -34,6 +34,7 @@ export async function runAppleWizard(options: WizardOptions): Promise { { enabled: options.telemetryEnabled, integration: 'ios', + wizardOptions: options, }, () => runAppleWizardWithTelementry(options), ); diff --git a/src/nextjs/nextjs-wizard.ts b/src/nextjs/nextjs-wizard.ts index e9b24894..136f5ea5 100644 --- a/src/nextjs/nextjs-wizard.ts +++ b/src/nextjs/nextjs-wizard.ts @@ -55,6 +55,7 @@ export function runNextjsWizard(options: WizardOptions) { { enabled: options.telemetryEnabled, integration: 'nextjs', + wizardOptions: options, }, () => runNextjsWizardWithTelemetry(options), ); diff --git a/src/react-native/react-native-wizard.ts b/src/react-native/react-native-wizard.ts index 2d81aec7..791a47f0 100644 --- a/src/react-native/react-native-wizard.ts +++ b/src/react-native/react-native-wizard.ts @@ -96,6 +96,7 @@ export async function runReactNativeWizard( { enabled: params.telemetryEnabled, integration: 'react-native', + wizardOptions: params, }, () => runReactNativeWizardWithTelemetry(params), ); diff --git a/src/remix/remix-wizard.ts b/src/remix/remix-wizard.ts index aa2c38c7..5aced0de 100644 --- a/src/remix/remix-wizard.ts +++ b/src/remix/remix-wizard.ts @@ -43,6 +43,7 @@ export async function runRemixWizard(options: WizardOptions): Promise { { enabled: options.telemetryEnabled, integration: 'remix', + wizardOptions: options, }, () => runRemixWizardWithTelemetry(options), ); diff --git a/src/sourcemaps/sourcemaps-wizard.ts b/src/sourcemaps/sourcemaps-wizard.ts index 1d478e3a..0011e8ef 100644 --- a/src/sourcemaps/sourcemaps-wizard.ts +++ b/src/sourcemaps/sourcemaps-wizard.ts @@ -39,6 +39,7 @@ export async function runSourcemapsWizard( { enabled: options.telemetryEnabled, integration: 'sourcemaps', + wizardOptions: options, }, () => runSourcemapsWizardWithTelemetry(options), ); diff --git a/src/sveltekit/sveltekit-wizard.ts b/src/sveltekit/sveltekit-wizard.ts index 78233c5a..3017f518 100644 --- a/src/sveltekit/sveltekit-wizard.ts +++ b/src/sveltekit/sveltekit-wizard.ts @@ -32,6 +32,7 @@ export async function runSvelteKitWizard( { enabled: options.telemetryEnabled, integration: 'sveltekit', + wizardOptions: options, }, () => runSvelteKitWizardWithTelemetry(options), ); diff --git a/src/telemetry.ts b/src/telemetry.ts index 8f328d82..2b0e401a 100644 --- a/src/telemetry.ts +++ b/src/telemetry.ts @@ -11,11 +11,13 @@ import { flush, } from '@sentry/node'; import packageJson from '../package.json'; +import { WizardOptions } from './utils/types'; export async function withTelemetry( options: { enabled: boolean; integration: string; + wizardOptions: WizardOptions; }, callback: () => F | Promise, ): Promise { @@ -29,6 +31,10 @@ export async function withTelemetry( const sentrySession = sentryHub.startSession(); sentryHub.captureSession(); + // Set tag for passed CLI args + sentryHub.setTag('args.project', !!options.wizardOptions.projectSlug); + sentryHub.setTag('args.org', !!options.wizardOptions.orgSlug); + try { return await startSpan( {