File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,33 @@ echo " "
3737echo " MOVING BACK TO PROJECT DIRECTORY"
3838cd $PROJECT_DIR
3939
40+ # TODO move this into `yarn vercel:project` script, accounting for differences in SDK repo location between running the
41+ # test app locally and on vercel
42+ echo " "
43+ echo " PATCHING SENTRY.SERVER.CONFIG.JS AND SENTRY.CLIENT.CONFIG.JS"
44+ echo " Removing frame limit on stacktraces"
45+ echo " Tagging events with $( vercel) tag"
46+ echo " Tagging events with SDK repo's most recent commit message"
47+ echo " Tagging events with test project repo's most recent commit message"
48+
49+ INFINITE_STACKTRACE_CODE="
50+ Error.stackTraceLimit = Infinity;
51+ "
52+
53+ SDK_COMMIT_MESSAGE=$( cd sentry-javascript && git log --format=" %C(auto)%s" | head -n 1)
54+ CONFIGURE_SCOPE_CODE="
55+ Sentry.configureScope(scope => {
56+ if (process.env.VERCEL) {
57+ scope.setTag('vercel', true);
58+ }
59+ scope.setTag('commitMessage', process.env.VERCEL_GIT_COMMIT_MESSAGE);
60+ scope.setTag('sdkCommitMessage', \" $SDK_COMMIT_MESSAGE \" );
61+ });
62+ "
63+
64+ echo " $INFINITE_STACKTRACE_CODE " " $CONFIGURE_SCOPE_CODE " >> sentry.server.config.js
65+ echo " $INFINITE_STACKTRACE_CODE " " $CONFIGURE_SCOPE_CODE " >> sentry.client.config.js
66+
4067# Add built SDK as a file dependency. This has the side effect of forcing yarn to install all of the other dependencies,
4168# saving us the trouble of needing to call `yarn` separately after this
4269echo " "
You can’t perform that action at this time.
0 commit comments