Skip to content

Commit 5359ba9

Browse files
authored
feat(tracing|core): Remove transaction name change recording (#7197)
1 parent 4c07d02 commit 5359ba9

File tree

23 files changed

+2
-307
lines changed

23 files changed

+2
-307
lines changed

packages/core/src/baseclient.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -545,15 +545,6 @@ export abstract class BaseClient<O extends ClientOptions> implements Client<O> {
545545
processedEvent.transaction_info = {
546546
...transactionInfo,
547547
source,
548-
changes: [
549-
...transactionInfo.changes,
550-
{
551-
source,
552-
// use the same timestamp as the processed event.
553-
timestamp: processedEvent.timestamp as number,
554-
propagations: transactionInfo.propagations,
555-
},
556-
],
557548
};
558549
}
559550

packages/core/test/lib/base.test.ts

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1368,8 +1368,6 @@ describe('BaseClient', () => {
13681368
type: 'transaction',
13691369
transaction_info: {
13701370
source: 'url',
1371-
changes: [],
1372-
propagations: 3,
13731371
},
13741372
};
13751373

@@ -1383,14 +1381,6 @@ describe('BaseClient', () => {
13831381
expect(TestClient.instance!.event!.transaction).toEqual('/adopt/dont/shop');
13841382
expect(TestClient.instance!.event!.transaction_info).toEqual({
13851383
source: 'custom',
1386-
changes: [
1387-
{
1388-
propagations: 3,
1389-
source: 'custom',
1390-
timestamp: expect.any(Number),
1391-
},
1392-
],
1393-
propagations: 3,
13941384
});
13951385
});
13961386

@@ -1407,23 +1397,13 @@ describe('BaseClient', () => {
14071397
type: 'transaction',
14081398
transaction_info: {
14091399
source: 'url',
1410-
changes: [],
1411-
propagations: 3,
14121400
},
14131401
});
14141402

14151403
expect(beforeSendTransaction).toHaveBeenCalled();
14161404
expect(TestClient.instance!.event!.transaction).toBe('/adopt/dont/shop');
14171405
expect(TestClient.instance!.event!.transaction_info).toEqual({
14181406
source: 'custom',
1419-
changes: [
1420-
{
1421-
propagations: 3,
1422-
source: 'custom',
1423-
timestamp: expect.any(Number),
1424-
},
1425-
],
1426-
propagations: 3,
14271407
});
14281408
});
14291409

