-
-
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 pull request #15400 from getsentry/prepare-release/9.1.0
meta(changelog): Update changelog for 9.1.0
- Loading branch information
Showing
98 changed files
with
3,148 additions
and
761 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
17 changes: 17 additions & 0 deletions
17
dev-packages/browser-integration-tests/suites/integrations/graphqlClient/fetch/subject.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,17 @@ | ||
const query = `query Test{ | ||
people { | ||
name | ||
pet | ||
} | ||
}`; | ||
|
||
const requestBody = JSON.stringify({ query }); | ||
|
||
fetch('http://sentry-test.io/foo', { | ||
method: 'POST', | ||
headers: { | ||
Accept: 'application/json', | ||
'Content-Type': 'application/json', | ||
}, | ||
body: requestBody, | ||
}); |
103 changes: 103 additions & 0 deletions
103
dev-packages/browser-integration-tests/suites/integrations/graphqlClient/fetch/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,103 @@ | ||
import { expect } from '@playwright/test'; | ||
import type { Event } from '@sentry/core'; | ||
|
||
import { sentryTest } from '../../../../utils/fixtures'; | ||
import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../../utils/helpers'; | ||
|
||
// Duplicate from subject.js | ||
const query = `query Test{ | ||
people { | ||
name | ||
pet | ||
} | ||
}`; | ||
const queryPayload = JSON.stringify({ query }); | ||
|
||
sentryTest('should update spans for GraphQL fetch requests', async ({ getLocalTestUrl, page }) => { | ||
if (shouldSkipTracingTest()) { | ||
return; | ||
} | ||
|
||
const url = await getLocalTestUrl({ testDir: __dirname }); | ||
|
||
await page.route('**/foo', route => { | ||
return route.fulfill({ | ||
status: 200, | ||
body: JSON.stringify({ | ||
people: [ | ||
{ name: 'Amy', pet: 'dog' }, | ||
{ name: 'Jay', pet: 'cat' }, | ||
], | ||
}), | ||
headers: { | ||
'Content-Type': 'application/json', | ||
}, | ||
}); | ||
}); | ||
|
||
const eventData = await getFirstSentryEnvelopeRequest<Event>(page, url); | ||
const requestSpans = eventData.spans?.filter(({ op }) => op === 'http.client'); | ||
|
||
expect(requestSpans).toHaveLength(1); | ||
|
||
expect(requestSpans![0]).toMatchObject({ | ||
description: 'POST http://sentry-test.io/foo (query Test)', | ||
parent_span_id: eventData.contexts?.trace?.span_id, | ||
span_id: expect.any(String), | ||
start_timestamp: expect.any(Number), | ||
timestamp: expect.any(Number), | ||
trace_id: eventData.contexts?.trace?.trace_id, | ||
status: 'ok', | ||
data: expect.objectContaining({ | ||
type: 'fetch', | ||
'http.method': 'POST', | ||
'http.url': 'http://sentry-test.io/foo', | ||
url: 'http://sentry-test.io/foo', | ||
'server.address': 'sentry-test.io', | ||
'sentry.op': 'http.client', | ||
'sentry.origin': 'auto.http.browser', | ||
'graphql.document': queryPayload, | ||
}), | ||
}); | ||
}); | ||
|
||
sentryTest('should update breadcrumbs for GraphQL fetch requests', async ({ getLocalTestUrl, page }) => { | ||
if (shouldSkipTracingTest()) { | ||
return; | ||
} | ||
|
||
const url = await getLocalTestUrl({ testDir: __dirname }); | ||
|
||
await page.route('**/foo', route => { | ||
return route.fulfill({ | ||
status: 200, | ||
body: JSON.stringify({ | ||
people: [ | ||
{ name: 'Amy', pet: 'dog' }, | ||
{ name: 'Jay', pet: 'cat' }, | ||
], | ||
}), | ||
headers: { | ||
'Content-Type': 'application/json', | ||
}, | ||
}); | ||
}); | ||
|
||
const eventData = await getFirstSentryEnvelopeRequest<Event>(page, url); | ||
|
||
expect(eventData?.breadcrumbs?.length).toBe(1); | ||
|
||
expect(eventData!.breadcrumbs![0]).toEqual({ | ||
timestamp: expect.any(Number), | ||
category: 'fetch', | ||
type: 'http', | ||
data: { | ||
method: 'POST', | ||
status_code: 200, | ||
url: 'http://sentry-test.io/foo', | ||
__span: expect.any(String), | ||
'graphql.document': query, | ||
'graphql.operation': 'query Test', | ||
}, | ||
}); | ||
}); |
16 changes: 16 additions & 0 deletions
16
dev-packages/browser-integration-tests/suites/integrations/graphqlClient/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,16 @@ | ||
import * as Sentry from '@sentry/browser'; | ||
// Must import this like this to ensure the test transformation for CDN bundles works | ||
import { graphqlClientIntegration } from '@sentry/browser'; | ||
|
||
window.Sentry = Sentry; | ||
|
||
Sentry.init({ | ||
dsn: 'https://[email protected]/1337', | ||
integrations: [ | ||
Sentry.browserTracingIntegration(), | ||
graphqlClientIntegration({ | ||
endpoints: ['http://sentry-test.io/foo'], | ||
}), | ||
], | ||
tracesSampleRate: 1, | ||
}); |
15 changes: 15 additions & 0 deletions
15
dev-packages/browser-integration-tests/suites/integrations/graphqlClient/xhr/subject.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,15 @@ | ||
const xhr = new XMLHttpRequest(); | ||
|
||
xhr.open('POST', 'http://sentry-test.io/foo'); | ||
xhr.setRequestHeader('Accept', 'application/json'); | ||
xhr.setRequestHeader('Content-Type', 'application/json'); | ||
|
||
const query = `query Test{ | ||
people { | ||
name | ||
pet | ||
} | ||
}`; | ||
|
||
const requestBody = JSON.stringify({ query }); | ||
xhr.send(requestBody); |
102 changes: 102 additions & 0 deletions
102
dev-packages/browser-integration-tests/suites/integrations/graphqlClient/xhr/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,102 @@ | ||
import { expect } from '@playwright/test'; | ||
import type { Event } from '@sentry/core'; | ||
|
||
import { sentryTest } from '../../../../utils/fixtures'; | ||
import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../../utils/helpers'; | ||
|
||
// Duplicate from subject.js | ||
const query = `query Test{ | ||
people { | ||
name | ||
pet | ||
} | ||
}`; | ||
const queryPayload = JSON.stringify({ query }); | ||
|
||
sentryTest('should update spans for GraphQL XHR requests', async ({ getLocalTestUrl, page }) => { | ||
if (shouldSkipTracingTest()) { | ||
return; | ||
} | ||
|
||
const url = await getLocalTestUrl({ testDir: __dirname }); | ||
|
||
await page.route('**/foo', route => { | ||
return route.fulfill({ | ||
status: 200, | ||
body: JSON.stringify({ | ||
people: [ | ||
{ name: 'Amy', pet: 'dog' }, | ||
{ name: 'Jay', pet: 'cat' }, | ||
], | ||
}), | ||
headers: { | ||
'Content-Type': 'application/json', | ||
}, | ||
}); | ||
}); | ||
|
||
const eventData = await getFirstSentryEnvelopeRequest<Event>(page, url); | ||
const requestSpans = eventData.spans?.filter(({ op }) => op === 'http.client'); | ||
|
||
expect(requestSpans).toHaveLength(1); | ||
|
||
expect(requestSpans![0]).toMatchObject({ | ||
description: 'POST http://sentry-test.io/foo (query Test)', | ||
parent_span_id: eventData.contexts?.trace?.span_id, | ||
span_id: expect.any(String), | ||
start_timestamp: expect.any(Number), | ||
timestamp: expect.any(Number), | ||
trace_id: eventData.contexts?.trace?.trace_id, | ||
status: 'ok', | ||
data: { | ||
type: 'xhr', | ||
'http.method': 'POST', | ||
'http.url': 'http://sentry-test.io/foo', | ||
url: 'http://sentry-test.io/foo', | ||
'server.address': 'sentry-test.io', | ||
'sentry.op': 'http.client', | ||
'sentry.origin': 'auto.http.browser', | ||
'graphql.document': queryPayload, | ||
}, | ||
}); | ||
}); | ||
|
||
sentryTest('should update breadcrumbs for GraphQL XHR requests', async ({ getLocalTestUrl, page }) => { | ||
if (shouldSkipTracingTest()) { | ||
return; | ||
} | ||
|
||
const url = await getLocalTestUrl({ testDir: __dirname }); | ||
|
||
await page.route('**/foo', route => { | ||
return route.fulfill({ | ||
status: 200, | ||
body: JSON.stringify({ | ||
people: [ | ||
{ name: 'Amy', pet: 'dog' }, | ||
{ name: 'Jay', pet: 'cat' }, | ||
], | ||
}), | ||
headers: { | ||
'Content-Type': 'application/json', | ||
}, | ||
}); | ||
}); | ||
|
||
const eventData = await getFirstSentryEnvelopeRequest<Event>(page, url); | ||
|
||
expect(eventData?.breadcrumbs?.length).toBe(1); | ||
|
||
expect(eventData!.breadcrumbs![0]).toEqual({ | ||
timestamp: expect.any(Number), | ||
category: 'xhr', | ||
type: 'http', | ||
data: { | ||
method: 'POST', | ||
status_code: 200, | ||
url: 'http://sentry-test.io/foo', | ||
'graphql.document': query, | ||
'graphql.operation': 'query Test', | ||
}, | ||
}); | ||
}); |
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
32 changes: 32 additions & 0 deletions
32
dev-packages/e2e-tests/test-applications/react-router-7-framework/.gitignore
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,32 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
/test-results/ | ||
/playwright-report/ | ||
/playwright/.cache/ | ||
|
||
!*.d.ts | ||
|
||
# react router | ||
.react-router |
2 changes: 2 additions & 0 deletions
2
dev-packages/e2e-tests/test-applications/react-router-7-framework/.npmrc
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,2 @@ | ||
@sentry:registry=http://127.0.0.1:4873 | ||
@sentry-internal:registry=http://127.0.0.1:4873 |
6 changes: 6 additions & 0 deletions
6
dev-packages/e2e-tests/test-applications/react-router-7-framework/app/app.css
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,6 @@ | ||
html, | ||
body { | ||
@media (prefers-color-scheme: dark) { | ||
color-scheme: dark; | ||
} | ||
} |
Oops, something went wrong.