Skip to content

Commit 02b1947

Browse files
committed
cleanup
1 parent 46182e9 commit 02b1947

File tree

2 files changed

+2
-29
lines changed
  • dev-packages/browser-integration-tests/suites/public-api/startSpan/standalone-mixed-transaction
  • packages/core/src/tracing

2 files changed

+2
-29
lines changed

dev-packages/browser-integration-tests/suites/public-api/startSpan/standalone-mixed-transaction/test.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { expect } from '@playwright/test';
2-
import type { Envelope, Event, EventEnvelope, EventItem, SpanEnvelope, TransactionEvent } from '@sentry/types';
2+
import type { Envelope, EventEnvelope, SpanEnvelope, TransactionEvent } from '@sentry/types';
33

4-
import exp from 'constants';
54
import { sentryTest } from '../../../../utils/fixtures';
65
import {
76
getMultipleSentryEnvelopeRequests,
@@ -12,8 +11,6 @@ import {
1211
sentryTest(
1312
'sends a transaction and a span envelope if a standalone span is created as a child of an ongoing span tree',
1413
async ({ getLocalTestPath, page }) => {
15-
page.on('console', msg => console.log('PAGE LOG:', msg.text()));
16-
1714
if (shouldSkipTracingTest()) {
1815
sentryTest.skip();
1916
}

packages/core/src/tracing/sentrySpan.ts

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import type {
1313
TransactionEvent,
1414
TransactionSource,
1515
} from '@sentry/types';
16-
import { consoleSandbox, dropUndefinedKeys, logger, timestampInSeconds, uuid4 } from '@sentry/utils';
16+
import { dropUndefinedKeys, logger, timestampInSeconds, uuid4 } from '@sentry/utils';
1717
import { getClient, getCurrentScope } from '../currentScopes';
1818
import { DEBUG_BUILD } from '../debug-build';
1919

@@ -252,32 +252,17 @@ export class SentrySpan implements Span {
252252
// So for now, this is either what we previously refer to as the root span,
253253
// or a standalone span.
254254
const isSegmentSpan = this._isStandaloneSpan || this === getRootSpan(this);
255-
consoleSandbox(() => {
256-
console.log('isSegmentSpan', isSegmentSpan);
257-
});
258255

259-
// If this is not a root span (== segment span) and we don't want to send it
260256
if (!isSegmentSpan) {
261-
consoleSandbox(() => {
262-
console.log('early ret');
263-
});
264257
return;
265258
}
266259

267260
// if this is a standalone span, we send it immediately
268261
if (this._isStandaloneSpan) {
269-
consoleSandbox(() => {
270-
console.log('calling sendSpanEnvelope');
271-
});
272-
273262
sendSpanEnvelope(createSpanEnvelope([this]));
274263
return;
275264
}
276265

277-
consoleSandbox(() => {
278-
console.log('converting to transaction');
279-
});
280-
281266
const transactionEvent = this._convertSpanToTransaction();
282267
if (transactionEvent) {
283268
const scope = getCapturedScopesOnSpan(this).scope || getCurrentScope();
@@ -373,22 +358,13 @@ function isStandaloneSpan(span: Span): boolean {
373358
}
374359

375360
function sendSpanEnvelope(envelope: SpanEnvelope): void {
376-
consoleSandbox(() => {
377-
console.log('sendSpanEnvelope', envelope);
378-
});
379361
const client = getClient();
380362
if (!client) {
381-
consoleSandbox(() => {
382-
console.log('no client');
383-
});
384363
return;
385364
}
386365

387366
const transport = client.getTransport();
388367
if (transport) {
389-
consoleSandbox(() => {
390-
console.log('transport send');
391-
});
392368
transport.send(envelope).then(null, reason => {
393369
DEBUG_BUILD && logger.error('Error while sending span:', reason);
394370
});

0 commit comments

Comments
 (0)