Skip to content

Commit efcaaf8

Browse files
committed
request and error after span end
1 parent 18c058a commit efcaaf8

File tree

1 file changed

+20
-0
lines changed
  • dev-packages/browser-integration-tests/suites/tracing/dsc-txn-name-update

1 file changed

+20
-0
lines changed

dev-packages/browser-integration-tests/suites/tracing/dsc-txn-name-update/test.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ sentryTest('updates the DSC when the txn name is updated and high-quality', asyn
3030
8. Make request and check that baggage has updated HQ txn name
3131
9. Capture error and check that envelope trace header has updated HQ txn name
3232
10. End span and check that envelope trace header has updated HQ txn name
33+
11. Make another request and check that there's no span information in baggage
34+
12. Capture an error and check that envelope trace header has no span information
3335
*/
3436

3537
// 1
@@ -138,6 +140,24 @@ sentryTest('updates the DSC when the txn name is updated and high-quality', asyn
138140
});
139141

140142
expect(txnEvent.transaction).toEqual('updated-root-span-2');
143+
144+
// 11
145+
const baggageItemsAfterEnd = await makeRequestAndGetBaggageItems(page);
146+
expect(baggageItemsAfterEnd).toEqual([
147+
'sentry-environment=production',
148+
'sentry-public_key=public',
149+
'sentry-release=1.1.1',
150+
`sentry-trace_id=${traceId}`,
151+
]);
152+
153+
// 12
154+
const errorEnvelopeTraceHeaderAfterEnd = await captureErrorAndGetEnvelopeTraceHeader(page);
155+
expect(errorEnvelopeTraceHeaderAfterEnd).toEqual({
156+
environment: 'production',
157+
public_key: 'public',
158+
release: '1.1.1',
159+
trace_id: traceId,
160+
});
141161
});
142162

143163
async function makeRequestAndGetBaggageItems(page: Page): Promise<string[]> {

0 commit comments

Comments
 (0)