Skip to content

Commit 618efe7

Browse files
author
Luca Forstner
authored
Merge branch 'lforst-request-span-hook' into lforst-nextjs-client-prefetch-op
2 parents 94588fd + 3f782ca commit 618efe7

File tree

76 files changed

+885
-965
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+885
-965
lines changed

.github/workflows/external-contributors.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
author_association: ${{ github.event.pull_request.author_association }}
3737

3838
- name: Create PR with changes
39-
uses: peter-evans/create-pull-request@dd2324fc52d5d43c699a5636bcf19fceaa70c284
39+
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e
4040
with:
4141
# This token is scoped to Daniel Griesser
4242
# If we used the default GITHUB_TOKEN, the resulting PR would not trigger CI :(

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,23 @@
1010

1111
- "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott
1212

13+
Work in this release was contributed by @Page-. Thank you for your contribution!
14+
15+
## 9.11.0
16+
17+
- feat(browser): Add `http.redirect_count` attribute to `browser.redirect` span ([#15943](https://github.com/getsentry/sentry-javascript/pull/15943))
18+
- feat(core): Add `consoleLoggingIntegration` for logs ([#15955](https://github.com/getsentry/sentry-javascript/pull/15955))
19+
- feat(core): Don't truncate error messages ([#15818](https://github.com/getsentry/sentry-javascript/pull/15818))
20+
- feat(nextjs): Add release injection in Turbopack ([#15958](https://github.com/getsentry/sentry-javascript/pull/15958))
21+
- feat(nextjs): Record `turbopack` as tag ([#15928](https://github.com/getsentry/sentry-javascript/pull/15928))
22+
- feat(nuxt): Base decision on source maps upload only on Nuxt source map settings ([#15859](https://github.com/getsentry/sentry-javascript/pull/15859))
23+
- feat(react-router): Add `sentryHandleRequest` ([#15787](https://github.com/getsentry/sentry-javascript/pull/15787))
24+
- fix(node): Use `module` instead of `require` for CJS check ([#15927](https://github.com/getsentry/sentry-javascript/pull/15927))
25+
- fix(remix): Remove mentions of deprecated `ErrorBoundary` wrapper ([#15930](https://github.com/getsentry/sentry-javascript/pull/15930))
26+
- ref(browser): Temporarily add `sentry.previous_trace` span attribute ([#15957](https://github.com/getsentry/sentry-javascript/pull/15957))
27+
- ref(browser/core): Move all log flushing logic into clients ([#15831](https://github.com/getsentry/sentry-javascript/pull/15831))
28+
- ref(core): Improve URL parsing utilities ([#15882](https://github.com/getsentry/sentry-javascript/pull/15882))
29+
1330
## 9.10.1
1431

1532
- fix: Correct @sentry-internal/feedback docs to match the code ([#15874](https://github.com/getsentry/sentry-javascript/pull/15874))

dev-packages/browser-integration-tests/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry-internal/browser-integration-tests",
3-
"version": "9.10.1",
3+
"version": "9.11.0",
44
"main": "index.js",
55
"license": "MIT",
66
"engines": {
@@ -42,7 +42,7 @@
4242
"@babel/preset-typescript": "^7.16.7",
4343
"@playwright/test": "~1.50.0",
4444
"@sentry-internal/rrweb": "2.34.0",
45-
"@sentry/browser": "9.10.1",
45+
"@sentry/browser": "9.11.0",
4646
"axios": "1.8.2",
4747
"babel-loader": "^8.2.2",
4848
"fflate": "0.8.2",

dev-packages/bundle-analyzer-scenarios/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry-internal/bundle-analyzer-scenarios",
3-
"version": "9.10.1",
3+
"version": "9.11.0",
44
"description": "Scenarios to test bundle analysis with",
55
"repository": "git://github.com/getsentry/sentry-javascript.git",
66
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/dev-packages/bundle-analyzer-scenarios",

dev-packages/clear-cache-gh-action/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@sentry-internal/clear-cache-gh-action",
33
"description": "An internal Github Action to clear GitHub caches.",
4-
"version": "9.10.1",
4+
"version": "9.11.0",
55
"license": "MIT",
66
"engines": {
77
"node": ">=18"

dev-packages/e2e-tests/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry-internal/e2e-tests",
3-
"version": "9.10.1",
3+
"version": "9.11.0",
44
"license": "MIT",
55
"private": true,
66
"scripts": {

dev-packages/external-contributor-gh-action/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@sentry-internal/external-contributor-gh-action",
33
"description": "An internal Github Action to add external contributors to the CHANGELOG.md file.",
4-
"version": "9.10.1",
4+
"version": "9.11.0",
55
"license": "MIT",
66
"engines": {
77
"node": ">=18"

dev-packages/node-integration-tests/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry-internal/node-integration-tests",
3-
"version": "9.10.1",
3+
"version": "9.11.0",
44
"license": "MIT",
55
"engines": {
66
"node": ">=18"
@@ -30,9 +30,9 @@
3030
"@nestjs/common": "10.4.6",
3131
"@nestjs/core": "10.4.6",
3232
"@nestjs/platform-express": "10.4.6",
33-
"@sentry/aws-serverless": "9.10.1",
34-
"@sentry/core": "9.10.1",
35-
"@sentry/node": "9.10.1",
33+
"@sentry/aws-serverless": "9.11.0",
34+
"@sentry/core": "9.11.0",
35+
"@sentry/node": "9.11.0",
3636
"@types/mongodb": "^3.6.20",
3737
"@types/mysql": "^2.15.21",
3838
"@types/pg": "^8.6.5",

dev-packages/node-integration-tests/suites/express/tracing/server.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@ Sentry.init({
88
tracePropagationTargets: [/^(?!.*test).*$/],
99
tracesSampleRate: 1.0,
1010
transport: loggingTransport,
11+
integrations: [
12+
Sentry.httpIntegration({
13+
ignoreIncomingRequestBody: (url) => {
14+
if (url.includes('/test-post-ignore-body')) {
15+
return true;
16+
}
17+
return false;
18+
},
19+
}),
20+
],
1121
});
1222

1323
// express must be required after Sentry is initialized
@@ -43,6 +53,10 @@ app.post('/test-post', function (req, res) {
4353
res.send({ status: 'ok', body: req.body });
4454
});
4555

56+
app.post('/test-post-ignore-body', function (req, res) {
57+
res.send({ status: 'ok', body: req.body });
58+
});
59+
4660
Sentry.setupExpressErrorHandler(app);
4761

4862
startExpressServerAndSendPortToRunner(app);

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

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { afterAll, describe, expect, test } from 'vitest';
22
import { cleanupChildProcesses, createRunner } from '../../../utils/runner';
3+
import { assertSentryTransaction } from '../../../utils/assertions';
34

45
describe('express tracing', () => {
56
afterAll(() => {
@@ -244,6 +245,34 @@ describe('express tracing', () => {
244245
});
245246
await runner.completed();
246247
});
248+
249+
test('correctly ignores request data', async () => {
250+
const runner = createRunner(__dirname, 'server.js')
251+
.expect({
252+
transaction: e => {
253+
assertSentryTransaction(e, {
254+
transaction: 'POST /test-post-ignore-body',
255+
request: {
256+
url: expect.stringMatching(/^http:\/\/localhost:(\d+)\/test-post-ignore-body$/),
257+
method: 'POST',
258+
headers: {
259+
'user-agent': expect.stringContaining(''),
260+
'content-type': 'application/octet-stream',
261+
},
262+
},
263+
});
264+
// Ensure the request body has been ignored
265+
expect(e).have.property('request').that.does.not.have.property('data');
266+
},
267+
})
268+
.start();
269+
270+
runner.makeRequest('post', '/test-post-ignore-body', {
271+
headers: { 'Content-Type': 'application/octet-stream' },
272+
data: Buffer.from('some plain text in buffer'),
273+
});
274+
await runner.completed();
275+
});
247276
});
248277
});
249278
});

0 commit comments

Comments
 (0)