Skip to content

Commit 066d506

Browse files
committed
move telemetry option
1 parent a30b3e2 commit 066d506

File tree

2 files changed

+11
-18
lines changed

2 files changed

+11
-18
lines changed

packages/react-router/src/vite/makeCustomSentryVitePlugins.ts

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,16 @@ import type { SentryReactRouterBuildOptions } from './types';
66
* Create a custom subset of sentry's vite plugins
77
*/
88
export async function makeCustomSentryVitePlugins(options: SentryReactRouterBuildOptions): Promise<Plugin[]> {
9-
const {
10-
debug,
11-
sourceMapsUploadOptions,
12-
unstable_sentryVitePluginOptions,
13-
bundleSizeOptimizations,
14-
authToken,
15-
org,
16-
project,
17-
} = options;
9+
const { debug, unstable_sentryVitePluginOptions, bundleSizeOptimizations, authToken, org, project, telemetry } =
10+
options;
1811

1912
const sentryVitePlugins = sentryVitePlugin({
2013
authToken: authToken ?? process.env.SENTRY_AUTH_TOKEN,
2114
bundleSizeOptimizations,
2215
debug: debug ?? false,
2316
org: org ?? process.env.SENTRY_ORG,
2417
project: project ?? process.env.SENTRY_PROJECT,
25-
telemetry: sourceMapsUploadOptions?.telemetry ?? true,
18+
telemetry: telemetry ?? true,
2619
_metaOptions: {
2720
telemetry: {
2821
metaFramework: 'react-router',

packages/react-router/src/vite/types.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,6 @@ type SourceMapsOptions = {
99
*/
1010
enabled?: boolean;
1111

12-
/**
13-
* If this flag is `true`, the Sentry plugin will collect some telemetry data and send it to Sentry.
14-
* It will not collect any sensitive or user-specific data.
15-
*
16-
* @default true
17-
*/
18-
telemetry?: boolean;
19-
2012
/**
2113
* A glob or an array of globs that specifies the build artifacts that should be deleted after the artifact
2214
* upload to Sentry has been completed.
@@ -139,6 +131,14 @@ export type SentryReactRouterBuildOptions = {
139131
*/
140132
sourceMapsUploadOptions?: SourceMapsOptions;
141133

134+
/**
135+
* If this flag is `true`, the Sentry plugin will collect some telemetry data and send it to Sentry.
136+
* It will not collect any sensitive or user-specific data.
137+
*
138+
* @default true
139+
*/
140+
telemetry?: boolean;
141+
142142
/**
143143
* Options to further customize the Sentry Vite Plugin (@sentry/vite-plugin) behavior directly.
144144
* Options specified in this object take precedence over the options specified in

0 commit comments

Comments
 (0)