diff --git a/packages/e2e-tests/test-applications/node-hapi-app/event-proxy-server.ts b/packages/e2e-tests/test-applications/node-hapi-app/event-proxy-server.ts index 67cf80b4dabf..9dee679c71e4 100644 --- a/packages/e2e-tests/test-applications/node-hapi-app/event-proxy-server.ts +++ b/packages/e2e-tests/test-applications/node-hapi-app/event-proxy-server.ts @@ -1,5 +1,3 @@ -import type { Envelope, EnvelopeItem, Event } from '@sentry/types'; -import { parseEnvelope } from '@sentry/utils'; import * as fs from 'fs'; import * as http from 'http'; import * as https from 'https'; @@ -8,6 +6,8 @@ import * as os from 'os'; import * as path from 'path'; import * as util from 'util'; import * as zlib from 'zlib'; +import type { Envelope, EnvelopeItem, Event } from '@sentry/types'; +import { parseEnvelope } from '@sentry/utils'; const readFile = util.promisify(fs.readFile); const writeFile = util.promisify(fs.writeFile); diff --git a/packages/e2e-tests/test-applications/node-hapi-app/tests/server.test.ts b/packages/e2e-tests/test-applications/node-hapi-app/tests/server.test.ts index 0539ed6a3548..cbcd99e756d7 100644 --- a/packages/e2e-tests/test-applications/node-hapi-app/tests/server.test.ts +++ b/packages/e2e-tests/test-applications/node-hapi-app/tests/server.test.ts @@ -1,4 +1,4 @@ -import { test, expect } from '@playwright/test'; +import { expect, test } from '@playwright/test'; import axios, { AxiosError, AxiosResponse } from 'axios'; import { waitForError, waitForTransaction } from '../event-proxy-server'; diff --git a/packages/node/src/integrations/hapi/index.ts b/packages/node/src/integrations/hapi/index.ts index e8c582f52e0c..42e7d27bca9e 100644 --- a/packages/node/src/integrations/hapi/index.ts +++ b/packages/node/src/integrations/hapi/index.ts @@ -1,9 +1,9 @@ import { + SDK_VERSION, captureException, - configureScope, continueTrace, getActiveTransaction, - SDK_VERSION, + getCurrentScope, startTransaction, } from '@sentry/core'; import type { Integration } from '@sentry/types'; @@ -80,9 +80,7 @@ export const hapiTracingPlugin = { }, ); - configureScope(scope => { - scope.setSpan(transaction); - }); + getCurrentScope().setSpan(transaction); return h.continue; });