Skip to content

Commit 6780114

Browse files
authored
Merge branch 'develop' into onur/remix-type-tests
2 parents 4e1e37e + f00ddcb commit 6780114

File tree

68 files changed

+570
-476
lines changed

Some content is hidden

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

68 files changed

+570
-476
lines changed

.size-limit.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ module.exports = [
5252
path: 'packages/browser/build/npm/esm/index.js',
5353
import: createImport('init', 'browserTracingIntegration', 'replayIntegration'),
5454
gzip: true,
55-
limit: '71 KB',
55+
limit: '70.1 KB',
5656
modifyWebpackConfig: function (config) {
5757
const webpack = require('webpack');
5858

@@ -206,7 +206,7 @@ module.exports = [
206206
import: createImport('init'),
207207
ignore: ['next/router', 'next/constants'],
208208
gzip: true,
209-
limit: '42.5 KB',
209+
limit: '42 KB',
210210
},
211211
// SvelteKit SDK (ESM)
212212
{

CHANGELOG.md

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

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

13+
## 9.22.0
14+
15+
### Important changes
16+
17+
- **Revert "feat(browser): Track measure detail as span attributes" ([#16348](https://github.com/getsentry/sentry-javascript/pull/16348))**
18+
19+
This is a revert of a feature introduced in `9.20.0` with [#16240](https://github.com/getsentry/sentry-javascript/pull/16240). This feature was causing crashes in firefox, so we are reverting it. We will re-enable this functionality in the future after fixing the crash.
20+
21+
### Other changes
22+
23+
- feat(deps): bump @sentry/rollup-plugin from 3.1.2 to 3.2.1 ([#15511](https://github.com/getsentry/sentry-javascript/pull/15511))
24+
- fix(remix): Use generic types for `ServerBuild` argument and return ([#16336](https://github.com/getsentry/sentry-javascript/pull/16336))
25+
26+
## 9.21.0
27+
28+
- docs: Fix v7 migration link ([#14629](https://github.com/getsentry/sentry-javascript/pull/14629))
29+
- feat(node): Vendor in `@fastify/otel` ([#16328](https://github.com/getsentry/sentry-javascript/pull/16328))
30+
- fix(nestjs): Handle multiple `OnEvent` decorators ([#16306](https://github.com/getsentry/sentry-javascript/pull/16306))
31+
- fix(node): Avoid creating breadcrumbs for suppressed requests ([#16285](https://github.com/getsentry/sentry-javascript/pull/16285))
32+
- fix(remix): Add missing `client` exports to `server` and `cloudflare` entries ([#16341](https://github.com/getsentry/sentry-javascript/pull/16341))
33+
1334
Work in this release was contributed by @phthhieu. Thank you for your contribution!
1435

1536
## 9.20.0

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.20.0",
3+
"version": "9.22.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.20.0",
45+
"@sentry/browser": "9.22.0",
4646
"@supabase/supabase-js": "2.49.3",
4747
"axios": "1.8.2",
4848
"babel-loader": "^8.2.2",

dev-packages/browser-integration-tests/suites/manual-client/skip-init-browser-extension/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ sentryTest(
2323
if (hasDebugLogs()) {
2424
expect(errorLogs.length).toEqual(1);
2525
expect(errorLogs[0]).toEqual(
26-
'[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/',
26+
'[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/',
2727
);
2828
} else {
2929
expect(errorLogs.length).toEqual(0);

dev-packages/browser-integration-tests/suites/manual-client/skip-init-chrome-extension/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ sentryTest('should not initialize when inside a Chrome browser extension', async
2121
if (hasDebugLogs()) {
2222
expect(errorLogs.length).toEqual(1);
2323
expect(errorLogs[0]).toEqual(
24-
'[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/',
24+
'[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/',
2525
);
2626
} else {
2727
expect(errorLogs.length).toEqual(0);

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.20.0",
3+
"version": "9.22.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.20.0",
4+
"version": "9.22.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.20.0",
3+
"version": "9.22.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.20.0",
4+
"version": "9.22.0",
55
"license": "MIT",
66
"engines": {
77
"node": ">=18"

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry-internal/node-integration-tests",
3-
"version": "9.20.0",
3+
"version": "9.22.0",
44
"license": "MIT",
55
"engines": {
66
"node": ">=18"
@@ -30,9 +30,9 @@
3030
"@nestjs/common": "11.0.16",
3131
"@nestjs/core": "10.4.6",
3232
"@nestjs/platform-express": "10.4.6",
33-
"@sentry/aws-serverless": "9.20.0",
34-
"@sentry/core": "9.20.0",
35-
"@sentry/node": "9.20.0",
33+
"@sentry/aws-serverless": "9.22.0",
34+
"@sentry/core": "9.22.0",
35+
"@sentry/node": "9.22.0",
3636
"@types/mongodb": "^3.6.20",
3737
"@types/mysql": "^2.15.21",
3838
"@types/pg": "^8.6.5",
@@ -60,7 +60,7 @@
6060
"nock": "^13.5.5",
6161
"node-cron": "^3.0.3",
6262
"node-schedule": "^2.1.1",
63-
"pg": "^8.7.3",
63+
"pg": "8.16.0",
6464
"proxy": "^2.1.1",
6565
"redis-4": "npm:redis@^4.6.14",
6666
"reflect-metadata": "0.2.1",

dev-packages/node-integration-tests/suites/tracing/postgres/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ services:
66
restart: always
77
container_name: integration-tests-postgres
88
ports:
9-
- '5444:5432'
9+
- '5494:5432'
1010
environment:
1111
POSTGRES_USER: test
1212
POSTGRES_PASSWORD: test
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"name": "sentry-postgres-test",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "index.js",
6+
"engines": {
7+
"node": ">=18"
8+
},
9+
"keywords": [],
10+
"author": "",
11+
"license": "ISC",
12+
"dependencies": {
13+
"pg": "8.16.0",
14+
"pg-native": "3.5.0"
15+
}
16+
}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
const { loggingTransport } = require('@sentry-internal/node-integration-tests');
2+
const Sentry = require('@sentry/node');
3+
4+
Sentry.init({
5+
dsn: 'https://[email protected]/1337',
6+
release: '1.0',
7+
tracesSampleRate: 1.0,
8+
transport: loggingTransport,
9+
});
10+
11+
// Stop the process from exiting before the transaction is sent
12+
setInterval(() => {}, 1000);
13+
14+
const { native } = require('pg');
15+
16+
const { Client } = native;
17+
18+
const client = new Client({ port: 5494, user: 'test', password: 'test', database: 'tests' });
19+
20+
async function run() {
21+
await Sentry.startSpan(
22+
{
23+
name: 'Test Transaction',
24+
op: 'transaction',
25+
},
26+
async () => {
27+
try {
28+
await client.connect();
29+
30+
await client
31+
.query(
32+
'CREATE TABLE "NativeUser" ("id" SERIAL NOT NULL,"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,"email" TEXT NOT NULL,"name" TEXT,CONSTRAINT "User_pkey" PRIMARY KEY ("id"));',
33+
)
34+
.catch(() => {
35+
// if this is not a fresh database, the table might already exist
36+
});
37+
38+
await client.query('INSERT INTO "NativeUser" ("email", "name") VALUES ($1, $2)', ['tim', '[email protected]']);
39+
await client.query('SELECT * FROM "NativeUser"');
40+
} finally {
41+
await client.end();
42+
}
43+
},
44+
);
45+
}
46+
47+
// eslint-disable-next-line @typescript-eslint/no-floating-promises
48+
run();

dev-packages/node-integration-tests/suites/tracing/postgres/scenario.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ setInterval(() => {}, 1000);
1313

1414
const { Client } = require('pg');
1515

16-
const client = new Client({ port: 5444, user: 'test', password: 'test', database: 'tests' });
16+
const client = new Client({ port: 5494, user: 'test', password: 'test', database: 'tests' });
1717

1818
async function run() {
1919
await Sentry.startSpan(

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

Lines changed: 61 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { describe, expect, test } from 'vitest';
22
import { createRunner } from '../../../utils/runner';
33

44
describe('postgres auto instrumentation', () => {
5-
test('should auto-instrument `pg` package', { timeout: 60_000 }, async () => {
5+
test('should auto-instrument `pg` package', { timeout: 90_000 }, async () => {
66
const EXPECTED_TRANSACTION = {
77
transaction: 'Test Transaction',
88
spans: expect.arrayContaining([
@@ -47,7 +47,66 @@ describe('postgres auto instrumentation', () => {
4747
};
4848

4949
await createRunner(__dirname, 'scenario.js')
50-
.withDockerCompose({ workingDirectory: [__dirname], readyMatches: ['port 5432'] })
50+
.withDockerCompose({
51+
workingDirectory: [__dirname],
52+
readyMatches: ['port 5432'],
53+
setupCommand: 'yarn',
54+
})
55+
.expect({ transaction: EXPECTED_TRANSACTION })
56+
.start()
57+
.completed();
58+
});
59+
60+
test('should auto-instrument `pg-native` package', { timeout: 90_000 }, async () => {
61+
const EXPECTED_TRANSACTION = {
62+
transaction: 'Test Transaction',
63+
spans: expect.arrayContaining([
64+
expect.objectContaining({
65+
data: expect.objectContaining({
66+
'db.system': 'postgresql',
67+
'db.name': 'tests',
68+
'sentry.origin': 'manual',
69+
'sentry.op': 'db',
70+
}),
71+
description: 'pg.connect',
72+
op: 'db',
73+
status: 'ok',
74+
}),
75+
expect.objectContaining({
76+
data: expect.objectContaining({
77+
'db.system': 'postgresql',
78+
'db.name': 'tests',
79+
'db.statement': 'INSERT INTO "NativeUser" ("email", "name") VALUES ($1, $2)',
80+
'sentry.origin': 'auto.db.otel.postgres',
81+
'sentry.op': 'db',
82+
}),
83+
description: 'INSERT INTO "NativeUser" ("email", "name") VALUES ($1, $2)',
84+
op: 'db',
85+
status: 'ok',
86+
origin: 'auto.db.otel.postgres',
87+
}),
88+
expect.objectContaining({
89+
data: expect.objectContaining({
90+
'db.system': 'postgresql',
91+
'db.name': 'tests',
92+
'db.statement': 'SELECT * FROM "NativeUser"',
93+
'sentry.origin': 'auto.db.otel.postgres',
94+
'sentry.op': 'db',
95+
}),
96+
description: 'SELECT * FROM "NativeUser"',
97+
op: 'db',
98+
status: 'ok',
99+
origin: 'auto.db.otel.postgres',
100+
}),
101+
]),
102+
};
103+
104+
await createRunner(__dirname, 'scenario-native.js')
105+
.withDockerCompose({
106+
workingDirectory: [__dirname],
107+
readyMatches: ['port 5432'],
108+
setupCommand: 'yarn',
109+
})
51110
.expect({ transaction: EXPECTED_TRANSACTION })
52111
.start()
53112
.completed();

0 commit comments

Comments
 (0)