Skip to content
Draft
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
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@ test('should capture and send Express controller error with txn name if tracesSa
.expect({
transaction: {
transaction: 'GET /test/express/:id',
contexts: {
trace: {
op: 'http.server',
status: 'internal_error',
data: expect.objectContaining({
'http.response.status_code': 500,
}),
},
},
},
})
.expect({
Expand Down
4 changes: 0 additions & 4 deletions packages/core/src/server-runtime-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { Client } from './client';
import { getIsolationScope } from './currentScopes';
import { DEBUG_BUILD } from './debug-build';
import type { Scope } from './scope';
import { registerSpanErrorInstrumentation } from './tracing';
import { DEFAULT_TRANSPORT_BUFFER_SIZE } from './transports/base';
import { addUserAgentToTransportHeaders } from './transports/userAgent';
import type { CheckIn, MonitorConfig, SerializedCheckIn } from './types/checkin';
Expand Down Expand Up @@ -38,9 +37,6 @@ export class ServerRuntimeClient<
* @param options Configuration options for this SDK.
*/
public constructor(options: O) {
// Server clients always support tracing
registerSpanErrorInstrumentation();

addUserAgentToTransportHeaders(options);

super(options);
Expand Down
4 changes: 0 additions & 4 deletions packages/core/src/tracing/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ export function registerSpanErrorInstrumentation(): void {
}
}

// The function name will be lost when bundling but we need to be able to identify this listener later to maintain the
// node.js default exit behaviour
errorCallback.tag = 'sentry_tracingErrorCallback';

errorsInstrumented = true;
addGlobalErrorInstrumentationHandler(errorCallback);
addGlobalUnhandledRejectionInstrumentationHandler(errorCallback);
Expand Down
2 changes: 0 additions & 2 deletions packages/node-core/src/integrations/onuncaughtexception.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,6 @@ export function makeErrorHandler(client: NodeClient, options: OnUncaughtExceptio
return (
// as soon as we're using domains this listener is attached by node itself
listener.name !== 'domainUncaughtExceptionClear' &&
// the handler we register for tracing
listener.tag !== 'sentry_tracingErrorCallback' &&
// the handler we register in this integration
(listener as ErrorHandler)._errorHandler !== true
);
Expand Down
Loading