Skip to content

CLOSED - add node support for generic featureFlagsIntegration and move utils to core #16537

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 42 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
70ccac1
Dup integration and utils to core, todos in index and integration
aliu39 Jun 10, 2025
6381f91
Import utils from core with _INTERNAL_ prefix
aliu39 Jun 10, 2025
a93b0e0
Delete old browser utils and integration and yarn fix
aliu39 Jun 10, 2025
4366e5a
Keep browser in docstr example
aliu39 Jun 10, 2025
868cd71
Export from same pkgs as zodErrorsIntegration, except remix, solidsta…
aliu39 Jun 10, 2025
2b9a867
Merge branch 'aliu/span-flags-v2' into aliu/move-ffs-to-core
aliu39 Jun 10, 2025
1611330
Add on error node tests. TODO export/import buffer sizes as _INTERNAL
aliu39 Jun 10, 2025
8124a40
Merge branch 'aliu/move-ffs-to-core' of https://github.com/getsentry/…
aliu39 Jun 10, 2025
f56cc3e
fix(sveltekit): Add import attribute for node exports (#16528)
eltigerchino Jun 11, 2025
70a57e6
chore: Add external contributor to CHANGELOG.md (#16543)
HazAT Jun 11, 2025
0b0942f
meta(changelog): Update changelog for 9.28.1
Lms24 Jun 11, 2025
1ce9e77
Merge pull request #16544 from getsentry/prepare-release/9.28.1
Lms24 Jun 11, 2025
111db4a
release: 9.28.1
getsentry-bot Jun 11, 2025
a72ca10
chore(otel-v2-tests): Fix formatting and linting errors (#16546)
Lms24 Jun 11, 2025
0ce6dc5
Merge branch 'release/9.28.1'
Jun 11, 2025
5fc0388
feat(ember): Stop warning for `onError` usage (#16547)
mydea Jun 11, 2025
91ee98d
Merge pull request #16548 from getsentry/master
github-actions[bot] Jun 11, 2025
fee86b0
fix(browser): Ensure `suppressTracing` does not leak when async (#16545)
mydea Jun 11, 2025
88e3f8f
feat(node): Allow to force activate `vercelAiIntegration` (#16551)
mydea Jun 11, 2025
eb59604
feat(deps): Bump @sentry/rollup-plugin from 3.4.0 to 3.5.0 (#16524)
dependabot[bot] Jun 11, 2025
ba3728d
feat(node): Introduce `ignoreLayersType` option to koa integration (#…
AbhiPrasad Jun 11, 2025
65310d5
chore: Document `process.env.DEBUG` in node integration tests README …
AbhiPrasad Jun 11, 2025
6fc18fe
feat(browser): Update `web-vitals` to 5.0.2 (#16492)
Lms24 Jun 12, 2025
6b656b4
fix(vue): Ensure root component render span always ends (#16488)
Lms24 Jun 12, 2025
cbfada0
test(node): Fix nestjs-11 E2E test by pinning version
mydea Jun 12, 2025
e26e334
test(trpc): Fix E2E test by pinning to 11.3.0
mydea Jun 12, 2025
038cb5d
test: Fix E2E tests by pinning dependencies (#16569)
mydea Jun 12, 2025
6882abf
meta(changelog): Update changelog for 9.29.0
Lms24 Jun 12, 2025
65d6bd4
chore(deps): Upgrade tpml to 1.0.5 (#16512)
AbhiPrasad Jun 12, 2025
3bb5ac8
Merge pull request #16563 from getsentry/prepare-release/9.29.0
Lms24 Jun 12, 2025
6d70326
release: 9.29.0
getsentry-bot Jun 12, 2025
9cce949
Add flags to attrs directly on eval
aliu39 Jun 12, 2025
52385ee
Rename util
aliu39 Jun 12, 2025
90d9289
Move FF type to core utils file
aliu39 Jun 12, 2025
bca65dd
Export buffer sizes from core as _INTERNAL_
aliu39 Jun 12, 2025
c92a9b0
feat(node): Ensure `modulesIntegration` works in more environments (#…
mydea Jun 13, 2025
afe49dd
Merge branch 'release/9.29.0'
Jun 13, 2025
2e4d243
Merge pull request #16576 from getsentry/master
github-actions[bot] Jun 13, 2025
d35030d
feat(node): Automatically enable `vercelAiIntegration` when `ai` modu…
mydea Jun 13, 2025
4e7c7ef
feat(browser): Add detail to measure spans and add regression tests (…
AbhiPrasad Jun 13, 2025
db2fa33
Remove allowEviction
aliu39 Jun 15, 2025
b3d746b
Merge branch 'develop' of https://github.com/getsentry/sentry-javascr…
aliu39 Jun 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .size-limit.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ module.exports = [
import: createImport('init', 'ErrorBoundary', 'reactRouterV6BrowserTracingIntegration'),
ignore: ['react/jsx-runtime'],
gzip: true,
limit: '40.5 KB',
limit: '41 KB',
},
// Vue SDK (ESM)
{
Expand Down Expand Up @@ -215,7 +215,7 @@ module.exports = [
import: createImport('init'),
ignore: ['$app/stores'],
gzip: true,
limit: '39 KB',
limit: '40 KB',
},
// Node SDK (ESM)
{
Expand Down
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,31 @@

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

## 9.29.0

### Important Changes

- **feat(browser): Update `web-vitals` to 5.0.2 ([#16492](https://github.com/getsentry/sentry-javascript/pull/16492))**

This release upgrades the `web-vitals` library to version 5.0.2. This upgrade could slightly change the collected web vital values and potentially also influence alerts and performance scores in the Sentry UI.

### Other Changes

- feat(deps): Bump @sentry/rollup-plugin from 3.4.0 to 3.5.0 ([#16524](https://github.com/getsentry/sentry-javascript/pull/16524))
- feat(ember): Stop warning for `onError` usage ([#16547](https://github.com/getsentry/sentry-javascript/pull/16547))
- feat(node): Allow to force activate `vercelAiIntegration` ([#16551](https://github.com/getsentry/sentry-javascript/pull/16551))
- feat(node): Introduce `ignoreLayersType` option to koa integration ([#16553](https://github.com/getsentry/sentry-javascript/pull/16553))
- fix(browser): Ensure `suppressTracing` does not leak when async ([#16545](https://github.com/getsentry/sentry-javascript/pull/16545))
- fix(vue): Ensure root component render span always ends ([#16488](https://github.com/getsentry/sentry-javascript/pull/16488))

## 9.28.1

- feat(deps): Bump @sentry/cli from 2.45.0 to 2.46.0 ([#16516](https://github.com/getsentry/sentry-javascript/pull/16516))
- fix(nextjs): Avoid tracing calls to symbolication server on dev ([#16533](https://github.com/getsentry/sentry-javascript/pull/16533))
- fix(sveltekit): Add import attribute for node exports ([#16528](https://github.com/getsentry/sentry-javascript/pull/16528))

Work in this release was contributed by @eltigerchino. Thank you for your contribution!

## 9.28.0

### Important Changes
Expand Down
4 changes: 2 additions & 2 deletions dev-packages/browser-integration-tests/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sentry-internal/browser-integration-tests",
"version": "9.28.0",
"version": "9.29.0",
"main": "index.js",
"license": "MIT",
"engines": {
Expand Down Expand Up @@ -42,7 +42,7 @@
"@babel/preset-typescript": "^7.16.7",
"@playwright/test": "~1.50.0",
"@sentry-internal/rrweb": "2.34.0",
"@sentry/browser": "9.28.0",
"@sentry/browser": "9.29.0",
"@supabase/supabase-js": "2.49.3",
"axios": "1.8.2",
"babel-loader": "^8.2.2",
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { expect } from '@playwright/test';
import { _INTERNAL_FLAG_BUFFER_SIZE as FLAG_BUFFER_SIZE } from '@sentry/core';
import { sentryTest } from '../../../../../../utils/fixtures';
import {
envelopeRequestParser,
shouldSkipFeatureFlagsTest,
waitForErrorRequest,
} from '../../../../../../utils/helpers';
import { FLAG_BUFFER_SIZE } from '../../../constants';

sentryTest('Basic test with eviction, update, and no async tasks', async ({ getLocalTestUrl, page }) => {
if (shouldSkipFeatureFlagsTest()) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { expect } from '@playwright/test';
import { _INTERNAL_MAX_FLAGS_PER_SPAN as MAX_FLAGS_PER_SPAN } from '@sentry/core';
import { sentryTest } from '../../../../../utils/fixtures';
import {
type EventAndTraceHeader,
Expand All @@ -7,7 +8,6 @@ import {
shouldSkipFeatureFlagsTest,
shouldSkipTracingTest,
} from '../../../../../utils/helpers';
import { MAX_FLAGS_PER_SPAN } from '../../constants';

sentryTest("Feature flags are added to active span's attributes on span end.", async ({ getLocalTestUrl, page }) => {
if (shouldSkipFeatureFlagsTest() || shouldSkipTracingTest()) {
Expand Down Expand Up @@ -58,12 +58,9 @@ sentryTest("Feature flags are added to active span's attributes on span end.", a
expect(innerSpanFlags).toEqual([]);

const expectedOuterSpanFlags = [];
for (let i = 1; i <= 2; i++) {
expectedOuterSpanFlags.push([`flag.evaluation.feat${i}`, false]);
for (let i = 1; i <= MAX_FLAGS_PER_SPAN; i++) {
expectedOuterSpanFlags.push([`flag.evaluation.feat${i}`, i === 3]);
}
for (let i = 4; i <= MAX_FLAGS_PER_SPAN; i++) {
expectedOuterSpanFlags.push([`flag.evaluation.feat${i}`, false]);
}
expectedOuterSpanFlags.push(['flag.evaluation.feat3', true]);
expect(outerSpanFlags).toEqual(expectedOuterSpanFlags);
// Order agnostic (attribute dict is unordered).
expect(outerSpanFlags.sort()).toEqual(expectedOuterSpanFlags.sort());
});
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { expect } from '@playwright/test';
import { _INTERNAL_FLAG_BUFFER_SIZE as FLAG_BUFFER_SIZE } from '@sentry/core';
import { sentryTest } from '../../../../../../utils/fixtures';
import {
envelopeRequestParser,
shouldSkipFeatureFlagsTest,
waitForErrorRequest,
} from '../../../../../../utils/helpers';
import { FLAG_BUFFER_SIZE } from '../../../constants';

sentryTest('Basic test with eviction, update, and no async tasks', async ({ getLocalTestUrl, page }) => {
if (shouldSkipFeatureFlagsTest()) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { expect } from '@playwright/test';
import { _INTERNAL_MAX_FLAGS_PER_SPAN as MAX_FLAGS_PER_SPAN } from '@sentry/core';
import { sentryTest } from '../../../../../utils/fixtures';
import {
type EventAndTraceHeader,
Expand All @@ -7,7 +8,6 @@ import {
shouldSkipFeatureFlagsTest,
shouldSkipTracingTest,
} from '../../../../../utils/helpers';
import { MAX_FLAGS_PER_SPAN } from '../../constants';

sentryTest("Feature flags are added to active span's attributes on span end.", async ({ getLocalTestUrl, page }) => {
if (shouldSkipFeatureFlagsTest() || shouldSkipTracingTest()) {
Expand Down Expand Up @@ -58,12 +58,9 @@ sentryTest("Feature flags are added to active span's attributes on span end.", a
expect(innerSpanFlags).toEqual([]);

const expectedOuterSpanFlags = [];
for (let i = 1; i <= 2; i++) {
expectedOuterSpanFlags.push([`flag.evaluation.feat${i}`, false]);
for (let i = 1; i <= MAX_FLAGS_PER_SPAN; i++) {
expectedOuterSpanFlags.push([`flag.evaluation.feat${i}`, i === 3]);
}
for (let i = 4; i <= MAX_FLAGS_PER_SPAN; i++) {
expectedOuterSpanFlags.push([`flag.evaluation.feat${i}`, false]);
}
expectedOuterSpanFlags.push(['flag.evaluation.feat3', true]);
expect(outerSpanFlags).toEqual(expectedOuterSpanFlags);
// Order agnostic (attribute dict is unordered).
expect(outerSpanFlags.sort()).toEqual(expectedOuterSpanFlags.sort());
});
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { expect } from '@playwright/test';
import { _INTERNAL_FLAG_BUFFER_SIZE as FLAG_BUFFER_SIZE } from '@sentry/core';
import { sentryTest } from '../../../../../../utils/fixtures';
import {
envelopeRequestParser,
shouldSkipFeatureFlagsTest,
waitForErrorRequest,
} from '../../../../../../utils/helpers';
import { FLAG_BUFFER_SIZE } from '../../../constants';

sentryTest('Basic test with eviction, update, and no async tasks', async ({ getLocalTestUrl, page }) => {
if (shouldSkipFeatureFlagsTest()) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { expect } from '@playwright/test';
import { _INTERNAL_FLAG_BUFFER_SIZE as FLAG_BUFFER_SIZE } from '@sentry/core';
import { sentryTest } from '../../../../../../utils/fixtures';
import {
envelopeRequestParser,
shouldSkipFeatureFlagsTest,
waitForErrorRequest,
} from '../../../../../../utils/helpers';
import { FLAG_BUFFER_SIZE } from '../../../constants';

sentryTest('Flag evaluation error hook', async ({ getLocalTestUrl, page }) => {
if (shouldSkipFeatureFlagsTest()) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { expect } from '@playwright/test';
import { _INTERNAL_MAX_FLAGS_PER_SPAN as MAX_FLAGS_PER_SPAN } from '@sentry/core';
import { sentryTest } from '../../../../../utils/fixtures';
import {
type EventAndTraceHeader,
Expand All @@ -7,7 +8,6 @@ import {
shouldSkipFeatureFlagsTest,
shouldSkipTracingTest,
} from '../../../../../utils/helpers';
import { MAX_FLAGS_PER_SPAN } from '../../constants';

sentryTest("Feature flags are added to active span's attributes on span end.", async ({ getLocalTestUrl, page }) => {
if (shouldSkipFeatureFlagsTest() || shouldSkipTracingTest()) {
Expand Down Expand Up @@ -58,12 +58,9 @@ sentryTest("Feature flags are added to active span's attributes on span end.", a
expect(innerSpanFlags).toEqual([]);

const expectedOuterSpanFlags = [];
for (let i = 1; i <= 2; i++) {
expectedOuterSpanFlags.push([`flag.evaluation.feat${i}`, false]);
for (let i = 1; i <= MAX_FLAGS_PER_SPAN; i++) {
expectedOuterSpanFlags.push([`flag.evaluation.feat${i}`, i === 3]);
}
for (let i = 4; i <= MAX_FLAGS_PER_SPAN; i++) {
expectedOuterSpanFlags.push([`flag.evaluation.feat${i}`, false]);
}
expectedOuterSpanFlags.push(['flag.evaluation.feat3', true]);
expect(outerSpanFlags).toEqual(expectedOuterSpanFlags);
// Order agnostic (attribute dict is unordered).
expect(outerSpanFlags.sort()).toEqual(expectedOuterSpanFlags.sort());
});
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { expect } from '@playwright/test';
import { _INTERNAL_FLAG_BUFFER_SIZE as FLAG_BUFFER_SIZE } from '@sentry/core';
import { sentryTest } from '../../../../../../utils/fixtures';
import {
envelopeRequestParser,
shouldSkipFeatureFlagsTest,
waitForErrorRequest,
} from '../../../../../../utils/helpers';
import { FLAG_BUFFER_SIZE } from '../../../constants';

sentryTest('Basic test with eviction, update, and no async tasks', async ({ getLocalTestUrl, page }) => {
if (shouldSkipFeatureFlagsTest()) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { expect } from '@playwright/test';
import { _INTERNAL_MAX_FLAGS_PER_SPAN as MAX_FLAGS_PER_SPAN } from '@sentry/core';
import { sentryTest } from '../../../../../utils/fixtures';
import {
type EventAndTraceHeader,
Expand All @@ -7,7 +8,6 @@ import {
shouldSkipFeatureFlagsTest,
shouldSkipTracingTest,
} from '../../../../../utils/helpers';
import { MAX_FLAGS_PER_SPAN } from '../../constants';

sentryTest("Feature flags are added to active span's attributes on span end.", async ({ getLocalTestUrl, page }) => {
if (shouldSkipFeatureFlagsTest() || shouldSkipTracingTest()) {
Expand Down Expand Up @@ -62,12 +62,9 @@ sentryTest("Feature flags are added to active span's attributes on span end.", a
expect(innerSpanFlags).toEqual([]);

const expectedOuterSpanFlags = [];
for (let i = 1; i <= 2; i++) {
expectedOuterSpanFlags.push([`flag.evaluation.feat${i}`, false]);
for (let i = 1; i <= MAX_FLAGS_PER_SPAN; i++) {
expectedOuterSpanFlags.push([`flag.evaluation.feat${i}`, i === 3]);
}
for (let i = 4; i <= MAX_FLAGS_PER_SPAN; i++) {
expectedOuterSpanFlags.push([`flag.evaluation.feat${i}`, false]);
}
expectedOuterSpanFlags.push(['flag.evaluation.feat3', true]);
expect(outerSpanFlags).toEqual(expectedOuterSpanFlags);
// Order agnostic (attribute dict is unordered).
expect(outerSpanFlags.sort()).toEqual(expectedOuterSpanFlags.sort());
});
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { expect } from '@playwright/test';
import { _INTERNAL_FLAG_BUFFER_SIZE as FLAG_BUFFER_SIZE } from '@sentry/core';
import { sentryTest } from '../../../../../../utils/fixtures';
import {
envelopeRequestParser,
shouldSkipFeatureFlagsTest,
waitForErrorRequest,
} from '../../../../../../utils/helpers';
import { FLAG_BUFFER_SIZE } from '../../../constants';

sentryTest('Basic test with eviction, update, and no async tasks', async ({ getLocalTestUrl, page }) => {
if (shouldSkipFeatureFlagsTest()) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { expect } from '@playwright/test';
import { _INTERNAL_MAX_FLAGS_PER_SPAN as MAX_FLAGS_PER_SPAN } from '@sentry/core';
import { sentryTest } from '../../../../../utils/fixtures';
import {
type EventAndTraceHeader,
Expand All @@ -7,7 +8,6 @@ import {
shouldSkipFeatureFlagsTest,
shouldSkipTracingTest,
} from '../../../../../utils/helpers';
import { MAX_FLAGS_PER_SPAN } from '../../constants';

sentryTest("Feature flags are added to active span's attributes on span end.", async ({ getLocalTestUrl, page }) => {
if (shouldSkipFeatureFlagsTest() || shouldSkipTracingTest()) {
Expand Down Expand Up @@ -60,12 +60,9 @@ sentryTest("Feature flags are added to active span's attributes on span end.", a
expect(innerSpanFlags).toEqual([]);

const expectedOuterSpanFlags = [];
for (let i = 1; i <= 2; i++) {
expectedOuterSpanFlags.push([`flag.evaluation.feat${i}`, false]);
for (let i = 1; i <= MAX_FLAGS_PER_SPAN; i++) {
expectedOuterSpanFlags.push([`flag.evaluation.feat${i}`, i === 3]);
}
for (let i = 4; i <= MAX_FLAGS_PER_SPAN; i++) {
expectedOuterSpanFlags.push([`flag.evaluation.feat${i}`, false]);
}
expectedOuterSpanFlags.push(['flag.evaluation.feat3', true]);
expect(outerSpanFlags).toEqual(expectedOuterSpanFlags);
// Order agnostic (attribute dict is unordered).
expect(outerSpanFlags.sort()).toEqual(expectedOuterSpanFlags.sort());
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import * as Sentry from '@sentry/browser';

// Create measures BEFORE SDK initializes

// Create a measure with detail
const measure = performance.measure('restricted-test-measure', {
start: performance.now(),
end: performance.now() + 1,
detail: { test: 'initial-value' },
});

// Simulate Firefox's permission denial by overriding the detail getter
// This mimics the actual Firefox behavior where accessing detail throws
Object.defineProperty(measure, 'detail', {
get() {
throw new DOMException('Permission denied to access object', 'SecurityError');
},
configurable: false,
enumerable: true,
});

window.Sentry = Sentry;

Sentry.init({
dsn: 'https://public@dsn.ingest.sentry.io/1337',
integrations: [
Sentry.browserTracingIntegration({
idleTimeout: 9000,
}),
],
tracesSampleRate: 1,
});

// Also create a normal measure to ensure SDK still works
performance.measure('normal-measure', {
start: performance.now(),
end: performance.now() + 50,
detail: 'this-should-work',
});

// Create a measure with complex detail object
performance.measure('complex-detail-measure', {
start: performance.now(),
end: performance.now() + 25,
detail: {
nested: {
array: [1, 2, 3],
object: {
key: 'value',
},
},
metadata: {
type: 'test',
version: '1.0',
tags: ['complex', 'nested', 'object'],
},
},
});
Loading