Skip to content

Commit 51de4f0

Browse files
authored
feat: Setup Spotlight integration for local dev (#3787)
1 parent 39c5c50 commit 51de4f0

File tree

4 files changed

+104
-92
lines changed

4 files changed

+104
-92
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"@radix-ui/react-popover": "^1.0.6",
4343
"@radix-ui/react-radio-group": "^1.1.3",
4444
"@radix-ui/react-tooltip": "^1.1.2",
45-
"@sentry/react": "^9.0.1",
45+
"@sentry/react": "^9.3.0",
4646
"@stripe/react-stripe-js": "^3.1.1",
4747
"@stripe/stripe-js": "^5.6.0",
4848
"@tanstack/react-query": "^4.29.5",
@@ -94,7 +94,7 @@
9494
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
9595
"@chromatic-com/storybook": "^1",
9696
"@codecov/vite-plugin": "^1.9.0",
97-
"@sentry/vite-plugin": "^3.1.2",
97+
"@sentry/vite-plugin": "^3.2.1",
9898
"@storybook/addon-a11y": "^8.3.7",
9999
"@storybook/addon-actions": "^8.3.7",
100100
"@storybook/addon-essentials": "^8.3.7",

src/sentry.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,12 @@ export const setupSentry = ({
156156

157157
// Adds LaunchDarkly integration for feature flag tracking/errors
158158
Sentry.launchDarklyIntegration(),
159+
160+
// Conditionally adds Spotlight browser integration when in development mode
161+
// Note - you'll need to have a valid Sentry DSN to use this, and please set the SENTRY_ENVIRONMENT to your username or something unique
162+
...(config.NODE_ENV === 'development'
163+
? [Sentry.spotlightBrowserIntegration()]
164+
: []),
159165
],
160166
tracePropagationTargets,
161167
tracesSampleRate: config?.SENTRY_TRACING_SAMPLE_RATE,

vite.config.mjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,15 @@ export default defineConfig((config) => {
5959
return {
6060
server: {
6161
port: 3000,
62+
headers: {
63+
'Document-Policy': 'js-profiling',
64+
},
6265
},
6366
preview: {
6467
port: 3000,
68+
headers: {
69+
'Document-Policy': 'js-profiling',
70+
},
6571
},
6672
build: {
6773
outDir: 'build',

yarn.lock

Lines changed: 90 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -4270,140 +4270,140 @@ __metadata:
42704270
languageName: node
42714271
linkType: hard
42724272

4273-
"@sentry-internal/browser-utils@npm:9.0.1":
4274-
version: 9.0.1
4275-
resolution: "@sentry-internal/browser-utils@npm:9.0.1"
4273+
"@sentry-internal/browser-utils@npm:9.3.0":
4274+
version: 9.3.0
4275+
resolution: "@sentry-internal/browser-utils@npm:9.3.0"
42764276
dependencies:
4277-
"@sentry/core": "npm:9.0.1"
4278-
checksum: 10c0/99875efea6cf9bcbf4426677cc696200455d803ab4f4c1acf57ffd02548451dd09520bc21cf60eb16b54ef523d764706c1b3548ce690182af67e545d44172234
4277+
"@sentry/core": "npm:9.3.0"
4278+
checksum: 10c0/cd6930e0d49000f6211664b206f27a5cee32106f0febd490a745ca34c63225df824b9e08ca646910e252477bc82e5934d609b5359783590f64b4ba097135e0ad
42794279
languageName: node
42804280
linkType: hard
42814281

4282-
"@sentry-internal/feedback@npm:9.0.1":
4283-
version: 9.0.1
4284-
resolution: "@sentry-internal/feedback@npm:9.0.1"
4282+
"@sentry-internal/feedback@npm:9.3.0":
4283+
version: 9.3.0
4284+
resolution: "@sentry-internal/feedback@npm:9.3.0"
42854285
dependencies:
4286-
"@sentry/core": "npm:9.0.1"
4287-
checksum: 10c0/39150147212b7ab6f6cadb1b150af24342d72642eea23825f7a5d29baecf1683b1cc98db3692df24daa5e0615fb8c6ec8b7b6ebeee9ce3eee1dbe944416e689f
4286+
"@sentry/core": "npm:9.3.0"
4287+
checksum: 10c0/7e392b110fc687150a0bc6b9f25e6bfa442a9f6fee467a4439b828347a9d5957f2ddf1e7478b5bce2c148e4aa3c07680398d5b41179008834c70685162715fac
42884288
languageName: node
42894289
linkType: hard
42904290

4291-
"@sentry-internal/replay-canvas@npm:9.0.1":
4292-
version: 9.0.1
4293-
resolution: "@sentry-internal/replay-canvas@npm:9.0.1"
4291+
"@sentry-internal/replay-canvas@npm:9.3.0":
4292+
version: 9.3.0
4293+
resolution: "@sentry-internal/replay-canvas@npm:9.3.0"
42944294
dependencies:
4295-
"@sentry-internal/replay": "npm:9.0.1"
4296-
"@sentry/core": "npm:9.0.1"
4297-
checksum: 10c0/6c4c2a66a5b7a8c6c41328570a95899d3e0f47252b7d0c478373076e9ea08586bb4a02f20f0ca9e54c2b974fcf98adf8f6f4b53da1aac0e862790713971ef913
4295+
"@sentry-internal/replay": "npm:9.3.0"
4296+
"@sentry/core": "npm:9.3.0"
4297+
checksum: 10c0/be53f0535438969e0b073d90ff71d4f21cc8113cc15a94dfe1980b813e063e7a63472c0e12e0dae2ea9da70287b47e8f74938992c289b7f6e42a610188da207e
42984298
languageName: node
42994299
linkType: hard
43004300

4301-
"@sentry-internal/replay@npm:9.0.1":
4302-
version: 9.0.1
4303-
resolution: "@sentry-internal/replay@npm:9.0.1"
4301+
"@sentry-internal/replay@npm:9.3.0":
4302+
version: 9.3.0
4303+
resolution: "@sentry-internal/replay@npm:9.3.0"
43044304
dependencies:
4305-
"@sentry-internal/browser-utils": "npm:9.0.1"
4306-
"@sentry/core": "npm:9.0.1"
4307-
checksum: 10c0/a01c406d0f3b9f3010d73ed345613a574a543a29efa789db51ae0ad58f06101faff7580e4eb9f8c10819caf529ef3995545fa38fad0186076d0887874f86c88a
4305+
"@sentry-internal/browser-utils": "npm:9.3.0"
4306+
"@sentry/core": "npm:9.3.0"
4307+
checksum: 10c0/978cc977bb49db6e2f83e8d7a5d545ad9905f5a7c8e7c928ee9b7dfb7449d5459e1063d908897201da569f31f53ee951cb36f38ff8ab9812ac1785cc6b710a94
43084308
languageName: node
43094309
linkType: hard
43104310

4311-
"@sentry/babel-plugin-component-annotate@npm:3.1.2":
4312-
version: 3.1.2
4313-
resolution: "@sentry/babel-plugin-component-annotate@npm:3.1.2"
4314-
checksum: 10c0/cb43db26ba1b8a081c3853ac9ff4851eefa854ae5e3955d61a70900daff419c57939fec90a86dc47ca308c075554109816bd4bb67a25b2f5c32c30ddded7d103
4311+
"@sentry/babel-plugin-component-annotate@npm:3.2.1":
4312+
version: 3.2.1
4313+
resolution: "@sentry/babel-plugin-component-annotate@npm:3.2.1"
4314+
checksum: 10c0/26ec2e7f8c0f46be4b78d109310cf07b218e6b288cf8dd19dd55226396f531beead93362bd2bf9e942a142d5db2bb9c4c0c4d202975ae620088d8b86b6ab5f50
43154315
languageName: node
43164316
linkType: hard
43174317

4318-
"@sentry/browser@npm:9.0.1":
4319-
version: 9.0.1
4320-
resolution: "@sentry/browser@npm:9.0.1"
4318+
"@sentry/browser@npm:9.3.0":
4319+
version: 9.3.0
4320+
resolution: "@sentry/browser@npm:9.3.0"
43214321
dependencies:
4322-
"@sentry-internal/browser-utils": "npm:9.0.1"
4323-
"@sentry-internal/feedback": "npm:9.0.1"
4324-
"@sentry-internal/replay": "npm:9.0.1"
4325-
"@sentry-internal/replay-canvas": "npm:9.0.1"
4326-
"@sentry/core": "npm:9.0.1"
4327-
checksum: 10c0/d6a3d0a9111dbdcafc22497cbba3b4b20b22955e8ae0db4246af7987704b8d42b764070d04263d71edb628c02a97ec54c46760ddd6fb3edb7643282c49573647
4322+
"@sentry-internal/browser-utils": "npm:9.3.0"
4323+
"@sentry-internal/feedback": "npm:9.3.0"
4324+
"@sentry-internal/replay": "npm:9.3.0"
4325+
"@sentry-internal/replay-canvas": "npm:9.3.0"
4326+
"@sentry/core": "npm:9.3.0"
4327+
checksum: 10c0/2eab214010091827acfc3e4805896b20d78c906bbb7db87f620845fbefefdce529b2cece4ec8f719195d77112a49d06e9dbb9af904876a8640c1c93a103600d3
43284328
languageName: node
43294329
linkType: hard
43304330

4331-
"@sentry/bundler-plugin-core@npm:3.1.2":
4332-
version: 3.1.2
4333-
resolution: "@sentry/bundler-plugin-core@npm:3.1.2"
4331+
"@sentry/bundler-plugin-core@npm:3.2.1":
4332+
version: 3.2.1
4333+
resolution: "@sentry/bundler-plugin-core@npm:3.2.1"
43344334
dependencies:
43354335
"@babel/core": "npm:^7.18.5"
4336-
"@sentry/babel-plugin-component-annotate": "npm:3.1.2"
4337-
"@sentry/cli": "npm:2.41.1"
4336+
"@sentry/babel-plugin-component-annotate": "npm:3.2.1"
4337+
"@sentry/cli": "npm:2.42.2"
43384338
dotenv: "npm:^16.3.1"
43394339
find-up: "npm:^5.0.0"
43404340
glob: "npm:^9.3.2"
43414341
magic-string: "npm:0.30.8"
43424342
unplugin: "npm:1.0.1"
4343-
checksum: 10c0/25cec3d0d04cdae1f6bf9155ee6121f5b6e44ad72a5e23b1c66c55dc90b1aa5d41d14e666e50840c8c3e7aaad2a63a05c98042229f030567d7b7ef96d0d218b4
4343+
checksum: 10c0/e88fea801534bde21d60cf325abb9933e0c2d2a992a918a331c684917416ace91eebc82a50f4f4dbe367d5094d57a09ba4da753dbdd2e16254f117d9f16e36d4
43444344
languageName: node
43454345
linkType: hard
43464346

4347-
"@sentry/cli-darwin@npm:2.41.1":
4348-
version: 2.41.1
4349-
resolution: "@sentry/cli-darwin@npm:2.41.1"
4347+
"@sentry/cli-darwin@npm:2.42.2":
4348+
version: 2.42.2
4349+
resolution: "@sentry/cli-darwin@npm:2.42.2"
43504350
conditions: os=darwin
43514351
languageName: node
43524352
linkType: hard
43534353

4354-
"@sentry/cli-linux-arm64@npm:2.41.1":
4355-
version: 2.41.1
4356-
resolution: "@sentry/cli-linux-arm64@npm:2.41.1"
4354+
"@sentry/cli-linux-arm64@npm:2.42.2":
4355+
version: 2.42.2
4356+
resolution: "@sentry/cli-linux-arm64@npm:2.42.2"
43574357
conditions: (os=linux | os=freebsd) & cpu=arm64
43584358
languageName: node
43594359
linkType: hard
43604360

4361-
"@sentry/cli-linux-arm@npm:2.41.1":
4362-
version: 2.41.1
4363-
resolution: "@sentry/cli-linux-arm@npm:2.41.1"
4361+
"@sentry/cli-linux-arm@npm:2.42.2":
4362+
version: 2.42.2
4363+
resolution: "@sentry/cli-linux-arm@npm:2.42.2"
43644364
conditions: (os=linux | os=freebsd) & cpu=arm
43654365
languageName: node
43664366
linkType: hard
43674367

4368-
"@sentry/cli-linux-i686@npm:2.41.1":
4369-
version: 2.41.1
4370-
resolution: "@sentry/cli-linux-i686@npm:2.41.1"
4368+
"@sentry/cli-linux-i686@npm:2.42.2":
4369+
version: 2.42.2
4370+
resolution: "@sentry/cli-linux-i686@npm:2.42.2"
43714371
conditions: (os=linux | os=freebsd) & (cpu=x86 | cpu=ia32)
43724372
languageName: node
43734373
linkType: hard
43744374

4375-
"@sentry/cli-linux-x64@npm:2.41.1":
4376-
version: 2.41.1
4377-
resolution: "@sentry/cli-linux-x64@npm:2.41.1"
4375+
"@sentry/cli-linux-x64@npm:2.42.2":
4376+
version: 2.42.2
4377+
resolution: "@sentry/cli-linux-x64@npm:2.42.2"
43784378
conditions: (os=linux | os=freebsd) & cpu=x64
43794379
languageName: node
43804380
linkType: hard
43814381

4382-
"@sentry/cli-win32-i686@npm:2.41.1":
4383-
version: 2.41.1
4384-
resolution: "@sentry/cli-win32-i686@npm:2.41.1"
4382+
"@sentry/cli-win32-i686@npm:2.42.2":
4383+
version: 2.42.2
4384+
resolution: "@sentry/cli-win32-i686@npm:2.42.2"
43854385
conditions: os=win32 & (cpu=x86 | cpu=ia32)
43864386
languageName: node
43874387
linkType: hard
43884388

4389-
"@sentry/cli-win32-x64@npm:2.41.1":
4390-
version: 2.41.1
4391-
resolution: "@sentry/cli-win32-x64@npm:2.41.1"
4389+
"@sentry/cli-win32-x64@npm:2.42.2":
4390+
version: 2.42.2
4391+
resolution: "@sentry/cli-win32-x64@npm:2.42.2"
43924392
conditions: os=win32 & cpu=x64
43934393
languageName: node
43944394
linkType: hard
43954395

4396-
"@sentry/cli@npm:2.41.1":
4397-
version: 2.41.1
4398-
resolution: "@sentry/cli@npm:2.41.1"
4396+
"@sentry/cli@npm:2.42.2":
4397+
version: 2.42.2
4398+
resolution: "@sentry/cli@npm:2.42.2"
43994399
dependencies:
4400-
"@sentry/cli-darwin": "npm:2.41.1"
4401-
"@sentry/cli-linux-arm": "npm:2.41.1"
4402-
"@sentry/cli-linux-arm64": "npm:2.41.1"
4403-
"@sentry/cli-linux-i686": "npm:2.41.1"
4404-
"@sentry/cli-linux-x64": "npm:2.41.1"
4405-
"@sentry/cli-win32-i686": "npm:2.41.1"
4406-
"@sentry/cli-win32-x64": "npm:2.41.1"
4400+
"@sentry/cli-darwin": "npm:2.42.2"
4401+
"@sentry/cli-linux-arm": "npm:2.42.2"
4402+
"@sentry/cli-linux-arm64": "npm:2.42.2"
4403+
"@sentry/cli-linux-i686": "npm:2.42.2"
4404+
"@sentry/cli-linux-x64": "npm:2.42.2"
4405+
"@sentry/cli-win32-i686": "npm:2.42.2"
4406+
"@sentry/cli-win32-x64": "npm:2.42.2"
44074407
https-proxy-agent: "npm:^5.0.0"
44084408
node-fetch: "npm:^2.6.7"
44094409
progress: "npm:^2.0.3"
@@ -4426,37 +4426,37 @@ __metadata:
44264426
optional: true
44274427
bin:
44284428
sentry-cli: bin/sentry-cli
4429-
checksum: 10c0/42b33b6a45c2380a25f6f00ad4c81135ff6604e38b52b9399fbd611c92bf1ec471abf118d2e83ec3e72ad6436634f638575f1fa89be215e5a1a1831adb0e55c5
4429+
checksum: 10c0/286910a194a386b9f21ef9e6dc171cbba35f1db09cb3bd53f19724ccf08b0819fb1c35e7fd2e7844da24a28428ca94ff3be7ae85f14056d6e6fc0193976d3815
44304430
languageName: node
44314431
linkType: hard
44324432

4433-
"@sentry/core@npm:9.0.1":
4434-
version: 9.0.1
4435-
resolution: "@sentry/core@npm:9.0.1"
4436-
checksum: 10c0/c29752e4b5b3bd0428e0396a2390de5cdf28afa2fdee08668682189a5d3f767f48621fc24f3317e76c704abdcf9188570147279e6f049c47843a854fc4c5156c
4433+
"@sentry/core@npm:9.3.0":
4434+
version: 9.3.0
4435+
resolution: "@sentry/core@npm:9.3.0"
4436+
checksum: 10c0/12891fc68f4dbc32f27e7300ae157bac914761c7c1a90cbe0d4617f44c4bd5cdc5573963a60f4fd25d86eda40446623c1a2e64c24809a0bc7a731374e82d4eb8
44374437
languageName: node
44384438
linkType: hard
44394439

4440-
"@sentry/react@npm:^9.0.1":
4441-
version: 9.0.1
4442-
resolution: "@sentry/react@npm:9.0.1"
4440+
"@sentry/react@npm:^9.3.0":
4441+
version: 9.3.0
4442+
resolution: "@sentry/react@npm:9.3.0"
44434443
dependencies:
4444-
"@sentry/browser": "npm:9.0.1"
4445-
"@sentry/core": "npm:9.0.1"
4444+
"@sentry/browser": "npm:9.3.0"
4445+
"@sentry/core": "npm:9.3.0"
44464446
hoist-non-react-statics: "npm:^3.3.2"
44474447
peerDependencies:
44484448
react: ^16.14.0 || 17.x || 18.x || 19.x
4449-
checksum: 10c0/fc193a7b5d5d248ae759e4c949d26516eb94073755abd9641de328a4f013c9ee649707326b465ac4a2c9254463817cce1858b8c375b2922a1e49bb736556702b
4449+
checksum: 10c0/81b3bea4844094fb9b191ef7a82b13147b0514a17c054c7e7cd0abfb73311d6349caeddf6ae9de76a8ca2483d5b29d29356a59db7f362c9a6c399636eef55aaf
44504450
languageName: node
44514451
linkType: hard
44524452

4453-
"@sentry/vite-plugin@npm:^3.1.2":
4454-
version: 3.1.2
4455-
resolution: "@sentry/vite-plugin@npm:3.1.2"
4453+
"@sentry/vite-plugin@npm:^3.2.1":
4454+
version: 3.2.1
4455+
resolution: "@sentry/vite-plugin@npm:3.2.1"
44564456
dependencies:
4457-
"@sentry/bundler-plugin-core": "npm:3.1.2"
4457+
"@sentry/bundler-plugin-core": "npm:3.2.1"
44584458
unplugin: "npm:1.0.1"
4459-
checksum: 10c0/a891116dbfca686100a7d68d8a30f2503500340e4b9f28dc7811b00600b90cc133430748862a25b39597898b83f7bb5a6a78702be04d03cf1de9707aa302ad73
4459+
checksum: 10c0/7a85945d24d2c1bc1ecd52daa275c149087201166732cdd2836764ab41b1e0a58b7e1c49f51e6baff606a91be3b032544e95dbca9cf604e740e0d421794ac6cb
44604460
languageName: node
44614461
linkType: hard
44624462

@@ -9067,8 +9067,8 @@ __metadata:
90679067
"@radix-ui/react-popover": "npm:^1.0.6"
90689068
"@radix-ui/react-radio-group": "npm:^1.1.3"
90699069
"@radix-ui/react-tooltip": "npm:^1.1.2"
9070-
"@sentry/react": "npm:^9.0.1"
9071-
"@sentry/vite-plugin": "npm:^3.1.2"
9070+
"@sentry/react": "npm:^9.3.0"
9071+
"@sentry/vite-plugin": "npm:^3.2.1"
90729072
"@storybook/addon-a11y": "npm:^8.3.7"
90739073
"@storybook/addon-actions": "npm:^8.3.7"
90749074
"@storybook/addon-essentials": "npm:^8.3.7"

0 commit comments

Comments
 (0)