Skip to content

feat(profiling): Use OTEL powered node package #11239

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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