Skip to content

Commit 891d790

Browse files
authored
ref(node-core): Add more specific mechanism.type to worker thread errors from childProcessIntegration (#17578)
Sets a more specific mechanism type. The main problem here is that I didn't find a suiting category to be used with trace origin. So I decided to go with a similar format but the category doesn't match an existing cat. ref #17260
1 parent 0527ee3 commit 891d790

File tree

3 files changed

+3
-3
lines changed
  • dev-packages
    • node-core-integration-tests/suites/child-process
    • node-integration-tests/suites/child-process
  • packages/node-core/src/integrations

3 files changed

+3
-3
lines changed

dev-packages/node-core-integration-tests/suites/child-process/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const WORKER_EVENT: Event = {
1010
type: 'Error',
1111
value: 'Test error',
1212
mechanism: {
13-
type: 'instrument',
13+
type: 'auto.child_process.worker_thread',
1414
handled: false,
1515
data: {
1616
threadId: expect.any(String),

dev-packages/node-integration-tests/suites/child-process/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const WORKER_EVENT: Event = {
1010
type: 'Error',
1111
value: 'Test error',
1212
mechanism: {
13-
type: 'instrument',
13+
type: 'auto.child_process.worker_thread',
1414
handled: false,
1515
data: {
1616
threadId: expect.any(String),

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ function captureWorkerThreadEvents(worker: Worker, options: Options): void {
9999
.on('error', error => {
100100
if (options.captureWorkerErrors !== false) {
101101
captureException(error, {
102-
mechanism: { type: 'instrument', handled: false, data: { threadId: String(threadId) } },
102+
mechanism: { type: 'auto.child_process.worker_thread', handled: false, data: { threadId: String(threadId) } },
103103
});
104104
} else {
105105
addBreadcrumb({

0 commit comments

Comments
 (0)