Skip to content

Commit c4acfe9

Browse files
authored
feat(v8): Remove span.toTraceparent method (#10698)
ref #10677
1 parent 743c6c4 commit c4acfe9

File tree

4 files changed

+2
-27
lines changed

4 files changed

+2
-27
lines changed

dev-packages/e2e-tests/test-applications/debug-id-sourcemaps/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"devDependencies": {
1616
"rollup": "^4.0.2",
1717
"vitest": "^0.34.6",
18-
"@sentry/rollup-plugin": "2.8.0"
18+
"@sentry/rollup-plugin": "2.14.2"
1919
},
2020
"pnpm": {
2121
"overrides": {

packages/core/src/tracing/sentrySpan.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import {
2424
spanTimeInputToSeconds,
2525
spanToJSON,
2626
spanToTraceContext,
27-
spanToTraceHeader,
2827
} from '../utils/spanUtils';
2928
import type { SpanStatusType } from './spanstatus';
3029
import { setHttpStatus } from './spanstatus';
@@ -454,15 +453,6 @@ export class SentrySpan implements SpanInterface {
454453
this._endTime = spanTimeInputToSeconds(endTimestamp);
455454
}
456455

457-
/**
458-
* @inheritDoc
459-
*
460-
* @deprecated Use `spanToTraceHeader()` instead.
461-
*/
462-
public toTraceparent(): string {
463-
return spanToTraceHeader(this);
464-
}
465-
466456
/**
467457
* @inheritDoc
468458
*

packages/tracing/test/span.test.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
} from '@sentry/core';
1515
import type { BaseTransportOptions, ClientOptions } from '@sentry/types';
1616

17-
import { TRACEPARENT_REGEXP, Transaction } from '../src';
17+
import { Transaction } from '../src';
1818
import { getDefaultBrowserClientOptions } from './testutils';
1919

2020
describe('SentrySpan', () => {
@@ -125,15 +125,6 @@ describe('SentrySpan', () => {
125125
});
126126
});
127127

128-
describe('toTraceparent', () => {
129-
test('simple', () => {
130-
expect(new SentrySpan().toTraceparent()).toMatch(TRACEPARENT_REGEXP);
131-
});
132-
test('with sample', () => {
133-
expect(new SentrySpan({ sampled: true }).toTraceparent()).toMatch(TRACEPARENT_REGEXP);
134-
});
135-
});
136-
137128
describe('toJSON', () => {
138129
test('simple', () => {
139130
const span = JSON.parse(

packages/types/src/span.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -330,12 +330,6 @@ export interface Span extends Omit<SpanContext, 'name' | 'op' | 'status' | 'orig
330330
*/
331331
startChild(spanContext?: Pick<SpanContext, Exclude<keyof SpanContext, 'sampled' | 'traceId' | 'parentSpanId'>>): Span;
332332

333-
/**
334-
* Return a traceparent compatible header string.
335-
* @deprecated Use `spanToTraceHeader()` instead.
336-
*/
337-
toTraceparent(): string;
338-
339333
/**
340334
* Returns the current span properties as a `SpanContext`.
341335
* @deprecated Use `toJSON()` or access the fields directly instead.

0 commit comments

Comments
 (0)