Skip to content

Commit

Permalink
sentry: call top level profile
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasBa committed Oct 8, 2024
1 parent d5bc0dc commit 3489efc
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/instrument.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import * as Sentry from '@sentry/node';
// @ts-expect-error this seems like a regression in the types
import {nodeProfilingIntegration} from '@sentry/profiling-node';

Sentry.init({
Expand All @@ -8,13 +7,4 @@ Sentry.init({
tracesSampleRate: 1,
});

const client = Sentry.getClient();

if (client) {
const profilingIntegration = client.getIntegrationByName("ProfilingIntegration");

if (profilingIntegration) {
// @ts-expect-error this is purposefuly not exposed by the SDK for now
profilingIntegration._profiler.start();
}
}
Sentry.profiler.startProfiler();

0 comments on commit 3489efc

Please sign in to comment.