Skip to content

Commit

Permalink
[react] Fix grouping by SE "supertag"
Browse files Browse the repository at this point in the history
  • Loading branch information
realkosty committed Mar 19, 2024
1 parent 0e2961e commit 4fa52ea
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions react/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,20 @@ Sentry.init({
});

if (se) {
const se_tda_prefix_regex = /[^-]+-tda-[^-]+-/
let se_fp = se;
let prefix = se_tda_prefix_regex.exec(se);
if (prefix) {
// Now that TDA puts platform/browser and test path into SE tag we want to prevent
// creating separate issues for those. See https://github.com/sentry-demos/empower/pull/332
se_fp = prefix[0] ;
}
if (se.startsWith('prod-tda-')) {
// Release Health
event.fingerprint = ['{{ default }}', se, RELEASE];
event.fingerprint = ['{{ default }}', se_fp, RELEASE];
} else {
// SE Testing
event.fingerprint = ['{{ default }}', se];
event.fingerprint = ['{{ default }}', se_fp];
}
}

Expand Down

0 comments on commit 4fa52ea

Please sign in to comment.