packages/nextjs/test/integration/test/server/errorServerSideProps.test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ describe('Error Server-side Props', () => {
4848
transaction: '/withErrorServerSideProps',
4949
transaction_info: {
5050
source: 'route',
51-
changes: [],
52-
propagations: 0,
5351
},
5452
type: 'transaction',
5553
request: {

packages/nextjs/test/integration/test/server/tracing200.test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ describe('Tracing 200', () => {
2121
transaction: 'GET /api/users',
2222
transaction_info: {
2323
source: 'route',
24-
changes: [],
25-
propagations: 0,
2624
},
2725
type: 'transaction',
2826
request: {

packages/nextjs/test/integration/test/server/tracing500.test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ describe('Tracing 500', () => {
2121
transaction: 'GET /api/broken',
2222
transaction_info: {
2323
source: 'route',
24-
changes: [],
25-
propagations: 0,
2624
},
2725
type: 'transaction',
2826
request: {

packages/nextjs/test/integration/test/server/tracingHttp.test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ describe('Tracing HTTP', () => {
3333
transaction: 'GET /api/http',
3434
transaction_info: {
3535
source: 'route',
36-
changes: [],
37-
propagations: 1,
3836
},
3937
type: 'transaction',
4038
request: {

packages/nextjs/test/integration/test/server/tracingServerGetInitialProps.test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ describe('getInitialProps', () => {
2020
transaction: '/[id]/withInitialProps',
2121
transaction_info: {
2222
source: 'route',
23-
changes: [],
24-
propagations: 0,
2523
},
2624
type: 'transaction',
2725
request: {

packages/nextjs/test/integration/test/server/tracingServerGetServerSideProps.test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ describe('getServerSideProps', () => {
2020
transaction: '/[id]/withServerSideProps',
2121
transaction_info: {
2222
source: 'route',
23-
changes: [],
24-
propagations: 0,
2523
},
2624
type: 'transaction',
2725
request: {

packages/nextjs/test/integration/test/server/tracingServerGetServerSidePropsCustomPageExtension.test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ describe('tracingServerGetServerSidePropsCustomPageExtension', () => {
2020
transaction: '/customPageExtension',
2121
transaction_info: {
2222
source: 'route',
23-
changes: [],
24-
propagations: 0,
2523
},
2624
type: 'transaction',
2725
request: {

packages/nextjs/test/integration/test/server/tracingWithSentryAPI.test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,6 @@ describe('getServerSideProps', () => {
5454
transaction: `GET ${transactionName}`,
5555
transaction_info: {
5656
source: 'route',
57-
changes: [],
58-
propagations: 0,
5957
},
6058
type: 'transaction',
6159
request: {

packages/node-integration-tests/suites/express/tracing/test.ts

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,6 @@ test('should set a correct transaction name for routes specified in RegEx', asyn
3838
transaction: 'GET /\\/test\\/regex/',
3939
transaction_info: {
4040
source: 'route',
41-
changes: [
42-
{
43-
propagations: 0,
44-
source: 'url',
45-
timestamp: expect.any(Number),
46-
},
47-
],
48-
propagations: 0,
4941
},
5042
contexts: {
5143
trace: {
@@ -74,14 +66,6 @@ test.each([['array1'], ['array5']])(
7466
transaction: 'GET /test/array1,/\\/test\\/array[2-9]',
7567
transaction_info: {
7668
source: 'route',
77-
changes: [
78-
{
79-
propagations: 0,
80-
source: 'url',
81-
timestamp: expect.any(Number),
82-
},
83-
],
84-
propagations: 0,
8569
},
8670
contexts: {
8771
trace: {
@@ -118,14 +102,6 @@ test.each([
118102
transaction: 'GET /test/arr/:id,/\\/test\\/arr[0-9]*\\/required(path)?(\\/optionalPath)?\\/(lastParam)?',
119103
transaction_info: {
120104
source: 'route',
121-
changes: [
122-
{
123-
propagations: 0,
124-
source: 'url',
125-
timestamp: expect.any(Number),
126-
},
127-
],
128-
propagations: 0,
129105
},
130106
contexts: {
131107
trace: {

packages/node/src/integrations/http.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -243,11 +243,6 @@ function _createWrappedRequestMethodFactory(
243243
`[Tracing] Not adding sentry-trace header to outgoing request (${requestUrl}) due to mismatching tracePropagationTargets option.`,
244244
);
245245
}
246-
247-
const transaction = parentSpan.transaction;
248-
if (transaction) {
249-
transaction.metadata.propagations++;
250-
}
251246
}
252247
}
253248

packages/node/test/integrations/http.test.ts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -175,20 +175,6 @@ describe('tracing', () => {
175175
expect(baggage).not.toBeDefined();
176176
});
177177

178-
it('records outgoing propagations on the transaction', () => {
179-
nock('http://dogs.are.great').get('/').reply(200);
180-
181-
const transaction = createTransactionOnScope();
182-
183-
expect(transaction.metadata.propagations).toBe(0);
184-
185-
http.get('http://dogs.are.great/');
186-
expect(transaction.metadata.propagations).toBe(1);
187-
188-
http.get('http://dogs.are.great/');
189-
expect(transaction.metadata.propagations).toBe(2);
190-
});
191-
192178
it("doesn't attach when using otel instrumenter", () => {
193179
const loggerLogSpy = jest.spyOn(logger, 'log');
194180

packages/remix/test/integration/test/server/loader.test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ describe.each(['builtin', 'express'])('Remix API Loaders with adapter = %s', ada
5555
transaction: 'routes/loader-json-response/$id',
5656
transaction_info: {
5757
source: 'route',
58-
changes: [],
59-
propagations: 0,
6058
},
6159
spans: [
6260
{

packages/replay/test/fixtures/transaction.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,14 +225,10 @@ export function Transaction(obj?: Partial<Event>): any {
225225
"[Tracing] Starting 'resource.other' span on transaction '/organizations/:orgId/replays/:replaySlug/' (b44b173b1c74a782).",
226226
},
227227
},
228-
changes: [],
229-
propagations: 2,
230228
sampleRate: 1,
231229
}, // }}}
232230
transaction_info: {
233231
source: 'route',
234-
changes: [],
235-
propagations: 2,
236232
},
237233
measurements: {
238234
longTaskCount: {

packages/tracing/src/browser/request.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,6 @@ export function fetchCallback(
219219
span,
220220
options,
221221
);
222-
223-
activeTransaction.metadata.propagations++;
224222
}
225223
}
226224
}
@@ -356,8 +354,6 @@ export function xhrCallback(
356354
// https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/setRequestHeader
357355
handlerData.xhr.setRequestHeader(BAGGAGE_HEADER_NAME, sentryBaggageHeader);
358356
}
359-
360-
activeTransaction.metadata.propagations++;
361357
} catch (_) {
362358
// Error: InvalidStateError: Failed to execute 'setRequestHeader' on 'XMLHttpRequest': The object's state must be OPENED.
363359
}

packages/tracing/src/transaction.ts

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import type {
1111
TransactionContext,
1212
TransactionMetadata,
1313
} from '@sentry/types';
14-
import { dropUndefinedKeys, logger, timestampInSeconds } from '@sentry/utils';
14+
import { dropUndefinedKeys, logger } from '@sentry/utils';
1515

1616
import { Span as SpanClass, SpanRecorder } from './span';
1717

@@ -52,8 +52,6 @@ export class Transaction extends SpanClass implements TransactionInterface {
5252
source: 'custom',
5353
...transactionContext.metadata,
5454
spanMetadata: {},
55-
changes: [],
56-
propagations: 0,
5755
};
5856

5957
this._trimEnd = transactionContext.trimEnd;
@@ -84,17 +82,6 @@ export class Transaction extends SpanClass implements TransactionInterface {
8482
* JSDoc
8583
*/
8684
public setName(name: string, source: TransactionMetadata['source'] = 'custom'): void {
87-
// `source` could change without the name changing if we discover that an unparameterized route is actually
88-
// parameterized by virtue of having no parameters in its path
89-
if (name !== this.name || source !== this.metadata.source) {
90-
this.metadata.changes.push({
91-
// log previous source
92-
source: this.metadata.source,
93-
timestamp: timestampInSeconds(),
94-
propagations: this.metadata.propagations,
95-
});
96-
}
97-
9885
this._name = name;
9986
this.metadata.source = source;
10087
}
@@ -197,8 +184,6 @@ export class Transaction extends SpanClass implements TransactionInterface {
197184
...(metadata.source && {
198185
transaction_info: {
199186
source: metadata.source,
200-
changes: metadata.changes,
201-
propagations: metadata.propagations,
202187
},
203188
}),
204189
};

packages/tracing/test/browser/request.test.ts

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -213,19 +213,6 @@ describe('callbacks', () => {
213213

214214
expect(newSpan).toBeUndefined();
215215
});
216-
217-
it('records outgoing propogations', () => {
218-
const firstReqData = { ...fetchHandlerData };
219-
const secondReqData = { ...fetchHandlerData };
220-
221-
expect(transaction.metadata.propagations).toBe(0);
222-
223-
fetchCallback(firstReqData, alwaysCreateSpan, alwaysAttachHeaders, {});
224-
expect(transaction.metadata.propagations).toBe(1);
225-
226-
fetchCallback(secondReqData, alwaysCreateSpan, alwaysAttachHeaders, {});
227-
expect(transaction.metadata.propagations).toBe(2);
228-
});
229216
});
230217

231218
describe('xhrCallback()', () => {
@@ -370,19 +357,6 @@ describe('callbacks', () => {
370357

371358
expect(newSpan).toBeUndefined();
372359
});
373-
374-
it('records outgoing propogations', () => {
375-
const firstReqData = { ...xhrHandlerData };
376-
const secondReqData = { ...xhrHandlerData };
377-
378-
expect(transaction.metadata.propagations).toBe(0);
379-
380-
xhrCallback(firstReqData, alwaysCreateSpan, alwaysAttachHeaders, {});
381-
expect(transaction.metadata.propagations).toBe(1);
382-
383-
xhrCallback(secondReqData, alwaysCreateSpan, alwaysAttachHeaders, {});
384-
expect(transaction.metadata.propagations).toBe(2);
385-
});
386360
});
387361
});
388362

packages/tracing/test/span.test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -508,8 +508,6 @@ describe('Span', () => {
508508
expect.objectContaining({
509509
transaction_info: {
510510
source: 'url',
511-
changes: [],
512-
propagations: 0,
513511
},
514512
}),
515513
);

0 commit comments

Comments
 (0)