Skip to content

Commit

Permalink
feat(profiling): Use OTEL powered node package (#11239)
Browse files Browse the repository at this point in the history
ref #9956

This is another attempt at
#11033 now that
#11135 has merged in.
  • Loading branch information
AbhiPrasad committed Mar 25, 2024
1 parent fca5c03 commit 4291bce
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/profiling-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
},
"dependencies": {
"@sentry/core": "8.0.0-alpha.5",
"@sentry/node-experimental": "8.0.0-alpha.5",
"@sentry/node": "8.0.0-alpha.5",
"@sentry/types": "8.0.0-alpha.5",
"@sentry/utils": "8.0.0-alpha.5",
"detect-libc": "^2.0.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/profiling-node/src/integration.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineIntegration, getCurrentScope, getRootSpan, spanToJSON } from '@sentry/core';
import type { NodeClient } from '@sentry/node-experimental';
import type { NodeClient } from '@sentry/node';
import type { IntegrationFn, Span } from '@sentry/types';

import { logger } from '@sentry/utils';
Expand Down
2 changes: 1 addition & 1 deletion packages/profiling-node/src/spanProfileUtils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { spanIsSampled, spanToJSON } from '@sentry/core';
import type { NodeClient } from '@sentry/node-experimental';
import type { NodeClient } from '@sentry/node';
import type { CustomSamplingContext, Span } from '@sentry/types';
import { logger, uuid4 } from '@sentry/utils';

Expand Down
4 changes: 2 additions & 2 deletions packages/profiling-node/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { Context, Envelope, Event, StackFrame, StackParser } from '@sentry/
import { env, versions } from 'process';
import { isMainThread, threadId } from 'worker_threads';

import * as Sentry from '@sentry/node-experimental';
import { getCurrentHub } from '@sentry/node';
import { GLOBAL_OBJ, forEachEnvelopeItem, logger } from '@sentry/utils';

import { DEBUG_BUILD } from './debug-build';
Expand Down Expand Up @@ -318,7 +318,7 @@ export function applyDebugMetadata(resource_paths: ReadonlyArray<string>): Debug
}

// eslint-disable-next-line deprecation/deprecation
const hub = Sentry.getCurrentHub();
const hub = getCurrentHub();
// eslint-disable-next-line deprecation/deprecation
const client = hub.getClient();
const options = client && client.getOptions();
Expand Down
2 changes: 1 addition & 1 deletion packages/profiling-node/test/integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { EventEmitter } from 'events';

import type { Transport } from '@sentry/types';

import type { NodeClient } from '@sentry/node-experimental';
import type { NodeClient } from '@sentry/node';
import { _nodeProfilingIntegration } from '../src/integration';

describe('ProfilingIntegration', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/profiling-node/test/spanProfileUtils.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as Sentry from '@sentry/node-experimental';
import * as Sentry from '@sentry/node';

import { getMainCarrier } from '@sentry/core';
import type { Transport } from '@sentry/types';
Expand Down

0 comments on commit 4291bce

Please sign in to comment.