File tree Expand file tree Collapse file tree 7 files changed +170
-40
lines changed
dev-packages/browser-integration-tests Expand file tree Collapse file tree 7 files changed +170
-40
lines changed Original file line number Diff line number Diff line change 4141 "dependencies" : {
4242 "@babel/preset-typescript" : " ^7.16.7" ,
4343 "@playwright/test" : " ~1.50.0" ,
44- "@sentry-internal/rrweb" : " 2.33 .0" ,
44+ "@sentry-internal/rrweb" : " 2.34 .0" ,
4545 "@sentry/browser" : " 9.3.0" ,
4646 "axios" : " 1.7.7" ,
4747 "babel-loader" : " ^8.2.2" ,
Original file line number Diff line number Diff line change @@ -211,9 +211,9 @@ function _getEventFilterUrl(event: Event): string | null {
211211 try {
212212 // If there are linked exceptions or exception aggregates we only want to match against the top frame of the "root" (the main exception)
213213 // The root always comes last in linked exceptions
214- const rootException = [ ...( event . exception ?. values ?? [ ] ) . reverse ( ) ] ?. find (
215- value => value . mechanism ?. parent_id === undefined && value . stacktrace ?. frames ?. length ,
216- ) ;
214+ const rootException = [ ...( event . exception ?. values ?? [ ] ) ]
215+ . reverse ( )
216+ . find ( value => value . mechanism ?. parent_id === undefined && value . stacktrace ?. frames ?. length ) ;
217217 const frames = rootException ?. stacktrace ?. frames ;
218218 return frames ? _getLastValidUrl ( frames ) : null ;
219219 } catch ( oO ) {
Original file line number Diff line number Diff line change 8888 "@sentry/webpack-plugin" : " 3.2.1" ,
8989 "chalk" : " 3.0.0" ,
9090 "resolve" : " 1.22.8" ,
91- "rollup" : " 3.29.5 " ,
91+ "rollup" : " 4.34.9 " ,
9292 "stacktrace-parser" : " ^0.1.10"
9393 },
9494 "devDependencies" : {
Original file line number Diff line number Diff line change 6565 },
6666 "homepage" : " https://docs.sentry.io/platforms/javascript/session-replay/" ,
6767 "devDependencies" : {
68- "@sentry-internal/rrweb" : " 2.33 .0"
68+ "@sentry-internal/rrweb" : " 2.34 .0"
6969 },
7070 "dependencies" : {
7171 "@sentry-internal/replay" : " 9.3.0" ,
Original file line number Diff line number Diff line change 7171 "devDependencies" : {
7272 "@babel/core" : " ^7.17.5" ,
7373 "@sentry-internal/replay-worker" : " 9.3.0" ,
74- "@sentry-internal/rrweb" : " 2.33 .0" ,
75- "@sentry-internal/rrweb-snapshot" : " 2.33 .0" ,
74+ "@sentry-internal/rrweb" : " 2.34 .0" ,
75+ "@sentry-internal/rrweb-snapshot" : " 2.34 .0" ,
7676 "fflate" : " 0.8.2" ,
7777 "jest-matcher-utils" : " ^29.0.0" ,
7878 "jsdom-worker" : " ^0.2.1"
Original file line number Diff line number Diff line change @@ -45,13 +45,20 @@ export const createSentryPiniaPlugin: (options?: SentryPiniaPluginOptions) => Pi
4545 const timestamp = new Date ( ) . toTimeString ( ) . split ( ' ' ) [ 0 ] ;
4646 const filename = `pinia_state_all_stores_${ timestamp } .json` ;
4747
48- hint . attachments = [
49- ...( hint . attachments || [ ] ) ,
50- {
51- filename,
52- data : JSON . stringify ( getAllStoreStates ( ) ) ,
53- } ,
54- ] ;
48+ // event processor runs for each pinia store - attachment should only be added once per event
49+ const hasExistingPiniaStateAttachment = hint . attachments ?. some ( attachment =>
50+ attachment . filename . startsWith ( 'pinia_state_all_stores_' ) ,
51+ ) ;
52+
53+ if ( ! hasExistingPiniaStateAttachment ) {
54+ hint . attachments = [
55+ ...( hint . attachments || [ ] ) ,
56+ {
57+ filename,
58+ data : JSON . stringify ( getAllStoreStates ( ) ) ,
59+ } ,
60+ ] ;
61+ }
5562 } catch ( _ ) {
5663 // empty
5764 }
Load Diff Large diffs are not rendered by default.
You can’t perform that action at this time.
0 commit comments