-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into onur/remix-express-formdata
- Loading branch information
Showing
100 changed files
with
1,068 additions
and
1,939 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...ation-tests/suites/tracing/browserTracingIntegration/pageloadWithChildSpanTimeout/init.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import * as Sentry from '@sentry/browser'; | ||
|
||
window.Sentry = Sentry; | ||
|
||
Sentry.init({ | ||
dsn: 'https://public@dsn.ingest.sentry.io/1337', | ||
integrations: [ | ||
Sentry.browserTracingIntegration({ | ||
// To avoid having this test run for 15s | ||
childSpanTimeout: 4000, | ||
}), | ||
], | ||
defaultIntegrations: false, | ||
tracesSampleRate: 1, | ||
}); | ||
|
||
const activeSpan = Sentry.getActiveSpan(); | ||
if (activeSpan) { | ||
Sentry.startInactiveSpan({ name: 'pageload-child-span' }); | ||
} else { | ||
setTimeout(() => { | ||
Sentry.startInactiveSpan({ name: 'pageload-child-span' }); | ||
}, 200); | ||
} |
28 changes: 28 additions & 0 deletions
28
...ation-tests/suites/tracing/browserTracingIntegration/pageloadWithChildSpanTimeout/test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { expect } from '@playwright/test'; | ||
|
||
import { sentryTest } from '../../../../utils/fixtures'; | ||
import { | ||
envelopeRequestParser, | ||
shouldSkipTracingTest, | ||
waitForTransactionRequestOnUrl, | ||
} from '../../../../utils/helpers'; | ||
|
||
// This tests asserts that the pageload span will finish itself after the child span timeout if it | ||
// has a child span without adding any additional ones or finishing any of them finishing. All of the child spans that | ||
// are still running should have the status "cancelled". | ||
sentryTest('should send a pageload span terminated via child span timeout', async ({ getLocalTestUrl, page }) => { | ||
if (shouldSkipTracingTest()) { | ||
sentryTest.skip(); | ||
} | ||
|
||
const url = await getLocalTestUrl({ testDir: __dirname }); | ||
const req = await waitForTransactionRequestOnUrl(page, url); | ||
|
||
const eventData = envelopeRequestParser(req); | ||
|
||
expect(eventData.contexts?.trace?.op).toBe('pageload'); | ||
expect(eventData.spans?.length).toBeGreaterThanOrEqual(1); | ||
const testSpan = eventData.spans?.find(span => span.description === 'pageload-child-span'); | ||
expect(testSpan).toBeDefined(); | ||
expect(testSpan?.status).toBe('cancelled'); | ||
}); |
14 changes: 0 additions & 14 deletions
14
...ation-tests/suites/tracing/browserTracingIntegration/pageloadWithHeartbeatTimeout/init.js
This file was deleted.
Oops, something went wrong.
26 changes: 0 additions & 26 deletions
26
...ation-tests/suites/tracing/browserTracingIntegration/pageloadWithHeartbeatTimeout/test.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.