Skip to content

Commit b7ab6a8

Browse files
committed
temp patch for node
1 parent 1afd16a commit b7ab6a8

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

packages/node-core/test/integration/transactions.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { context, trace, TraceFlags } from '@opentelemetry/api';
22
import type { SpanProcessor } from '@opentelemetry/sdk-trace-base';
33
import type { TransactionEvent } from '@sentry/core';
4-
import { logger, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE } from '@sentry/core';
4+
import { debug, logger, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE } from '@sentry/core';
55
import { SentrySpanProcessor } from '@sentry/opentelemetry';
66
import { afterEach, describe, expect, it, vi } from 'vitest';
77
import * as Sentry from '../../src';
@@ -558,7 +558,9 @@ describe('Integration | Transactions', () => {
558558
vi.setSystemTime(now);
559559

560560
const logs: unknown[] = [];
561+
// TODO: Remove this once node is using debug instead of logger
561562
vi.spyOn(logger, 'log').mockImplementation(msg => logs.push(msg));
563+
vi.spyOn(debug, 'log').mockImplementation(msg => logs.push(msg));
562564

563565
mockSdkInit({ tracesSampleRate: 1, beforeSendTransaction });
564566

@@ -636,7 +638,9 @@ describe('Integration | Transactions', () => {
636638
vi.setSystemTime(now);
637639

638640
const logs: unknown[] = [];
641+
// TODO: Remove this once node is using debug instead of logger
639642
vi.spyOn(logger, 'log').mockImplementation(msg => logs.push(msg));
643+
vi.spyOn(debug, 'log').mockImplementation(msg => logs.push(msg));
640644

641645
mockSdkInit({
642646
tracesSampleRate: 1,

packages/node/test/integration/transactions.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { context, trace, TraceFlags } from '@opentelemetry/api';
22
import type { SpanProcessor } from '@opentelemetry/sdk-trace-base';
33
import type { TransactionEvent } from '@sentry/core';
4-
import { logger, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE } from '@sentry/core';
4+
import { debug, logger, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE } from '@sentry/core';
55
import { SentrySpanProcessor } from '@sentry/opentelemetry';
66
import { afterEach, describe, expect, it, vi } from 'vitest';
77
import * as Sentry from '../../src';
@@ -558,7 +558,9 @@ describe('Integration | Transactions', () => {
558558
vi.setSystemTime(now);
559559

560560
const logs: unknown[] = [];
561+
// TODO: Remove this once node is using debug instead of logger
561562
vi.spyOn(logger, 'log').mockImplementation(msg => logs.push(msg));
563+
vi.spyOn(debug, 'log').mockImplementation(msg => logs.push(msg));
562564

563565
mockSdkInit({ tracesSampleRate: 1, beforeSendTransaction });
564566

@@ -636,7 +638,9 @@ describe('Integration | Transactions', () => {
636638
vi.setSystemTime(now);
637639

638640
const logs: unknown[] = [];
641+
// TODO: Remove this once node is using debug instead of logger
639642
vi.spyOn(logger, 'log').mockImplementation(msg => logs.push(msg));
643+
vi.spyOn(debug, 'log').mockImplementation(msg => logs.push(msg));
640644

641645
mockSdkInit({
642646
tracesSampleRate: 1,

0 commit comments

Comments
 (0)