Skip to content

Commit

Permalink
adding sentry tag
Browse files Browse the repository at this point in the history
  • Loading branch information
vthomas13 committed Oct 24, 2024
1 parent 9f99e08 commit b26345c
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions app/scripts/lib/setupSentry.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ export default function setupSentry() {
.then((extensionInfo) => {
if (extensionInfo.installType) {
installType = extensionInfo.installType;
Sentry.setTag('installType', installType);
}
})
.catch((error) => {
Expand Down Expand Up @@ -425,12 +424,17 @@ export function rewriteReport(report) {
if (!report.extra) {
report.extra = {};
}

report.extra.appState = appState;
if (browser.runtime && browser.runtime.id) {
report.extra.extensionId = browser.runtime.id;
if (!report.tags) {
report.tags = {};
}
report.extra.installType = installType;

Object.assign(report.extra, {
appState,
installType,
extensionId: browser.runtime?.id,
});

report.tags.installType = installType;
} catch (err) {
log('Error rewriting report', err);
}
Expand Down

0 comments on commit b26345c

Please sign in to comment.