Skip to content

Commit 53a9eb2

Browse files
committed
ref(node): Stop using registerSpanErrorInstrumentation() on server
1 parent c5b4468 commit 53a9eb2

3 files changed

Lines changed: 0 additions & 10 deletions

File tree

packages/core/src/server-runtime-client.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { Client } from './client';
33
import { getIsolationScope } from './currentScopes';
44
import { DEBUG_BUILD } from './debug-build';
55
import type { Scope } from './scope';
6-
import { registerSpanErrorInstrumentation } from './tracing';
76
import { DEFAULT_TRANSPORT_BUFFER_SIZE } from './transports/base';
87
import { addUserAgentToTransportHeaders } from './transports/userAgent';
98
import type { CheckIn, MonitorConfig, SerializedCheckIn } from './types/checkin';
@@ -38,9 +37,6 @@ export class ServerRuntimeClient<
3837
* @param options Configuration options for this SDK.
3938
*/
4039
public constructor(options: O) {
41-
// Server clients always support tracing
42-
registerSpanErrorInstrumentation();
43-
4440
addUserAgentToTransportHeaders(options);
4541

4642
super(options);

packages/core/src/tracing/errors.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@ export function registerSpanErrorInstrumentation(): void {
3333
}
3434
}
3535

36-
// The function name will be lost when bundling but we need to be able to identify this listener later to maintain the
37-
// node.js default exit behaviour
38-
errorCallback.tag = 'sentry_tracingErrorCallback';
39-
4036
errorsInstrumented = true;
4137
addGlobalErrorInstrumentationHandler(errorCallback);
4238
addGlobalUnhandledRejectionInstrumentationHandler(errorCallback);

packages/node-core/src/integrations/onuncaughtexception.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,6 @@ export function makeErrorHandler(client: NodeClient, options: OnUncaughtExceptio
8989
return (
9090
// as soon as we're using domains this listener is attached by node itself
9191
listener.name !== 'domainUncaughtExceptionClear' &&
92-
// the handler we register for tracing
93-
listener.tag !== 'sentry_tracingErrorCallback' &&
9492
// the handler we register in this integration
9593
(listener as ErrorHandler)._errorHandler !== true
9694
);

0 commit comments

Comments
 (0)