Skip to content

Commit 7956bd8

Browse files
authored
fix: Set transaction on scope in node for request (#2769)
* fix: Set transaction on scope in node for request * ci: Skip build for size check
1 parent aa60eea commit 7956bd8

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,14 @@ jobs:
4545
node_modules
4646
*/*/node_modules
4747
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
48-
- run: yarn install
4948
- uses: actions/download-artifact@v2
5049
with:
5150
name: build
5251
path: ${{ github.workspace }}/packages
5352
- uses: andresz1/[email protected]
5453
with:
5554
github_token: ${{ secrets.GITHUB_TOKEN }}
56-
build_script: echo "doing nothing"
57-
skip_step: install
55+
skip_step: build
5856

5957
job_lint:
6058
name: Lint

packages/node/src/handlers.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,11 @@ export function errorHandler(options?: {
407407

408408
if (shouldHandleError(error)) {
409409
withScope(_scope => {
410+
// For some reason we need to set the transaction on the scope again
411+
const transaction = (res as any).__sentry_transaction as Span;
412+
if (transaction && _scope.getSpan() === undefined) {
413+
_scope.setSpan(transaction);
414+
}
410415
const eventId = captureException(error);
411416
(res as any).sentry = eventId;
412417
next(error);

0 commit comments

Comments
 (0)