Skip to content

Commit 18bc035

Browse files
authored
feat(profiling-node): Refactor deprecated methods & non-hook variant (#10984)
Since all clients have hooks now, we only have this single method for instrumentation left. I also refactored this to not use `startTransaction` / `finishTransaction` anymore, but instead use `spanStart` & `spanEnd`. Everything is now centered around spans, also profiling, this just looks at root spans now, which should be functionally the same. I have _not_ checked if there is any behavior that used to be only tested in non-hook tests - I simply deleted all non-hooks-only tests. (some of the general ones I just refactored to the hooks version, as far as this was visible from the test structure/naming).
1 parent a5ea42e commit 18bc035

File tree

11 files changed

+260
-1598
lines changed

11 files changed

+260
-1598
lines changed

dev-packages/e2e-tests/test-applications/node-profiling/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
const Sentry = require('@sentry/node');
2-
const Profiling = require('@sentry/profiling-node');
2+
const { nodeProfilingIntegration } = require('@sentry/profiling-node');
33

44
const wait = ms => new Promise(resolve => setTimeout(resolve, ms));
55

66
Sentry.init({
77
dsn: 'https://[email protected]/6625302',
8-
integrations: [new Profiling.ProfilingIntegration()],
8+
integrations: [nodeProfilingIntegration()],
99
tracesSampleRate: 1.0,
1010
profilesSampleRate: 1.0,
1111
});

packages/profiling-node/src/hubextensions.ts

Lines changed: 0 additions & 248 deletions
This file was deleted.

packages/profiling-node/src/index.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
1-
export {
2-
// eslint-disable-next-line deprecation/deprecation
3-
ProfilingIntegration,
4-
nodeProfilingIntegration,
5-
} from './integration';
1+
export { nodeProfilingIntegration } from './integration';

0 commit comments

Comments
 (0)