Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
64308ce
ref(browser/core): Move all log flushing logic into clients (#15831)
AbhiPrasad Mar 28, 2025
f3b9067
Merge pull request #15914 from getsentry/master
github-actions[bot] Mar 28, 2025
5a6e018
ref: Move es-compatibility checks into packages (#15773)
andreiborza Mar 31, 2025
8af26e5
ref: Bump es-compatibility to ES2022 for node-based packages (#15926)
andreiborza Mar 31, 2025
eda7a1e
fix(cjs): Use `module` instead of `require` for CJS check (#15927)
s1gr1d Mar 31, 2025
147989b
feat: Don't truncate error messages (#15818)
Mar 31, 2025
f0fc41f
ref(core): Improve URL parsing utilities (#15882)
AbhiPrasad Apr 1, 2025
06a31c4
build(profiling-node): Fix output directory & caching (#15945)
mydea Apr 1, 2025
298a23c
fix(remix): Remove mentions of deprecated `ErrorBoundary` wrapper (#1…
onurtemizkan Apr 2, 2025
9a1970b
ci(deps): bump actions/create-github-app-token from 1.11.5 to 1.12.0 …
dependabot[bot] Apr 2, 2025
305df9f
feat(nextjs): Record `turbopack` as tag (#15928)
Apr 2, 2025
71409c3
chore(tests): Fix coverage file exclusions (#15944)
Lms24 Apr 2, 2025
3c1b3c9
feat(browser): Add `http.redirect_count` attribute to `browser.redire…
Lms24 Apr 2, 2025
4661f4d
ref(browser): Temporarily add `sentry.previous_trace` span attribute …
Lms24 Apr 2, 2025
3863c29
feat(nextjs): Add release injection in Turbopack (#15958)
Apr 2, 2025
ad5c06c
feat(nuxt): Add nuxt release registry craft entry (#15962)
andreiborza Apr 3, 2025
64b1d0d
feat(nestjs): Add nestjs release registry craft entry (#15963)
andreiborza Apr 3, 2025
ee592ad
feat(tanstackstart-react): Add tanstackstart-react to release registr…
andreiborza Apr 3, 2025
9807efb
chore(nest): Add `@sentry/nestjs` to release registry
cleptric Apr 3, 2025
6501d52
feat(nuxt): Base decision on source maps upload only on Nuxt source m…
s1gr1d Apr 3, 2025
438e8be
feat(core): Add `consoleLoggingIntegration` for logs (#15955)
AbhiPrasad Apr 3, 2025
a6e9651
feat(react-router): Add `sentryHandleRequest` (#15787)
chargome Apr 3, 2025
90ee178
meta: Update CHANGELOG for 9.11.0
Lms24 Apr 3, 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
6 changes: 6 additions & 0 deletions .craft.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -193,8 +193,12 @@ targets:
onlyIfPresent: /^sentry-gatsby-\d.*\.tgz$/
'npm:@sentry/google-cloud-serverless':
onlyIfPresent: /^sentry-google-cloud-serverless-\d.*\.tgz$/
'npm:@sentry/nestjs':
onlyIfPresent: /^sentry-nestjs-\d.*\.tgz$/
'npm:@sentry/nextjs':
onlyIfPresent: /^sentry-nextjs-\d.*\.tgz$/
'npm:@sentry/nuxt':
onlyIfPresent: /^sentry-nuxt-\d.*\.tgz$/
'npm:@sentry/node':
onlyIfPresent: /^sentry-node-\d.*\.tgz$/
'npm:@sentry/react':
Expand All@@ -211,6 +215,8 @@ targets:
onlyIfPresent: /^sentry-svelte-\d.*\.tgz$/
'npm:@sentry/sveltekit':
onlyIfPresent: /^sentry-sveltekit-\d.*\.tgz$/
'npm:@sentry/tanstackstart-react':
onlyIfPresent: /^sentry-tanstackstart-react-\d.*\.tgz$/
'npm:@sentry/vercel-edge':
onlyIfPresent: /^sentry-vercel-edge-\d.*\.tgz$/
'npm:@sentry/vue':
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/auto-release.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,7 +15,7 @@ jobs:
steps:
- name: Get auth token
id: token
uses: actions/create-github-app-token@0d564482f06ca65fa9e77e2510873638c82206f2 # v1.11.5
uses: actions/create-github-app-token@d72941d797fd3113feb6b93fd0dec494b13a2547 # v1.12.0
with:
app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }}
private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -44,6 +44,7 @@ env:
CACHED_BUILD_PATHS: |
${{ github.workspace }}/dev-packages/*/build
${{ github.workspace }}/packages/*/build
${{ github.workspace }}/packages/*/lib
${{ github.workspace }}/packages/ember/*.d.ts
${{ github.workspace }}/packages/gatsby/*.d.ts
${{ github.workspace }}/packages/utils/cjs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -19,7 +19,7 @@ jobs:
steps:
- name: Get auth token
id: token
uses: actions/create-github-app-token@0d564482f06ca65fa9e77e2510873638c82206f2 # v1.11.5
uses: actions/create-github-app-token@d72941d797fd3113feb6b93fd0dec494b13a2547 # v1.12.0
with:
app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }}
private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}
Expand Down
6 changes: 3 additions & 3 deletions .size-limit.js
Original file line numberDiff line numberDiff line change
Expand Up@@ -79,7 +79,7 @@ module.exports = [
path: 'packages/browser/build/npm/esm/index.js',
import: createImport('init', 'browserTracingIntegration', 'replayIntegration', 'replayCanvasIntegration'),
gzip: true,
limit: '80.5 KB',
limit: '81 KB',
},
{
name: '@sentry/browser (incl. Tracing, Replay, Feedback)',
Expand DownExpand Up@@ -210,7 +210,7 @@ module.exports = [
import: createImport('init'),
ignore: ['next/router', 'next/constants'],
gzip: true,
limit: '41 KB',
limit: '42 KB',
},
// SvelteKit SDK (ESM)
{
Expand All@@ -219,7 +219,7 @@ module.exports = [
import: createImport('init'),
ignore: ['$app/stores'],
gzip: true,
limit: '38 KB',
limit: '38.5 KB',
},
// Node SDK (ESM)
{
Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,6 +10,21 @@

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

## 9.11.0

- feat(browser): Add `http.redirect_count` attribute to `browser.redirect` span ([#15943](https://github.com/getsentry/sentry-javascript/pull/15943))
- feat(core): Add `consoleLoggingIntegration` for logs ([#15955](https://github.com/getsentry/sentry-javascript/pull/15955))
- feat(core): Don't truncate error messages ([#15818](https://github.com/getsentry/sentry-javascript/pull/15818))
- feat(nextjs): Add release injection in Turbopack ([#15958](https://github.com/getsentry/sentry-javascript/pull/15958))
- feat(nextjs): Record `turbopack` as tag ([#15928](https://github.com/getsentry/sentry-javascript/pull/15928))
- feat(nuxt): Base decision on source maps upload only on Nuxt source map settings ([#15859](https://github.com/getsentry/sentry-javascript/pull/15859))
- feat(react-router): Add `sentryHandleRequest` ([#15787](https://github.com/getsentry/sentry-javascript/pull/15787))
- fix(node): Use `module` instead of `require` for CJS check ([#15927](https://github.com/getsentry/sentry-javascript/pull/15927))
- fix(remix): Remove mentions of deprecated `ErrorBoundary` wrapper ([#15930](https://github.com/getsentry/sentry-javascript/pull/15930))
- ref(browser): Temporarily add `sentry.previous_trace` span attribute ([#15957](https://github.com/getsentry/sentry-javascript/pull/15957))
- ref(browser/core): Move all log flushing logic into clients ([#15831](https://github.com/getsentry/sentry-javascript/pull/15831))
- ref(core): Improve URL parsing utilities ([#15882](https://github.com/getsentry/sentry-javascript/pull/15882))

## 9.10.1

- fix: Correct @sentry-internal/feedback docs to match the code ([#15874](https://github.com/getsentry/sentry-javascript/pull/15874))
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
const wat = new Error(`This is a very long message that should be truncated and will be,
this is a very long message that should be truncated and will be,
this is a very long message that should be truncated and will be,
this is a very long message that should be truncated and will be,
this is a very long message that should be truncated and will be`);
const wat = new Error(`This is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be`);

wat.cause = new Error(`This is a very long message that should be truncated and hopefully will be,
this is a very long message that should be truncated and hopefully will be,
this is a very long message that should be truncated and hopefully will be,
this is a very long message that should be truncated and hopefully will be,
this is a very long message that should be truncated and hopefully will be,`);
wat.cause = new Error(`This is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be`);

Sentry.captureException(wat);
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,10 +12,11 @@ sentryTest('should capture a linked error with messages', async ({ getLocalTestU
expect(eventData.exception?.values).toHaveLength(2);
expect(eventData.exception?.values?.[0]).toMatchObject({
type: 'Error',
value: `This is a very long message that should be truncated and hopefully will be,
this is a very long message that should be truncated and hopefully will be,
this is a very long message that should be truncated and hopefully will be,
this is a very long me...`,
value: `This is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be`,
mechanism: {
type: 'chained',
handled: true,
Expand All@@ -26,10 +27,11 @@ this is a very long me...`,
});
expect(eventData.exception?.values?.[1]).toMatchObject({
type: 'Error',
value: `This is a very long message that should be truncated and will be,
this is a very long message that should be truncated and will be,
this is a very long message that should be truncated and will be,
this is a very long message that should be truncated...`,
value: `This is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be`,
mechanism: {
type: 'generic',
handled: true,
Expand Down

This file was deleted.

This file was deleted.

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
import * as Sentry from '@sentry/browser';

window.Sentry = Sentry;

Sentry.init({
dsn: 'https://public@dsn.ingest.sentry.io/1337',
_experiments: {
enableLogs: true,
},
integrations: [Sentry.consoleLoggingIntegration()],
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
console.trace('console.trace', 123, false);
console.debug('console.debug', 123, false);
console.log('console.log', 123, false);
console.info('console.info', 123, false);
console.warn('console.warn', 123, false);
console.error('console.error', 123, false);
console.assert(false, 'console.assert', 123, false);

console.log('');

Sentry.flush();
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
import { expect } from '@playwright/test';
import type { OtelLogEnvelope } from '@sentry/core';

import { sentryTest } from '../../../../utils/fixtures';
import { getFirstSentryEnvelopeRequest, properFullEnvelopeRequestParser } from '../../../../utils/helpers';

sentryTest('should capture console object calls', async ({ getLocalTestUrl, page }) => {
const bundle = process.env.PW_BUNDLE || '';
// Only run this for npm package exports
if (bundle.startsWith('bundle') || bundle.startsWith('loader')) {
sentryTest.skip();
}

const url = await getLocalTestUrl({ testDir: __dirname });

const event = await getFirstSentryEnvelopeRequest<OtelLogEnvelope>(page, url, properFullEnvelopeRequestParser);
const envelopeItems = event[1];

expect(envelopeItems[0]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'trace',
body: { stringValue: 'console.trace 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 1,
},
]);

expect(envelopeItems[1]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'debug',
body: { stringValue: 'console.debug 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 5,
},
]);

expect(envelopeItems[2]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'info',
body: { stringValue: 'console.log 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 10,
},
]);

expect(envelopeItems[3]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'info',
body: { stringValue: 'console.info 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 9,
},
]);

expect(envelopeItems[4]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'warn',
body: { stringValue: 'console.warn 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 13,
},
]);

expect(envelopeItems[5]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'error',
body: { stringValue: 'console.error 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 17,
},
]);

expect(envelopeItems[6]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'error',
body: { stringValue: 'Assertion failed: console.assert 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 17,
},
]);
});
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
import { expect } from '@playwright/test';
import type { OtelLogEnvelope } from '@sentry/core';

import { sentryTest } from '../../../utils/fixtures';
import { getFirstSentryEnvelopeRequest, properFullEnvelopeRequestParser } from '../../../utils/helpers';
import { sentryTest } from '../../../../utils/fixtures';
import { getFirstSentryEnvelopeRequest, properFullEnvelopeRequestParser } from '../../../../utils/helpers';

sentryTest('should capture all logging methods', async ({ getLocalTestUrl, page }) => {
const bundle = process.env.PW_BUNDLE || '';
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -49,6 +49,10 @@ sentryTest("navigation spans link back to previous trace's root span", async ({
},
]);

expect(navigation1TraceContext?.data).toMatchObject({
'sentry.previous_trace': `${pageloadTraceId}-${pageloadTraceContext?.span_id}-1`,
});

expect(navigation2TraceContext?.links).toEqual([
{
trace_id: navigation1TraceId,
Expand All@@ -60,6 +64,10 @@ sentryTest("navigation spans link back to previous trace's root span", async ({
},
]);

expect(navigation2TraceContext?.data).toMatchObject({
'sentry.previous_trace': `${navigation1TraceId}-${navigation1TraceContext?.span_id}-1`,
});

expect(pageloadTraceId).not.toEqual(navigation1TraceId);
expect(navigation1TraceId).not.toEqual(navigation2TraceId);
expect(pageloadTraceId).not.toEqual(navigation2TraceId);
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -34,6 +34,10 @@ sentryTest('includes a span link to a previously negatively sampled span', async
},
]);

expect(navigationTraceContext?.data).toMatchObject({
'sentry.previous_trace': expect.stringMatching(/[a-f0-9]{32}-[a-f0-9]{16}-0/),
});

expect(navigationTraceContext?.trace_id).not.toEqual(navigationTraceContext?.links![0].trace_id);
});
});
Original file line numberDiff line numberDiff line change
Expand Up@@ -43,7 +43,7 @@ test('should correctly instrument `fetch` for performance tracing', async ({ pag
'sentry.op': 'http.client',
'sentry.origin': 'auto.http.browser',
},
description: 'GET https://example.com',
description: 'GET https://example.com/',
op: 'http.client',
parent_span_id: expect.stringMatching(/[a-f0-9]{16}/),
span_id: expect.stringMatching(/[a-f0-9]{16}/),
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,4 +3,4 @@
/// <reference types="next/navigation-types/compat/navigation" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,4 +9,7 @@ const nextConfig = {

module.exports = withSentryConfig(nextConfig, {
silent: true,
release: {
name: 'foobar123',
},
});
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all \u003cpre\u003e\u003ccode\u003e blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks"); } } catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); } })(); (function(){ try { var __m = "github.com"; var __re = new RegExp('^' + "github\\.com" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
64308ce
ref(browser/core): Move all log flushing logic into clients (#15831)
AbhiPrasad Mar 28, 2025
f3b9067
Merge pull request #15914 from getsentry/master
github-actions[bot] Mar 28, 2025
5a6e018
ref: Move es-compatibility checks into packages (#15773)
andreiborza Mar 31, 2025
8af26e5
ref: Bump es-compatibility to ES2022 for node-based packages (#15926)
andreiborza Mar 31, 2025
eda7a1e
fix(cjs): Use `module` instead of `require` for CJS check (#15927)
s1gr1d Mar 31, 2025
147989b
feat: Don't truncate error messages (#15818)
Mar 31, 2025
f0fc41f
ref(core): Improve URL parsing utilities (#15882)
AbhiPrasad Apr 1, 2025
06a31c4
build(profiling-node): Fix output directory & caching (#15945)
mydea Apr 1, 2025
298a23c
fix(remix): Remove mentions of deprecated `ErrorBoundary` wrapper (#1…
onurtemizkan Apr 2, 2025
9a1970b
ci(deps): bump actions/create-github-app-token from 1.11.5 to 1.12.0 …
dependabot[bot] Apr 2, 2025
305df9f
feat(nextjs): Record `turbopack` as tag (#15928)
Apr 2, 2025
71409c3
chore(tests): Fix coverage file exclusions (#15944)
Lms24 Apr 2, 2025
3c1b3c9
feat(browser): Add `http.redirect_count` attribute to `browser.redire…
Lms24 Apr 2, 2025
4661f4d
ref(browser): Temporarily add `sentry.previous_trace` span attribute …
Lms24 Apr 2, 2025
3863c29
feat(nextjs): Add release injection in Turbopack (#15958)
Apr 2, 2025
ad5c06c
feat(nuxt): Add nuxt release registry craft entry (#15962)
andreiborza Apr 3, 2025
64b1d0d
feat(nestjs): Add nestjs release registry craft entry (#15963)
andreiborza Apr 3, 2025
ee592ad
feat(tanstackstart-react): Add tanstackstart-react to release registr…
andreiborza Apr 3, 2025
9807efb
chore(nest): Add `@sentry/nestjs` to release registry
cleptric Apr 3, 2025
6501d52
feat(nuxt): Base decision on source maps upload only on Nuxt source m…
s1gr1d Apr 3, 2025
438e8be
feat(core): Add `consoleLoggingIntegration` for logs (#15955)
AbhiPrasad Apr 3, 2025
a6e9651
feat(react-router): Add `sentryHandleRequest` (#15787)
chargome Apr 3, 2025
90ee178
meta: Update CHANGELOG for 9.11.0
Lms24 Apr 3, 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
6 changes: 6 additions & 0 deletions .craft.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -193,8 +193,12 @@ targets:
onlyIfPresent: /^sentry-gatsby-\d.*\.tgz$/
'npm:@sentry/google-cloud-serverless':
onlyIfPresent: /^sentry-google-cloud-serverless-\d.*\.tgz$/
'npm:@sentry/nestjs':
onlyIfPresent: /^sentry-nestjs-\d.*\.tgz$/
'npm:@sentry/nextjs':
onlyIfPresent: /^sentry-nextjs-\d.*\.tgz$/
'npm:@sentry/nuxt':
onlyIfPresent: /^sentry-nuxt-\d.*\.tgz$/
'npm:@sentry/node':
onlyIfPresent: /^sentry-node-\d.*\.tgz$/
'npm:@sentry/react':
Expand All@@ -211,6 +215,8 @@ targets:
onlyIfPresent: /^sentry-svelte-\d.*\.tgz$/
'npm:@sentry/sveltekit':
onlyIfPresent: /^sentry-sveltekit-\d.*\.tgz$/
'npm:@sentry/tanstackstart-react':
onlyIfPresent: /^sentry-tanstackstart-react-\d.*\.tgz$/
'npm:@sentry/vercel-edge':
onlyIfPresent: /^sentry-vercel-edge-\d.*\.tgz$/
'npm:@sentry/vue':
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/auto-release.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,7 +15,7 @@ jobs:
steps:
- name: Get auth token
id: token
uses: actions/create-github-app-token@0d564482f06ca65fa9e77e2510873638c82206f2 # v1.11.5
uses: actions/create-github-app-token@d72941d797fd3113feb6b93fd0dec494b13a2547 # v1.12.0
with:
app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }}
private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -44,6 +44,7 @@ env:
CACHED_BUILD_PATHS: |
${{ github.workspace }}/dev-packages/*/build
${{ github.workspace }}/packages/*/build
${{ github.workspace }}/packages/*/lib
${{ github.workspace }}/packages/ember/*.d.ts
${{ github.workspace }}/packages/gatsby/*.d.ts
${{ github.workspace }}/packages/utils/cjs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -19,7 +19,7 @@ jobs:
steps:
- name: Get auth token
id: token
uses: actions/create-github-app-token@0d564482f06ca65fa9e77e2510873638c82206f2 # v1.11.5
uses: actions/create-github-app-token@d72941d797fd3113feb6b93fd0dec494b13a2547 # v1.12.0
with:
app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }}
private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}
Expand Down
6 changes: 3 additions & 3 deletions .size-limit.js
Original file line numberDiff line numberDiff line change
Expand Up@@ -79,7 +79,7 @@ module.exports = [
path: 'packages/browser/build/npm/esm/index.js',
import: createImport('init', 'browserTracingIntegration', 'replayIntegration', 'replayCanvasIntegration'),
gzip: true,
limit: '80.5 KB',
limit: '81 KB',
},
{
name: '@sentry/browser (incl. Tracing, Replay, Feedback)',
Expand DownExpand Up@@ -210,7 +210,7 @@ module.exports = [
import: createImport('init'),
ignore: ['next/router', 'next/constants'],
gzip: true,
limit: '41 KB',
limit: '42 KB',
},
// SvelteKit SDK (ESM)
{
Expand All@@ -219,7 +219,7 @@ module.exports = [
import: createImport('init'),
ignore: ['$app/stores'],
gzip: true,
limit: '38 KB',
limit: '38.5 KB',
},
// Node SDK (ESM)
{
Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,6 +10,21 @@

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

## 9.11.0

- feat(browser): Add `http.redirect_count` attribute to `browser.redirect` span ([#15943](https://github.com/getsentry/sentry-javascript/pull/15943))
- feat(core): Add `consoleLoggingIntegration` for logs ([#15955](https://github.com/getsentry/sentry-javascript/pull/15955))
- feat(core): Don't truncate error messages ([#15818](https://github.com/getsentry/sentry-javascript/pull/15818))
- feat(nextjs): Add release injection in Turbopack ([#15958](https://github.com/getsentry/sentry-javascript/pull/15958))
- feat(nextjs): Record `turbopack` as tag ([#15928](https://github.com/getsentry/sentry-javascript/pull/15928))
- feat(nuxt): Base decision on source maps upload only on Nuxt source map settings ([#15859](https://github.com/getsentry/sentry-javascript/pull/15859))
- feat(react-router): Add `sentryHandleRequest` ([#15787](https://github.com/getsentry/sentry-javascript/pull/15787))
- fix(node): Use `module` instead of `require` for CJS check ([#15927](https://github.com/getsentry/sentry-javascript/pull/15927))
- fix(remix): Remove mentions of deprecated `ErrorBoundary` wrapper ([#15930](https://github.com/getsentry/sentry-javascript/pull/15930))
- ref(browser): Temporarily add `sentry.previous_trace` span attribute ([#15957](https://github.com/getsentry/sentry-javascript/pull/15957))
- ref(browser/core): Move all log flushing logic into clients ([#15831](https://github.com/getsentry/sentry-javascript/pull/15831))
- ref(core): Improve URL parsing utilities ([#15882](https://github.com/getsentry/sentry-javascript/pull/15882))

## 9.10.1

- fix: Correct @sentry-internal/feedback docs to match the code ([#15874](https://github.com/getsentry/sentry-javascript/pull/15874))
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
const wat = new Error(`This is a very long message that should be truncated and will be,
this is a very long message that should be truncated and will be,
this is a very long message that should be truncated and will be,
this is a very long message that should be truncated and will be,
this is a very long message that should be truncated and will be`);
const wat = new Error(`This is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be`);

wat.cause = new Error(`This is a very long message that should be truncated and hopefully will be,
this is a very long message that should be truncated and hopefully will be,
this is a very long message that should be truncated and hopefully will be,
this is a very long message that should be truncated and hopefully will be,
this is a very long message that should be truncated and hopefully will be,`);
wat.cause = new Error(`This is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be`);

Sentry.captureException(wat);
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,10 +12,11 @@ sentryTest('should capture a linked error with messages', async ({ getLocalTestU
expect(eventData.exception?.values).toHaveLength(2);
expect(eventData.exception?.values?.[0]).toMatchObject({
type: 'Error',
value: `This is a very long message that should be truncated and hopefully will be,
this is a very long message that should be truncated and hopefully will be,
this is a very long message that should be truncated and hopefully will be,
this is a very long me...`,
value: `This is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be`,
mechanism: {
type: 'chained',
handled: true,
Expand All@@ -26,10 +27,11 @@ this is a very long me...`,
});
expect(eventData.exception?.values?.[1]).toMatchObject({
type: 'Error',
value: `This is a very long message that should be truncated and will be,
this is a very long message that should be truncated and will be,
this is a very long message that should be truncated and will be,
this is a very long message that should be truncated...`,
value: `This is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be`,
mechanism: {
type: 'generic',
handled: true,
Expand Down

This file was deleted.

This file was deleted.

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
import * as Sentry from '@sentry/browser';

window.Sentry = Sentry;

Sentry.init({
dsn: 'https://public@dsn.ingest.sentry.io/1337',
_experiments: {
enableLogs: true,
},
integrations: [Sentry.consoleLoggingIntegration()],
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
console.trace('console.trace', 123, false);
console.debug('console.debug', 123, false);
console.log('console.log', 123, false);
console.info('console.info', 123, false);
console.warn('console.warn', 123, false);
console.error('console.error', 123, false);
console.assert(false, 'console.assert', 123, false);

console.log('');

Sentry.flush();
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
import { expect } from '@playwright/test';
import type { OtelLogEnvelope } from '@sentry/core';

import { sentryTest } from '../../../../utils/fixtures';
import { getFirstSentryEnvelopeRequest, properFullEnvelopeRequestParser } from '../../../../utils/helpers';

sentryTest('should capture console object calls', async ({ getLocalTestUrl, page }) => {
const bundle = process.env.PW_BUNDLE || '';
// Only run this for npm package exports
if (bundle.startsWith('bundle') || bundle.startsWith('loader')) {
sentryTest.skip();
}

const url = await getLocalTestUrl({ testDir: __dirname });

const event = await getFirstSentryEnvelopeRequest<OtelLogEnvelope>(page, url, properFullEnvelopeRequestParser);
const envelopeItems = event[1];

expect(envelopeItems[0]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'trace',
body: { stringValue: 'console.trace 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 1,
},
]);

expect(envelopeItems[1]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'debug',
body: { stringValue: 'console.debug 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 5,
},
]);

expect(envelopeItems[2]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'info',
body: { stringValue: 'console.log 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 10,
},
]);

expect(envelopeItems[3]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'info',
body: { stringValue: 'console.info 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 9,
},
]);

expect(envelopeItems[4]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'warn',
body: { stringValue: 'console.warn 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 13,
},
]);

expect(envelopeItems[5]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'error',
body: { stringValue: 'console.error 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 17,
},
]);

expect(envelopeItems[6]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'error',
body: { stringValue: 'Assertion failed: console.assert 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 17,
},
]);
});
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
import { expect } from '@playwright/test';
import type { OtelLogEnvelope } from '@sentry/core';

import { sentryTest } from '../../../utils/fixtures';
import { getFirstSentryEnvelopeRequest, properFullEnvelopeRequestParser } from '../../../utils/helpers';
import { sentryTest } from '../../../../utils/fixtures';
import { getFirstSentryEnvelopeRequest, properFullEnvelopeRequestParser } from '../../../../utils/helpers';

sentryTest('should capture all logging methods', async ({ getLocalTestUrl, page }) => {
const bundle = process.env.PW_BUNDLE || '';
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -49,6 +49,10 @@ sentryTest("navigation spans link back to previous trace's root span", async ({
},
]);

expect(navigation1TraceContext?.data).toMatchObject({
'sentry.previous_trace': `${pageloadTraceId}-${pageloadTraceContext?.span_id}-1`,
});

expect(navigation2TraceContext?.links).toEqual([
{
trace_id: navigation1TraceId,
Expand All@@ -60,6 +64,10 @@ sentryTest("navigation spans link back to previous trace's root span", async ({
},
]);

expect(navigation2TraceContext?.data).toMatchObject({
'sentry.previous_trace': `${navigation1TraceId}-${navigation1TraceContext?.span_id}-1`,
});

expect(pageloadTraceId).not.toEqual(navigation1TraceId);
expect(navigation1TraceId).not.toEqual(navigation2TraceId);
expect(pageloadTraceId).not.toEqual(navigation2TraceId);
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -34,6 +34,10 @@ sentryTest('includes a span link to a previously negatively sampled span', async
},
]);

expect(navigationTraceContext?.data).toMatchObject({
'sentry.previous_trace': expect.stringMatching(/[a-f0-9]{32}-[a-f0-9]{16}-0/),
});

expect(navigationTraceContext?.trace_id).not.toEqual(navigationTraceContext?.links![0].trace_id);
});
});
Original file line numberDiff line numberDiff line change
Expand Up@@ -43,7 +43,7 @@ test('should correctly instrument `fetch` for performance tracing', async ({ pag
'sentry.op': 'http.client',
'sentry.origin': 'auto.http.browser',
},
description: 'GET https://example.com',
description: 'GET https://example.com/',
op: 'http.client',
parent_span_id: expect.stringMatching(/[a-f0-9]{16}/),
span_id: expect.stringMatching(/[a-f0-9]{16}/),
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,4 +3,4 @@
/// <reference types="next/navigation-types/compat/navigation" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,4 +9,7 @@ const nextConfig = {

module.exports = withSentryConfig(nextConfig, {
silent: true,
release: {
name: 'foobar123',
},
});
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
64308ce
ref(browser/core): Move all log flushing logic into clients (#15831)
AbhiPrasad Mar 28, 2025
f3b9067
Merge pull request #15914 from getsentry/master
github-actions[bot] Mar 28, 2025
5a6e018
ref: Move es-compatibility checks into packages (#15773)
andreiborza Mar 31, 2025
8af26e5
ref: Bump es-compatibility to ES2022 for node-based packages (#15926)
andreiborza Mar 31, 2025
eda7a1e
fix(cjs): Use `module` instead of `require` for CJS check (#15927)
s1gr1d Mar 31, 2025
147989b
feat: Don't truncate error messages (#15818)
Mar 31, 2025
f0fc41f
ref(core): Improve URL parsing utilities (#15882)
AbhiPrasad Apr 1, 2025
06a31c4
build(profiling-node): Fix output directory & caching (#15945)
mydea Apr 1, 2025
298a23c
fix(remix): Remove mentions of deprecated `ErrorBoundary` wrapper (#1…
onurtemizkan Apr 2, 2025
9a1970b
ci(deps): bump actions/create-github-app-token from 1.11.5 to 1.12.0 …
dependabot[bot] Apr 2, 2025
305df9f
feat(nextjs): Record `turbopack` as tag (#15928)
Apr 2, 2025
71409c3
chore(tests): Fix coverage file exclusions (#15944)
Lms24 Apr 2, 2025
3c1b3c9
feat(browser): Add `http.redirect_count` attribute to `browser.redire…
Lms24 Apr 2, 2025
4661f4d
ref(browser): Temporarily add `sentry.previous_trace` span attribute …
Lms24 Apr 2, 2025
3863c29
feat(nextjs): Add release injection in Turbopack (#15958)
Apr 2, 2025
ad5c06c
feat(nuxt): Add nuxt release registry craft entry (#15962)
andreiborza Apr 3, 2025
64b1d0d
feat(nestjs): Add nestjs release registry craft entry (#15963)
andreiborza Apr 3, 2025
ee592ad
feat(tanstackstart-react): Add tanstackstart-react to release registr…
andreiborza Apr 3, 2025
9807efb
chore(nest): Add `@sentry/nestjs` to release registry
cleptric Apr 3, 2025
6501d52
feat(nuxt): Base decision on source maps upload only on Nuxt source m…
s1gr1d Apr 3, 2025
438e8be
feat(core): Add `consoleLoggingIntegration` for logs (#15955)
AbhiPrasad Apr 3, 2025
a6e9651
feat(react-router): Add `sentryHandleRequest` (#15787)
chargome Apr 3, 2025
90ee178
meta: Update CHANGELOG for 9.11.0
Lms24 Apr 3, 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
6 changes: 6 additions & 0 deletions .craft.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -193,8 +193,12 @@ targets:
onlyIfPresent: /^sentry-gatsby-\d.*\.tgz$/
'npm:@sentry/google-cloud-serverless':
onlyIfPresent: /^sentry-google-cloud-serverless-\d.*\.tgz$/
'npm:@sentry/nestjs':
onlyIfPresent: /^sentry-nestjs-\d.*\.tgz$/
'npm:@sentry/nextjs':
onlyIfPresent: /^sentry-nextjs-\d.*\.tgz$/
'npm:@sentry/nuxt':
onlyIfPresent: /^sentry-nuxt-\d.*\.tgz$/
'npm:@sentry/node':
onlyIfPresent: /^sentry-node-\d.*\.tgz$/
'npm:@sentry/react':
Expand All@@ -211,6 +215,8 @@ targets:
onlyIfPresent: /^sentry-svelte-\d.*\.tgz$/
'npm:@sentry/sveltekit':
onlyIfPresent: /^sentry-sveltekit-\d.*\.tgz$/
'npm:@sentry/tanstackstart-react':
onlyIfPresent: /^sentry-tanstackstart-react-\d.*\.tgz$/
'npm:@sentry/vercel-edge':
onlyIfPresent: /^sentry-vercel-edge-\d.*\.tgz$/
'npm:@sentry/vue':
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/auto-release.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,7 +15,7 @@ jobs:
steps:
- name: Get auth token
id: token
uses: actions/create-github-app-token@0d564482f06ca65fa9e77e2510873638c82206f2 # v1.11.5
uses: actions/create-github-app-token@d72941d797fd3113feb6b93fd0dec494b13a2547 # v1.12.0
with:
app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }}
private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -44,6 +44,7 @@ env:
CACHED_BUILD_PATHS: |
${{ github.workspace }}/dev-packages/*/build
${{ github.workspace }}/packages/*/build
${{ github.workspace }}/packages/*/lib
${{ github.workspace }}/packages/ember/*.d.ts
${{ github.workspace }}/packages/gatsby/*.d.ts
${{ github.workspace }}/packages/utils/cjs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -19,7 +19,7 @@ jobs:
steps:
- name: Get auth token
id: token
uses: actions/create-github-app-token@0d564482f06ca65fa9e77e2510873638c82206f2 # v1.11.5
uses: actions/create-github-app-token@d72941d797fd3113feb6b93fd0dec494b13a2547 # v1.12.0
with:
app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }}
private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}
Expand Down
6 changes: 3 additions & 3 deletions .size-limit.js
Original file line numberDiff line numberDiff line change
Expand Up@@ -79,7 +79,7 @@ module.exports = [
path: 'packages/browser/build/npm/esm/index.js',
import: createImport('init', 'browserTracingIntegration', 'replayIntegration', 'replayCanvasIntegration'),
gzip: true,
limit: '80.5 KB',
limit: '81 KB',
},
{
name: '@sentry/browser (incl. Tracing, Replay, Feedback)',
Expand DownExpand Up@@ -210,7 +210,7 @@ module.exports = [
import: createImport('init'),
ignore: ['next/router', 'next/constants'],
gzip: true,
limit: '41 KB',
limit: '42 KB',
},
// SvelteKit SDK (ESM)
{
Expand All@@ -219,7 +219,7 @@ module.exports = [
import: createImport('init'),
ignore: ['$app/stores'],
gzip: true,
limit: '38 KB',
limit: '38.5 KB',
},
// Node SDK (ESM)
{
Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,6 +10,21 @@

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

## 9.11.0

- feat(browser): Add `http.redirect_count` attribute to `browser.redirect` span ([#15943](https://github.com/getsentry/sentry-javascript/pull/15943))
- feat(core): Add `consoleLoggingIntegration` for logs ([#15955](https://github.com/getsentry/sentry-javascript/pull/15955))
- feat(core): Don't truncate error messages ([#15818](https://github.com/getsentry/sentry-javascript/pull/15818))
- feat(nextjs): Add release injection in Turbopack ([#15958](https://github.com/getsentry/sentry-javascript/pull/15958))
- feat(nextjs): Record `turbopack` as tag ([#15928](https://github.com/getsentry/sentry-javascript/pull/15928))
- feat(nuxt): Base decision on source maps upload only on Nuxt source map settings ([#15859](https://github.com/getsentry/sentry-javascript/pull/15859))
- feat(react-router): Add `sentryHandleRequest` ([#15787](https://github.com/getsentry/sentry-javascript/pull/15787))
- fix(node): Use `module` instead of `require` for CJS check ([#15927](https://github.com/getsentry/sentry-javascript/pull/15927))
- fix(remix): Remove mentions of deprecated `ErrorBoundary` wrapper ([#15930](https://github.com/getsentry/sentry-javascript/pull/15930))
- ref(browser): Temporarily add `sentry.previous_trace` span attribute ([#15957](https://github.com/getsentry/sentry-javascript/pull/15957))
- ref(browser/core): Move all log flushing logic into clients ([#15831](https://github.com/getsentry/sentry-javascript/pull/15831))
- ref(core): Improve URL parsing utilities ([#15882](https://github.com/getsentry/sentry-javascript/pull/15882))

## 9.10.1

- fix: Correct @sentry-internal/feedback docs to match the code ([#15874](https://github.com/getsentry/sentry-javascript/pull/15874))
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
const wat = new Error(`This is a very long message that should be truncated and will be,
this is a very long message that should be truncated and will be,
this is a very long message that should be truncated and will be,
this is a very long message that should be truncated and will be,
this is a very long message that should be truncated and will be`);
const wat = new Error(`This is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be`);

wat.cause = new Error(`This is a very long message that should be truncated and hopefully will be,
this is a very long message that should be truncated and hopefully will be,
this is a very long message that should be truncated and hopefully will be,
this is a very long message that should be truncated and hopefully will be,
this is a very long message that should be truncated and hopefully will be,`);
wat.cause = new Error(`This is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be`);

Sentry.captureException(wat);
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,10 +12,11 @@ sentryTest('should capture a linked error with messages', async ({ getLocalTestU
expect(eventData.exception?.values).toHaveLength(2);
expect(eventData.exception?.values?.[0]).toMatchObject({
type: 'Error',
value: `This is a very long message that should be truncated and hopefully will be,
this is a very long message that should be truncated and hopefully will be,
this is a very long message that should be truncated and hopefully will be,
this is a very long me...`,
value: `This is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be`,
mechanism: {
type: 'chained',
handled: true,
Expand All@@ -26,10 +27,11 @@ this is a very long me...`,
});
expect(eventData.exception?.values?.[1]).toMatchObject({
type: 'Error',
value: `This is a very long message that should be truncated and will be,
this is a very long message that should be truncated and will be,
this is a very long message that should be truncated and will be,
this is a very long message that should be truncated...`,
value: `This is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be`,
mechanism: {
type: 'generic',
handled: true,
Expand Down

This file was deleted.

This file was deleted.

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
import * as Sentry from '@sentry/browser';

window.Sentry = Sentry;

Sentry.init({
dsn: 'https://public@dsn.ingest.sentry.io/1337',
_experiments: {
enableLogs: true,
},
integrations: [Sentry.consoleLoggingIntegration()],
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
console.trace('console.trace', 123, false);
console.debug('console.debug', 123, false);
console.log('console.log', 123, false);
console.info('console.info', 123, false);
console.warn('console.warn', 123, false);
console.error('console.error', 123, false);
console.assert(false, 'console.assert', 123, false);

console.log('');

Sentry.flush();
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
import { expect } from '@playwright/test';
import type { OtelLogEnvelope } from '@sentry/core';

import { sentryTest } from '../../../../utils/fixtures';
import { getFirstSentryEnvelopeRequest, properFullEnvelopeRequestParser } from '../../../../utils/helpers';

sentryTest('should capture console object calls', async ({ getLocalTestUrl, page }) => {
const bundle = process.env.PW_BUNDLE || '';
// Only run this for npm package exports
if (bundle.startsWith('bundle') || bundle.startsWith('loader')) {
sentryTest.skip();
}

const url = await getLocalTestUrl({ testDir: __dirname });

const event = await getFirstSentryEnvelopeRequest<OtelLogEnvelope>(page, url, properFullEnvelopeRequestParser);
const envelopeItems = event[1];

expect(envelopeItems[0]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'trace',
body: { stringValue: 'console.trace 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 1,
},
]);

expect(envelopeItems[1]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'debug',
body: { stringValue: 'console.debug 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 5,
},
]);

expect(envelopeItems[2]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'info',
body: { stringValue: 'console.log 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 10,
},
]);

expect(envelopeItems[3]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'info',
body: { stringValue: 'console.info 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 9,
},
]);

expect(envelopeItems[4]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'warn',
body: { stringValue: 'console.warn 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 13,
},
]);

expect(envelopeItems[5]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'error',
body: { stringValue: 'console.error 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 17,
},
]);

expect(envelopeItems[6]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'error',
body: { stringValue: 'Assertion failed: console.assert 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 17,
},
]);
});
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
import { expect } from '@playwright/test';
import type { OtelLogEnvelope } from '@sentry/core';

import { sentryTest } from '../../../utils/fixtures';
import { getFirstSentryEnvelopeRequest, properFullEnvelopeRequestParser } from '../../../utils/helpers';
import { sentryTest } from '../../../../utils/fixtures';
import { getFirstSentryEnvelopeRequest, properFullEnvelopeRequestParser } from '../../../../utils/helpers';

sentryTest('should capture all logging methods', async ({ getLocalTestUrl, page }) => {
const bundle = process.env.PW_BUNDLE || '';
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -49,6 +49,10 @@ sentryTest("navigation spans link back to previous trace's root span", async ({
},
]);

expect(navigation1TraceContext?.data).toMatchObject({
'sentry.previous_trace': `${pageloadTraceId}-${pageloadTraceContext?.span_id}-1`,
});

expect(navigation2TraceContext?.links).toEqual([
{
trace_id: navigation1TraceId,
Expand All@@ -60,6 +64,10 @@ sentryTest("navigation spans link back to previous trace's root span", async ({
},
]);

expect(navigation2TraceContext?.data).toMatchObject({
'sentry.previous_trace': `${navigation1TraceId}-${navigation1TraceContext?.span_id}-1`,
});

expect(pageloadTraceId).not.toEqual(navigation1TraceId);
expect(navigation1TraceId).not.toEqual(navigation2TraceId);
expect(pageloadTraceId).not.toEqual(navigation2TraceId);
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -34,6 +34,10 @@ sentryTest('includes a span link to a previously negatively sampled span', async
},
]);

expect(navigationTraceContext?.data).toMatchObject({
'sentry.previous_trace': expect.stringMatching(/[a-f0-9]{32}-[a-f0-9]{16}-0/),
});

expect(navigationTraceContext?.trace_id).not.toEqual(navigationTraceContext?.links![0].trace_id);
});
});
Original file line numberDiff line numberDiff line change
Expand Up@@ -43,7 +43,7 @@ test('should correctly instrument `fetch` for performance tracing', async ({ pag
'sentry.op': 'http.client',
'sentry.origin': 'auto.http.browser',
},
description: 'GET https://example.com',
description: 'GET https://example.com/',
op: 'http.client',
parent_span_id: expect.stringMatching(/[a-f0-9]{16}/),
span_id: expect.stringMatching(/[a-f0-9]{16}/),
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,4 +3,4 @@
/// <reference types="next/navigation-types/compat/navigation" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,4 +9,7 @@ const nextConfig = {

module.exports = withSentryConfig(nextConfig, {
silent: true,
release: {
name: 'foobar123',
},
});
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length \u003e 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
64308ce
ref(browser/core): Move all log flushing logic into clients (#15831)
AbhiPrasad Mar 28, 2025
f3b9067
Merge pull request #15914 from getsentry/master
github-actions[bot] Mar 28, 2025
5a6e018
ref: Move es-compatibility checks into packages (#15773)
andreiborza Mar 31, 2025
8af26e5
ref: Bump es-compatibility to ES2022 for node-based packages (#15926)
andreiborza Mar 31, 2025
eda7a1e
fix(cjs): Use `module` instead of `require` for CJS check (#15927)
s1gr1d Mar 31, 2025
147989b
feat: Don't truncate error messages (#15818)
Mar 31, 2025
f0fc41f
ref(core): Improve URL parsing utilities (#15882)
AbhiPrasad Apr 1, 2025
06a31c4
build(profiling-node): Fix output directory & caching (#15945)
mydea Apr 1, 2025
298a23c
fix(remix): Remove mentions of deprecated `ErrorBoundary` wrapper (#1…
onurtemizkan Apr 2, 2025
9a1970b
ci(deps): bump actions/create-github-app-token from 1.11.5 to 1.12.0 …
dependabot[bot] Apr 2, 2025
305df9f
feat(nextjs): Record `turbopack` as tag (#15928)
Apr 2, 2025
71409c3
chore(tests): Fix coverage file exclusions (#15944)
Lms24 Apr 2, 2025
3c1b3c9
feat(browser): Add `http.redirect_count` attribute to `browser.redire…
Lms24 Apr 2, 2025
4661f4d
ref(browser): Temporarily add `sentry.previous_trace` span attribute …
Lms24 Apr 2, 2025
3863c29
feat(nextjs): Add release injection in Turbopack (#15958)
Apr 2, 2025
ad5c06c
feat(nuxt): Add nuxt release registry craft entry (#15962)
andreiborza Apr 3, 2025
64b1d0d
feat(nestjs): Add nestjs release registry craft entry (#15963)
andreiborza Apr 3, 2025
ee592ad
feat(tanstackstart-react): Add tanstackstart-react to release registr…
andreiborza Apr 3, 2025
9807efb
chore(nest): Add `@sentry/nestjs` to release registry
cleptric Apr 3, 2025
6501d52
feat(nuxt): Base decision on source maps upload only on Nuxt source m…
s1gr1d Apr 3, 2025
438e8be
feat(core): Add `consoleLoggingIntegration` for logs (#15955)
AbhiPrasad Apr 3, 2025
a6e9651
feat(react-router): Add `sentryHandleRequest` (#15787)
chargome Apr 3, 2025
90ee178
meta: Update CHANGELOG for 9.11.0
Lms24 Apr 3, 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
6 changes: 6 additions & 0 deletions .craft.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -193,8 +193,12 @@ targets:
onlyIfPresent: /^sentry-gatsby-\d.*\.tgz$/
'npm:@sentry/google-cloud-serverless':
onlyIfPresent: /^sentry-google-cloud-serverless-\d.*\.tgz$/
'npm:@sentry/nestjs':
onlyIfPresent: /^sentry-nestjs-\d.*\.tgz$/
'npm:@sentry/nextjs':
onlyIfPresent: /^sentry-nextjs-\d.*\.tgz$/
'npm:@sentry/nuxt':
onlyIfPresent: /^sentry-nuxt-\d.*\.tgz$/
'npm:@sentry/node':
onlyIfPresent: /^sentry-node-\d.*\.tgz$/
'npm:@sentry/react':
Expand All@@ -211,6 +215,8 @@ targets:
onlyIfPresent: /^sentry-svelte-\d.*\.tgz$/
'npm:@sentry/sveltekit':
onlyIfPresent: /^sentry-sveltekit-\d.*\.tgz$/
'npm:@sentry/tanstackstart-react':
onlyIfPresent: /^sentry-tanstackstart-react-\d.*\.tgz$/
'npm:@sentry/vercel-edge':
onlyIfPresent: /^sentry-vercel-edge-\d.*\.tgz$/
'npm:@sentry/vue':
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/auto-release.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,7 +15,7 @@ jobs:
steps:
- name: Get auth token
id: token
uses: actions/create-github-app-token@0d564482f06ca65fa9e77e2510873638c82206f2 # v1.11.5
uses: actions/create-github-app-token@d72941d797fd3113feb6b93fd0dec494b13a2547 # v1.12.0
with:
app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }}
private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -44,6 +44,7 @@ env:
CACHED_BUILD_PATHS: |
${{ github.workspace }}/dev-packages/*/build
${{ github.workspace }}/packages/*/build
${{ github.workspace }}/packages/*/lib
${{ github.workspace }}/packages/ember/*.d.ts
${{ github.workspace }}/packages/gatsby/*.d.ts
${{ github.workspace }}/packages/utils/cjs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -19,7 +19,7 @@ jobs:
steps:
- name: Get auth token
id: token
uses: actions/create-github-app-token@0d564482f06ca65fa9e77e2510873638c82206f2 # v1.11.5
uses: actions/create-github-app-token@d72941d797fd3113feb6b93fd0dec494b13a2547 # v1.12.0
with:
app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }}
private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}
Expand Down
6 changes: 3 additions & 3 deletions .size-limit.js
Original file line numberDiff line numberDiff line change
Expand Up@@ -79,7 +79,7 @@ module.exports = [
path: 'packages/browser/build/npm/esm/index.js',
import: createImport('init', 'browserTracingIntegration', 'replayIntegration', 'replayCanvasIntegration'),
gzip: true,
limit: '80.5 KB',
limit: '81 KB',
},
{
name: '@sentry/browser (incl. Tracing, Replay, Feedback)',
Expand DownExpand Up@@ -210,7 +210,7 @@ module.exports = [
import: createImport('init'),
ignore: ['next/router', 'next/constants'],
gzip: true,
limit: '41 KB',
limit: '42 KB',
},
// SvelteKit SDK (ESM)
{
Expand All@@ -219,7 +219,7 @@ module.exports = [
import: createImport('init'),
ignore: ['$app/stores'],
gzip: true,
limit: '38 KB',
limit: '38.5 KB',
},
// Node SDK (ESM)
{
Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,6 +10,21 @@

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

## 9.11.0

- feat(browser): Add `http.redirect_count` attribute to `browser.redirect` span ([#15943](https://github.com/getsentry/sentry-javascript/pull/15943))
- feat(core): Add `consoleLoggingIntegration` for logs ([#15955](https://github.com/getsentry/sentry-javascript/pull/15955))
- feat(core): Don't truncate error messages ([#15818](https://github.com/getsentry/sentry-javascript/pull/15818))
- feat(nextjs): Add release injection in Turbopack ([#15958](https://github.com/getsentry/sentry-javascript/pull/15958))
- feat(nextjs): Record `turbopack` as tag ([#15928](https://github.com/getsentry/sentry-javascript/pull/15928))
- feat(nuxt): Base decision on source maps upload only on Nuxt source map settings ([#15859](https://github.com/getsentry/sentry-javascript/pull/15859))
- feat(react-router): Add `sentryHandleRequest` ([#15787](https://github.com/getsentry/sentry-javascript/pull/15787))
- fix(node): Use `module` instead of `require` for CJS check ([#15927](https://github.com/getsentry/sentry-javascript/pull/15927))
- fix(remix): Remove mentions of deprecated `ErrorBoundary` wrapper ([#15930](https://github.com/getsentry/sentry-javascript/pull/15930))
- ref(browser): Temporarily add `sentry.previous_trace` span attribute ([#15957](https://github.com/getsentry/sentry-javascript/pull/15957))
- ref(browser/core): Move all log flushing logic into clients ([#15831](https://github.com/getsentry/sentry-javascript/pull/15831))
- ref(core): Improve URL parsing utilities ([#15882](https://github.com/getsentry/sentry-javascript/pull/15882))

## 9.10.1

- fix: Correct @sentry-internal/feedback docs to match the code ([#15874](https://github.com/getsentry/sentry-javascript/pull/15874))
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
const wat = new Error(`This is a very long message that should be truncated and will be,
this is a very long message that should be truncated and will be,
this is a very long message that should be truncated and will be,
this is a very long message that should be truncated and will be,
this is a very long message that should be truncated and will be`);
const wat = new Error(`This is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be`);

wat.cause = new Error(`This is a very long message that should be truncated and hopefully will be,
this is a very long message that should be truncated and hopefully will be,
this is a very long message that should be truncated and hopefully will be,
this is a very long message that should be truncated and hopefully will be,
this is a very long message that should be truncated and hopefully will be,`);
wat.cause = new Error(`This is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be`);

Sentry.captureException(wat);
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,10 +12,11 @@ sentryTest('should capture a linked error with messages', async ({ getLocalTestU
expect(eventData.exception?.values).toHaveLength(2);
expect(eventData.exception?.values?.[0]).toMatchObject({
type: 'Error',
value: `This is a very long message that should be truncated and hopefully will be,
this is a very long message that should be truncated and hopefully will be,
this is a very long message that should be truncated and hopefully will be,
this is a very long me...`,
value: `This is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be`,
mechanism: {
type: 'chained',
handled: true,
Expand All@@ -26,10 +27,11 @@ this is a very long me...`,
});
expect(eventData.exception?.values?.[1]).toMatchObject({
type: 'Error',
value: `This is a very long message that should be truncated and will be,
this is a very long message that should be truncated and will be,
this is a very long message that should be truncated and will be,
this is a very long message that should be truncated...`,
value: `This is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be`,
mechanism: {
type: 'generic',
handled: true,
Expand Down

This file was deleted.

This file was deleted.

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
import * as Sentry from '@sentry/browser';

window.Sentry = Sentry;

Sentry.init({
dsn: 'https://public@dsn.ingest.sentry.io/1337',
_experiments: {
enableLogs: true,
},
integrations: [Sentry.consoleLoggingIntegration()],
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
console.trace('console.trace', 123, false);
console.debug('console.debug', 123, false);
console.log('console.log', 123, false);
console.info('console.info', 123, false);
console.warn('console.warn', 123, false);
console.error('console.error', 123, false);
console.assert(false, 'console.assert', 123, false);

console.log('');

Sentry.flush();
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
import { expect } from '@playwright/test';
import type { OtelLogEnvelope } from '@sentry/core';

import { sentryTest } from '../../../../utils/fixtures';
import { getFirstSentryEnvelopeRequest, properFullEnvelopeRequestParser } from '../../../../utils/helpers';

sentryTest('should capture console object calls', async ({ getLocalTestUrl, page }) => {
const bundle = process.env.PW_BUNDLE || '';
// Only run this for npm package exports
if (bundle.startsWith('bundle') || bundle.startsWith('loader')) {
sentryTest.skip();
}

const url = await getLocalTestUrl({ testDir: __dirname });

const event = await getFirstSentryEnvelopeRequest<OtelLogEnvelope>(page, url, properFullEnvelopeRequestParser);
const envelopeItems = event[1];

expect(envelopeItems[0]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'trace',
body: { stringValue: 'console.trace 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 1,
},
]);

expect(envelopeItems[1]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'debug',
body: { stringValue: 'console.debug 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 5,
},
]);

expect(envelopeItems[2]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'info',
body: { stringValue: 'console.log 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 10,
},
]);

expect(envelopeItems[3]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'info',
body: { stringValue: 'console.info 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 9,
},
]);

expect(envelopeItems[4]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'warn',
body: { stringValue: 'console.warn 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 13,
},
]);

expect(envelopeItems[5]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'error',
body: { stringValue: 'console.error 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 17,
},
]);

expect(envelopeItems[6]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'error',
body: { stringValue: 'Assertion failed: console.assert 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 17,
},
]);
});
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
import { expect } from '@playwright/test';
import type { OtelLogEnvelope } from '@sentry/core';

import { sentryTest } from '../../../utils/fixtures';
import { getFirstSentryEnvelopeRequest, properFullEnvelopeRequestParser } from '../../../utils/helpers';
import { sentryTest } from '../../../../utils/fixtures';
import { getFirstSentryEnvelopeRequest, properFullEnvelopeRequestParser } from '../../../../utils/helpers';

sentryTest('should capture all logging methods', async ({ getLocalTestUrl, page }) => {
const bundle = process.env.PW_BUNDLE || '';
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -49,6 +49,10 @@ sentryTest("navigation spans link back to previous trace's root span", async ({
},
]);

expect(navigation1TraceContext?.data).toMatchObject({
'sentry.previous_trace': `${pageloadTraceId}-${pageloadTraceContext?.span_id}-1`,
});

expect(navigation2TraceContext?.links).toEqual([
{
trace_id: navigation1TraceId,
Expand All@@ -60,6 +64,10 @@ sentryTest("navigation spans link back to previous trace's root span", async ({
},
]);

expect(navigation2TraceContext?.data).toMatchObject({
'sentry.previous_trace': `${navigation1TraceId}-${navigation1TraceContext?.span_id}-1`,
});

expect(pageloadTraceId).not.toEqual(navigation1TraceId);
expect(navigation1TraceId).not.toEqual(navigation2TraceId);
expect(pageloadTraceId).not.toEqual(navigation2TraceId);
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -34,6 +34,10 @@ sentryTest('includes a span link to a previously negatively sampled span', async
},
]);

expect(navigationTraceContext?.data).toMatchObject({
'sentry.previous_trace': expect.stringMatching(/[a-f0-9]{32}-[a-f0-9]{16}-0/),
});

expect(navigationTraceContext?.trace_id).not.toEqual(navigationTraceContext?.links![0].trace_id);
});
});
Original file line numberDiff line numberDiff line change
Expand Up@@ -43,7 +43,7 @@ test('should correctly instrument `fetch` for performance tracing', async ({ pag
'sentry.op': 'http.client',
'sentry.origin': 'auto.http.browser',
},
description: 'GET https://example.com',
description: 'GET https://example.com/',
op: 'http.client',
parent_span_id: expect.stringMatching(/[a-f0-9]{16}/),
span_id: expect.stringMatching(/[a-f0-9]{16}/),
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,4 +3,4 @@
/// <reference types="next/navigation-types/compat/navigation" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,4 +9,7 @@ const nextConfig = {

module.exports = withSentryConfig(nextConfig, {
silent: true,
release: {
name: 'foobar123',
},
});
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
64308ce
ref(browser/core): Move all log flushing logic into clients (#15831)
AbhiPrasad Mar 28, 2025
f3b9067
Merge pull request #15914 from getsentry/master
github-actions[bot] Mar 28, 2025
5a6e018
ref: Move es-compatibility checks into packages (#15773)
andreiborza Mar 31, 2025
8af26e5
ref: Bump es-compatibility to ES2022 for node-based packages (#15926)
andreiborza Mar 31, 2025
eda7a1e
fix(cjs): Use `module` instead of `require` for CJS check (#15927)
s1gr1d Mar 31, 2025
147989b
feat: Don't truncate error messages (#15818)
Mar 31, 2025
f0fc41f
ref(core): Improve URL parsing utilities (#15882)
AbhiPrasad Apr 1, 2025
06a31c4
build(profiling-node): Fix output directory & caching (#15945)
mydea Apr 1, 2025
298a23c
fix(remix): Remove mentions of deprecated `ErrorBoundary` wrapper (#1…
onurtemizkan Apr 2, 2025
9a1970b
ci(deps): bump actions/create-github-app-token from 1.11.5 to 1.12.0 …
dependabot[bot] Apr 2, 2025
305df9f
feat(nextjs): Record `turbopack` as tag (#15928)
Apr 2, 2025
71409c3
chore(tests): Fix coverage file exclusions (#15944)
Lms24 Apr 2, 2025
3c1b3c9
feat(browser): Add `http.redirect_count` attribute to `browser.redire…
Lms24 Apr 2, 2025
4661f4d
ref(browser): Temporarily add `sentry.previous_trace` span attribute …
Lms24 Apr 2, 2025
3863c29
feat(nextjs): Add release injection in Turbopack (#15958)
Apr 2, 2025
ad5c06c
feat(nuxt): Add nuxt release registry craft entry (#15962)
andreiborza Apr 3, 2025
64b1d0d
feat(nestjs): Add nestjs release registry craft entry (#15963)
andreiborza Apr 3, 2025
ee592ad
feat(tanstackstart-react): Add tanstackstart-react to release registr…
andreiborza Apr 3, 2025
9807efb
chore(nest): Add `@sentry/nestjs` to release registry
cleptric Apr 3, 2025
6501d52
feat(nuxt): Base decision on source maps upload only on Nuxt source m…
s1gr1d Apr 3, 2025
438e8be
feat(core): Add `consoleLoggingIntegration` for logs (#15955)
AbhiPrasad Apr 3, 2025
a6e9651
feat(react-router): Add `sentryHandleRequest` (#15787)
chargome Apr 3, 2025
90ee178
meta: Update CHANGELOG for 9.11.0
Lms24 Apr 3, 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
6 changes: 6 additions & 0 deletions .craft.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -193,8 +193,12 @@ targets:
onlyIfPresent: /^sentry-gatsby-\d.*\.tgz$/
'npm:@sentry/google-cloud-serverless':
onlyIfPresent: /^sentry-google-cloud-serverless-\d.*\.tgz$/
'npm:@sentry/nestjs':
onlyIfPresent: /^sentry-nestjs-\d.*\.tgz$/
'npm:@sentry/nextjs':
onlyIfPresent: /^sentry-nextjs-\d.*\.tgz$/
'npm:@sentry/nuxt':
onlyIfPresent: /^sentry-nuxt-\d.*\.tgz$/
'npm:@sentry/node':
onlyIfPresent: /^sentry-node-\d.*\.tgz$/
'npm:@sentry/react':
Expand All@@ -211,6 +215,8 @@ targets:
onlyIfPresent: /^sentry-svelte-\d.*\.tgz$/
'npm:@sentry/sveltekit':
onlyIfPresent: /^sentry-sveltekit-\d.*\.tgz$/
'npm:@sentry/tanstackstart-react':
onlyIfPresent: /^sentry-tanstackstart-react-\d.*\.tgz$/
'npm:@sentry/vercel-edge':
onlyIfPresent: /^sentry-vercel-edge-\d.*\.tgz$/
'npm:@sentry/vue':
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/auto-release.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,7 +15,7 @@ jobs:
steps:
- name: Get auth token
id: token
uses: actions/create-github-app-token@0d564482f06ca65fa9e77e2510873638c82206f2 # v1.11.5
uses: actions/create-github-app-token@d72941d797fd3113feb6b93fd0dec494b13a2547 # v1.12.0
with:
app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }}
private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -44,6 +44,7 @@ env:
CACHED_BUILD_PATHS: |
${{ github.workspace }}/dev-packages/*/build
${{ github.workspace }}/packages/*/build
${{ github.workspace }}/packages/*/lib
${{ github.workspace }}/packages/ember/*.d.ts
${{ github.workspace }}/packages/gatsby/*.d.ts
${{ github.workspace }}/packages/utils/cjs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -19,7 +19,7 @@ jobs:
steps:
- name: Get auth token
id: token
uses: actions/create-github-app-token@0d564482f06ca65fa9e77e2510873638c82206f2 # v1.11.5
uses: actions/create-github-app-token@d72941d797fd3113feb6b93fd0dec494b13a2547 # v1.12.0
with:
app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }}
private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}
Expand Down
6 changes: 3 additions & 3 deletions .size-limit.js
Original file line numberDiff line numberDiff line change
Expand Up@@ -79,7 +79,7 @@ module.exports = [
path: 'packages/browser/build/npm/esm/index.js',
import: createImport('init', 'browserTracingIntegration', 'replayIntegration', 'replayCanvasIntegration'),
gzip: true,
limit: '80.5 KB',
limit: '81 KB',
},
{
name: '@sentry/browser (incl. Tracing, Replay, Feedback)',
Expand DownExpand Up@@ -210,7 +210,7 @@ module.exports = [
import: createImport('init'),
ignore: ['next/router', 'next/constants'],
gzip: true,
limit: '41 KB',
limit: '42 KB',
},
// SvelteKit SDK (ESM)
{
Expand All@@ -219,7 +219,7 @@ module.exports = [
import: createImport('init'),
ignore: ['$app/stores'],
gzip: true,
limit: '38 KB',
limit: '38.5 KB',
},
// Node SDK (ESM)
{
Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,6 +10,21 @@

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

## 9.11.0

- feat(browser): Add `http.redirect_count` attribute to `browser.redirect` span ([#15943](https://github.com/getsentry/sentry-javascript/pull/15943))
- feat(core): Add `consoleLoggingIntegration` for logs ([#15955](https://github.com/getsentry/sentry-javascript/pull/15955))
- feat(core): Don't truncate error messages ([#15818](https://github.com/getsentry/sentry-javascript/pull/15818))
- feat(nextjs): Add release injection in Turbopack ([#15958](https://github.com/getsentry/sentry-javascript/pull/15958))
- feat(nextjs): Record `turbopack` as tag ([#15928](https://github.com/getsentry/sentry-javascript/pull/15928))
- feat(nuxt): Base decision on source maps upload only on Nuxt source map settings ([#15859](https://github.com/getsentry/sentry-javascript/pull/15859))
- feat(react-router): Add `sentryHandleRequest` ([#15787](https://github.com/getsentry/sentry-javascript/pull/15787))
- fix(node): Use `module` instead of `require` for CJS check ([#15927](https://github.com/getsentry/sentry-javascript/pull/15927))
- fix(remix): Remove mentions of deprecated `ErrorBoundary` wrapper ([#15930](https://github.com/getsentry/sentry-javascript/pull/15930))
- ref(browser): Temporarily add `sentry.previous_trace` span attribute ([#15957](https://github.com/getsentry/sentry-javascript/pull/15957))
- ref(browser/core): Move all log flushing logic into clients ([#15831](https://github.com/getsentry/sentry-javascript/pull/15831))
- ref(core): Improve URL parsing utilities ([#15882](https://github.com/getsentry/sentry-javascript/pull/15882))

## 9.10.1

- fix: Correct @sentry-internal/feedback docs to match the code ([#15874](https://github.com/getsentry/sentry-javascript/pull/15874))
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
const wat = new Error(`This is a very long message that should be truncated and will be,
this is a very long message that should be truncated and will be,
this is a very long message that should be truncated and will be,
this is a very long message that should be truncated and will be,
this is a very long message that should be truncated and will be`);
const wat = new Error(`This is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be`);

wat.cause = new Error(`This is a very long message that should be truncated and hopefully will be,
this is a very long message that should be truncated and hopefully will be,
this is a very long message that should be truncated and hopefully will be,
this is a very long message that should be truncated and hopefully will be,
this is a very long message that should be truncated and hopefully will be,`);
wat.cause = new Error(`This is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be`);

Sentry.captureException(wat);
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,10 +12,11 @@ sentryTest('should capture a linked error with messages', async ({ getLocalTestU
expect(eventData.exception?.values).toHaveLength(2);
expect(eventData.exception?.values?.[0]).toMatchObject({
type: 'Error',
value: `This is a very long message that should be truncated and hopefully will be,
this is a very long message that should be truncated and hopefully will be,
this is a very long message that should be truncated and hopefully will be,
this is a very long me...`,
value: `This is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be`,
mechanism: {
type: 'chained',
handled: true,
Expand All@@ -26,10 +27,11 @@ this is a very long me...`,
});
expect(eventData.exception?.values?.[1]).toMatchObject({
type: 'Error',
value: `This is a very long message that should be truncated and will be,
this is a very long message that should be truncated and will be,
this is a very long message that should be truncated and will be,
this is a very long message that should be truncated...`,
value: `This is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be`,
mechanism: {
type: 'generic',
handled: true,
Expand Down

This file was deleted.

This file was deleted.

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
import * as Sentry from '@sentry/browser';

window.Sentry = Sentry;

Sentry.init({
dsn: 'https://public@dsn.ingest.sentry.io/1337',
_experiments: {
enableLogs: true,
},
integrations: [Sentry.consoleLoggingIntegration()],
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
console.trace('console.trace', 123, false);
console.debug('console.debug', 123, false);
console.log('console.log', 123, false);
console.info('console.info', 123, false);
console.warn('console.warn', 123, false);
console.error('console.error', 123, false);
console.assert(false, 'console.assert', 123, false);

console.log('');

Sentry.flush();
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
import { expect } from '@playwright/test';
import type { OtelLogEnvelope } from '@sentry/core';

import { sentryTest } from '../../../../utils/fixtures';
import { getFirstSentryEnvelopeRequest, properFullEnvelopeRequestParser } from '../../../../utils/helpers';

sentryTest('should capture console object calls', async ({ getLocalTestUrl, page }) => {
const bundle = process.env.PW_BUNDLE || '';
// Only run this for npm package exports
if (bundle.startsWith('bundle') || bundle.startsWith('loader')) {
sentryTest.skip();
}

const url = await getLocalTestUrl({ testDir: __dirname });

const event = await getFirstSentryEnvelopeRequest<OtelLogEnvelope>(page, url, properFullEnvelopeRequestParser);
const envelopeItems = event[1];

expect(envelopeItems[0]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'trace',
body: { stringValue: 'console.trace 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 1,
},
]);

expect(envelopeItems[1]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'debug',
body: { stringValue: 'console.debug 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 5,
},
]);

expect(envelopeItems[2]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'info',
body: { stringValue: 'console.log 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 10,
},
]);

expect(envelopeItems[3]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'info',
body: { stringValue: 'console.info 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 9,
},
]);

expect(envelopeItems[4]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'warn',
body: { stringValue: 'console.warn 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 13,
},
]);

expect(envelopeItems[5]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'error',
body: { stringValue: 'console.error 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 17,
},
]);

expect(envelopeItems[6]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'error',
body: { stringValue: 'Assertion failed: console.assert 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 17,
},
]);
});
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
import { expect } from '@playwright/test';
import type { OtelLogEnvelope } from '@sentry/core';

import { sentryTest } from '../../../utils/fixtures';
import { getFirstSentryEnvelopeRequest, properFullEnvelopeRequestParser } from '../../../utils/helpers';
import { sentryTest } from '../../../../utils/fixtures';
import { getFirstSentryEnvelopeRequest, properFullEnvelopeRequestParser } from '../../../../utils/helpers';

sentryTest('should capture all logging methods', async ({ getLocalTestUrl, page }) => {
const bundle = process.env.PW_BUNDLE || '';
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -49,6 +49,10 @@ sentryTest("navigation spans link back to previous trace's root span", async ({
},
]);

expect(navigation1TraceContext?.data).toMatchObject({
'sentry.previous_trace': `${pageloadTraceId}-${pageloadTraceContext?.span_id}-1`,
});

expect(navigation2TraceContext?.links).toEqual([
{
trace_id: navigation1TraceId,
Expand All@@ -60,6 +64,10 @@ sentryTest("navigation spans link back to previous trace's root span", async ({
},
]);

expect(navigation2TraceContext?.data).toMatchObject({
'sentry.previous_trace': `${navigation1TraceId}-${navigation1TraceContext?.span_id}-1`,
});

expect(pageloadTraceId).not.toEqual(navigation1TraceId);
expect(navigation1TraceId).not.toEqual(navigation2TraceId);
expect(pageloadTraceId).not.toEqual(navigation2TraceId);
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -34,6 +34,10 @@ sentryTest('includes a span link to a previously negatively sampled span', async
},
]);

expect(navigationTraceContext?.data).toMatchObject({
'sentry.previous_trace': expect.stringMatching(/[a-f0-9]{32}-[a-f0-9]{16}-0/),
});

expect(navigationTraceContext?.trace_id).not.toEqual(navigationTraceContext?.links![0].trace_id);
});
});
Original file line numberDiff line numberDiff line change
Expand Up@@ -43,7 +43,7 @@ test('should correctly instrument `fetch` for performance tracing', async ({ pag
'sentry.op': 'http.client',
'sentry.origin': 'auto.http.browser',
},
description: 'GET https://example.com',
description: 'GET https://example.com/',
op: 'http.client',
parent_span_id: expect.stringMatching(/[a-f0-9]{16}/),
span_id: expect.stringMatching(/[a-f0-9]{16}/),
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,4 +3,4 @@
/// <reference types="next/navigation-types/compat/navigation" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,4 +9,7 @@ const nextConfig = {

module.exports = withSentryConfig(nextConfig, {
silent: true,
release: {
name: 'foobar123',
},
});
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
64308ce
ref(browser/core): Move all log flushing logic into clients (#15831)
AbhiPrasad Mar 28, 2025
f3b9067
Merge pull request #15914 from getsentry/master
github-actions[bot] Mar 28, 2025
5a6e018
ref: Move es-compatibility checks into packages (#15773)
andreiborza Mar 31, 2025
8af26e5
ref: Bump es-compatibility to ES2022 for node-based packages (#15926)
andreiborza Mar 31, 2025
eda7a1e
fix(cjs): Use `module` instead of `require` for CJS check (#15927)
s1gr1d Mar 31, 2025
147989b
feat: Don't truncate error messages (#15818)
Mar 31, 2025
f0fc41f
ref(core): Improve URL parsing utilities (#15882)
AbhiPrasad Apr 1, 2025
06a31c4
build(profiling-node): Fix output directory & caching (#15945)
mydea Apr 1, 2025
298a23c
fix(remix): Remove mentions of deprecated `ErrorBoundary` wrapper (#1…
onurtemizkan Apr 2, 2025
9a1970b
ci(deps): bump actions/create-github-app-token from 1.11.5 to 1.12.0 …
dependabot[bot] Apr 2, 2025
305df9f
feat(nextjs): Record `turbopack` as tag (#15928)
Apr 2, 2025
71409c3
chore(tests): Fix coverage file exclusions (#15944)
Lms24 Apr 2, 2025
3c1b3c9
feat(browser): Add `http.redirect_count` attribute to `browser.redire…
Lms24 Apr 2, 2025
4661f4d
ref(browser): Temporarily add `sentry.previous_trace` span attribute …
Lms24 Apr 2, 2025
3863c29
feat(nextjs): Add release injection in Turbopack (#15958)
Apr 2, 2025
ad5c06c
feat(nuxt): Add nuxt release registry craft entry (#15962)
andreiborza Apr 3, 2025
64b1d0d
feat(nestjs): Add nestjs release registry craft entry (#15963)
andreiborza Apr 3, 2025
ee592ad
feat(tanstackstart-react): Add tanstackstart-react to release registr…
andreiborza Apr 3, 2025
9807efb
chore(nest): Add `@sentry/nestjs` to release registry
cleptric Apr 3, 2025
6501d52
feat(nuxt): Base decision on source maps upload only on Nuxt source m…
s1gr1d Apr 3, 2025
438e8be
feat(core): Add `consoleLoggingIntegration` for logs (#15955)
AbhiPrasad Apr 3, 2025
a6e9651
feat(react-router): Add `sentryHandleRequest` (#15787)
chargome Apr 3, 2025
90ee178
meta: Update CHANGELOG for 9.11.0
Lms24 Apr 3, 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
6 changes: 6 additions & 0 deletions .craft.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -193,8 +193,12 @@ targets:
onlyIfPresent: /^sentry-gatsby-\d.*\.tgz$/
'npm:@sentry/google-cloud-serverless':
onlyIfPresent: /^sentry-google-cloud-serverless-\d.*\.tgz$/
'npm:@sentry/nestjs':
onlyIfPresent: /^sentry-nestjs-\d.*\.tgz$/
'npm:@sentry/nextjs':
onlyIfPresent: /^sentry-nextjs-\d.*\.tgz$/
'npm:@sentry/nuxt':
onlyIfPresent: /^sentry-nuxt-\d.*\.tgz$/
'npm:@sentry/node':
onlyIfPresent: /^sentry-node-\d.*\.tgz$/
'npm:@sentry/react':
Expand All@@ -211,6 +215,8 @@ targets:
onlyIfPresent: /^sentry-svelte-\d.*\.tgz$/
'npm:@sentry/sveltekit':
onlyIfPresent: /^sentry-sveltekit-\d.*\.tgz$/
'npm:@sentry/tanstackstart-react':
onlyIfPresent: /^sentry-tanstackstart-react-\d.*\.tgz$/
'npm:@sentry/vercel-edge':
onlyIfPresent: /^sentry-vercel-edge-\d.*\.tgz$/
'npm:@sentry/vue':
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/auto-release.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,7 +15,7 @@ jobs:
steps:
- name: Get auth token
id: token
uses: actions/create-github-app-token@0d564482f06ca65fa9e77e2510873638c82206f2 # v1.11.5
uses: actions/create-github-app-token@d72941d797fd3113feb6b93fd0dec494b13a2547 # v1.12.0
with:
app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }}
private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -44,6 +44,7 @@ env:
CACHED_BUILD_PATHS: |
${{ github.workspace }}/dev-packages/*/build
${{ github.workspace }}/packages/*/build
${{ github.workspace }}/packages/*/lib
${{ github.workspace }}/packages/ember/*.d.ts
${{ github.workspace }}/packages/gatsby/*.d.ts
${{ github.workspace }}/packages/utils/cjs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -19,7 +19,7 @@ jobs:
steps:
- name: Get auth token
id: token
uses: actions/create-github-app-token@0d564482f06ca65fa9e77e2510873638c82206f2 # v1.11.5
uses: actions/create-github-app-token@d72941d797fd3113feb6b93fd0dec494b13a2547 # v1.12.0
with:
app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }}
private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}
Expand Down
6 changes: 3 additions & 3 deletions .size-limit.js
Original file line numberDiff line numberDiff line change
Expand Up@@ -79,7 +79,7 @@ module.exports = [
path: 'packages/browser/build/npm/esm/index.js',
import: createImport('init', 'browserTracingIntegration', 'replayIntegration', 'replayCanvasIntegration'),
gzip: true,
limit: '80.5 KB',
limit: '81 KB',
},
{
name: '@sentry/browser (incl. Tracing, Replay, Feedback)',
Expand DownExpand Up@@ -210,7 +210,7 @@ module.exports = [
import: createImport('init'),
ignore: ['next/router', 'next/constants'],
gzip: true,
limit: '41 KB',
limit: '42 KB',
},
// SvelteKit SDK (ESM)
{
Expand All@@ -219,7 +219,7 @@ module.exports = [
import: createImport('init'),
ignore: ['$app/stores'],
gzip: true,
limit: '38 KB',
limit: '38.5 KB',
},
// Node SDK (ESM)
{
Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,6 +10,21 @@

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

## 9.11.0

- feat(browser): Add `http.redirect_count` attribute to `browser.redirect` span ([#15943](https://github.com/getsentry/sentry-javascript/pull/15943))
- feat(core): Add `consoleLoggingIntegration` for logs ([#15955](https://github.com/getsentry/sentry-javascript/pull/15955))
- feat(core): Don't truncate error messages ([#15818](https://github.com/getsentry/sentry-javascript/pull/15818))
- feat(nextjs): Add release injection in Turbopack ([#15958](https://github.com/getsentry/sentry-javascript/pull/15958))
- feat(nextjs): Record `turbopack` as tag ([#15928](https://github.com/getsentry/sentry-javascript/pull/15928))
- feat(nuxt): Base decision on source maps upload only on Nuxt source map settings ([#15859](https://github.com/getsentry/sentry-javascript/pull/15859))
- feat(react-router): Add `sentryHandleRequest` ([#15787](https://github.com/getsentry/sentry-javascript/pull/15787))
- fix(node): Use `module` instead of `require` for CJS check ([#15927](https://github.com/getsentry/sentry-javascript/pull/15927))
- fix(remix): Remove mentions of deprecated `ErrorBoundary` wrapper ([#15930](https://github.com/getsentry/sentry-javascript/pull/15930))
- ref(browser): Temporarily add `sentry.previous_trace` span attribute ([#15957](https://github.com/getsentry/sentry-javascript/pull/15957))
- ref(browser/core): Move all log flushing logic into clients ([#15831](https://github.com/getsentry/sentry-javascript/pull/15831))
- ref(core): Improve URL parsing utilities ([#15882](https://github.com/getsentry/sentry-javascript/pull/15882))

## 9.10.1

- fix: Correct @sentry-internal/feedback docs to match the code ([#15874](https://github.com/getsentry/sentry-javascript/pull/15874))
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
const wat = new Error(`This is a very long message that should be truncated and will be,
this is a very long message that should be truncated and will be,
this is a very long message that should be truncated and will be,
this is a very long message that should be truncated and will be,
this is a very long message that should be truncated and will be`);
const wat = new Error(`This is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be`);

wat.cause = new Error(`This is a very long message that should be truncated and hopefully will be,
this is a very long message that should be truncated and hopefully will be,
this is a very long message that should be truncated and hopefully will be,
this is a very long message that should be truncated and hopefully will be,
this is a very long message that should be truncated and hopefully will be,`);
wat.cause = new Error(`This is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be`);

Sentry.captureException(wat);
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,10 +12,11 @@ sentryTest('should capture a linked error with messages', async ({ getLocalTestU
expect(eventData.exception?.values).toHaveLength(2);
expect(eventData.exception?.values?.[0]).toMatchObject({
type: 'Error',
value: `This is a very long message that should be truncated and hopefully will be,
this is a very long message that should be truncated and hopefully will be,
this is a very long message that should be truncated and hopefully will be,
this is a very long me...`,
value: `This is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be`,
mechanism: {
type: 'chained',
handled: true,
Expand All@@ -26,10 +27,11 @@ this is a very long me...`,
});
expect(eventData.exception?.values?.[1]).toMatchObject({
type: 'Error',
value: `This is a very long message that should be truncated and will be,
this is a very long message that should be truncated and will be,
this is a very long message that should be truncated and will be,
this is a very long message that should be truncated...`,
value: `This is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be`,
mechanism: {
type: 'generic',
handled: true,
Expand Down

This file was deleted.

This file was deleted.

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
import * as Sentry from '@sentry/browser';

window.Sentry = Sentry;

Sentry.init({
dsn: 'https://public@dsn.ingest.sentry.io/1337',
_experiments: {
enableLogs: true,
},
integrations: [Sentry.consoleLoggingIntegration()],
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
console.trace('console.trace', 123, false);
console.debug('console.debug', 123, false);
console.log('console.log', 123, false);
console.info('console.info', 123, false);
console.warn('console.warn', 123, false);
console.error('console.error', 123, false);
console.assert(false, 'console.assert', 123, false);

console.log('');

Sentry.flush();
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
import { expect } from '@playwright/test';
import type { OtelLogEnvelope } from '@sentry/core';

import { sentryTest } from '../../../../utils/fixtures';
import { getFirstSentryEnvelopeRequest, properFullEnvelopeRequestParser } from '../../../../utils/helpers';

sentryTest('should capture console object calls', async ({ getLocalTestUrl, page }) => {
const bundle = process.env.PW_BUNDLE || '';
// Only run this for npm package exports
if (bundle.startsWith('bundle') || bundle.startsWith('loader')) {
sentryTest.skip();
}

const url = await getLocalTestUrl({ testDir: __dirname });

const event = await getFirstSentryEnvelopeRequest<OtelLogEnvelope>(page, url, properFullEnvelopeRequestParser);
const envelopeItems = event[1];

expect(envelopeItems[0]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'trace',
body: { stringValue: 'console.trace 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 1,
},
]);

expect(envelopeItems[1]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'debug',
body: { stringValue: 'console.debug 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 5,
},
]);

expect(envelopeItems[2]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'info',
body: { stringValue: 'console.log 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 10,
},
]);

expect(envelopeItems[3]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'info',
body: { stringValue: 'console.info 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 9,
},
]);

expect(envelopeItems[4]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'warn',
body: { stringValue: 'console.warn 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 13,
},
]);

expect(envelopeItems[5]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'error',
body: { stringValue: 'console.error 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 17,
},
]);

expect(envelopeItems[6]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'error',
body: { stringValue: 'Assertion failed: console.assert 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 17,
},
]);
});
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
import { expect } from '@playwright/test';
import type { OtelLogEnvelope } from '@sentry/core';

import { sentryTest } from '../../../utils/fixtures';
import { getFirstSentryEnvelopeRequest, properFullEnvelopeRequestParser } from '../../../utils/helpers';
import { sentryTest } from '../../../../utils/fixtures';
import { getFirstSentryEnvelopeRequest, properFullEnvelopeRequestParser } from '../../../../utils/helpers';

sentryTest('should capture all logging methods', async ({ getLocalTestUrl, page }) => {
const bundle = process.env.PW_BUNDLE || '';
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -49,6 +49,10 @@ sentryTest("navigation spans link back to previous trace's root span", async ({
},
]);

expect(navigation1TraceContext?.data).toMatchObject({
'sentry.previous_trace': `${pageloadTraceId}-${pageloadTraceContext?.span_id}-1`,
});

expect(navigation2TraceContext?.links).toEqual([
{
trace_id: navigation1TraceId,
Expand All@@ -60,6 +64,10 @@ sentryTest("navigation spans link back to previous trace's root span", async ({
},
]);

expect(navigation2TraceContext?.data).toMatchObject({
'sentry.previous_trace': `${navigation1TraceId}-${navigation1TraceContext?.span_id}-1`,
});

expect(pageloadTraceId).not.toEqual(navigation1TraceId);
expect(navigation1TraceId).not.toEqual(navigation2TraceId);
expect(pageloadTraceId).not.toEqual(navigation2TraceId);
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -34,6 +34,10 @@ sentryTest('includes a span link to a previously negatively sampled span', async
},
]);

expect(navigationTraceContext?.data).toMatchObject({
'sentry.previous_trace': expect.stringMatching(/[a-f0-9]{32}-[a-f0-9]{16}-0/),
});

expect(navigationTraceContext?.trace_id).not.toEqual(navigationTraceContext?.links![0].trace_id);
});
});
Original file line numberDiff line numberDiff line change
Expand Up@@ -43,7 +43,7 @@ test('should correctly instrument `fetch` for performance tracing', async ({ pag
'sentry.op': 'http.client',
'sentry.origin': 'auto.http.browser',
},
description: 'GET https://example.com',
description: 'GET https://example.com/',
op: 'http.client',
parent_span_id: expect.stringMatching(/[a-f0-9]{16}/),
span_id: expect.stringMatching(/[a-f0-9]{16}/),
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,4 +3,4 @@
/// <reference types="next/navigation-types/compat/navigation" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,4 +9,7 @@ const nextConfig = {

module.exports = withSentryConfig(nextConfig, {
silent: true,
release: {
name: 'foobar123',
},
});
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
64308ce
ref(browser/core): Move all log flushing logic into clients (#15831)
AbhiPrasad Mar 28, 2025
f3b9067
Merge pull request #15914 from getsentry/master
github-actions[bot] Mar 28, 2025
5a6e018
ref: Move es-compatibility checks into packages (#15773)
andreiborza Mar 31, 2025
8af26e5
ref: Bump es-compatibility to ES2022 for node-based packages (#15926)
andreiborza Mar 31, 2025
eda7a1e
fix(cjs): Use `module` instead of `require` for CJS check (#15927)
s1gr1d Mar 31, 2025
147989b
feat: Don't truncate error messages (#15818)
Mar 31, 2025
f0fc41f
ref(core): Improve URL parsing utilities (#15882)
AbhiPrasad Apr 1, 2025
06a31c4
build(profiling-node): Fix output directory & caching (#15945)
mydea Apr 1, 2025
298a23c
fix(remix): Remove mentions of deprecated `ErrorBoundary` wrapper (#1…
onurtemizkan Apr 2, 2025
9a1970b
ci(deps): bump actions/create-github-app-token from 1.11.5 to 1.12.0 …
dependabot[bot] Apr 2, 2025
305df9f
feat(nextjs): Record `turbopack` as tag (#15928)
Apr 2, 2025
71409c3
chore(tests): Fix coverage file exclusions (#15944)
Lms24 Apr 2, 2025
3c1b3c9
feat(browser): Add `http.redirect_count` attribute to `browser.redire…
Lms24 Apr 2, 2025
4661f4d
ref(browser): Temporarily add `sentry.previous_trace` span attribute …
Lms24 Apr 2, 2025
3863c29
feat(nextjs): Add release injection in Turbopack (#15958)
Apr 2, 2025
ad5c06c
feat(nuxt): Add nuxt release registry craft entry (#15962)
andreiborza Apr 3, 2025
64b1d0d
feat(nestjs): Add nestjs release registry craft entry (#15963)
andreiborza Apr 3, 2025
ee592ad
feat(tanstackstart-react): Add tanstackstart-react to release registr…
andreiborza Apr 3, 2025
9807efb
chore(nest): Add `@sentry/nestjs` to release registry
cleptric Apr 3, 2025
6501d52
feat(nuxt): Base decision on source maps upload only on Nuxt source m…
s1gr1d Apr 3, 2025
438e8be
feat(core): Add `consoleLoggingIntegration` for logs (#15955)
AbhiPrasad Apr 3, 2025
a6e9651
feat(react-router): Add `sentryHandleRequest` (#15787)
chargome Apr 3, 2025
90ee178
meta: Update CHANGELOG for 9.11.0
Lms24 Apr 3, 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
6 changes: 6 additions & 0 deletions .craft.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -193,8 +193,12 @@ targets:
onlyIfPresent: /^sentry-gatsby-\d.*\.tgz$/
'npm:@sentry/google-cloud-serverless':
onlyIfPresent: /^sentry-google-cloud-serverless-\d.*\.tgz$/
'npm:@sentry/nestjs':
onlyIfPresent: /^sentry-nestjs-\d.*\.tgz$/
'npm:@sentry/nextjs':
onlyIfPresent: /^sentry-nextjs-\d.*\.tgz$/
'npm:@sentry/nuxt':
onlyIfPresent: /^sentry-nuxt-\d.*\.tgz$/
'npm:@sentry/node':
onlyIfPresent: /^sentry-node-\d.*\.tgz$/
'npm:@sentry/react':
Expand All@@ -211,6 +215,8 @@ targets:
onlyIfPresent: /^sentry-svelte-\d.*\.tgz$/
'npm:@sentry/sveltekit':
onlyIfPresent: /^sentry-sveltekit-\d.*\.tgz$/
'npm:@sentry/tanstackstart-react':
onlyIfPresent: /^sentry-tanstackstart-react-\d.*\.tgz$/
'npm:@sentry/vercel-edge':
onlyIfPresent: /^sentry-vercel-edge-\d.*\.tgz$/
'npm:@sentry/vue':
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/auto-release.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,7 +15,7 @@ jobs:
steps:
- name: Get auth token
id: token
uses: actions/create-github-app-token@0d564482f06ca65fa9e77e2510873638c82206f2 # v1.11.5
uses: actions/create-github-app-token@d72941d797fd3113feb6b93fd0dec494b13a2547 # v1.12.0
with:
app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }}
private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -44,6 +44,7 @@ env:
CACHED_BUILD_PATHS: |
${{ github.workspace }}/dev-packages/*/build
${{ github.workspace }}/packages/*/build
${{ github.workspace }}/packages/*/lib
${{ github.workspace }}/packages/ember/*.d.ts
${{ github.workspace }}/packages/gatsby/*.d.ts
${{ github.workspace }}/packages/utils/cjs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -19,7 +19,7 @@ jobs:
steps:
- name: Get auth token
id: token
uses: actions/create-github-app-token@0d564482f06ca65fa9e77e2510873638c82206f2 # v1.11.5
uses: actions/create-github-app-token@d72941d797fd3113feb6b93fd0dec494b13a2547 # v1.12.0
with:
app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }}
private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}
Expand Down
6 changes: 3 additions & 3 deletions .size-limit.js
Original file line numberDiff line numberDiff line change
Expand Up@@ -79,7 +79,7 @@ module.exports = [
path: 'packages/browser/build/npm/esm/index.js',
import: createImport('init', 'browserTracingIntegration', 'replayIntegration', 'replayCanvasIntegration'),
gzip: true,
limit: '80.5 KB',
limit: '81 KB',
},
{
name: '@sentry/browser (incl. Tracing, Replay, Feedback)',
Expand DownExpand Up@@ -210,7 +210,7 @@ module.exports = [
import: createImport('init'),
ignore: ['next/router', 'next/constants'],
gzip: true,
limit: '41 KB',
limit: '42 KB',
},
// SvelteKit SDK (ESM)
{
Expand All@@ -219,7 +219,7 @@ module.exports = [
import: createImport('init'),
ignore: ['$app/stores'],
gzip: true,
limit: '38 KB',
limit: '38.5 KB',
},
// Node SDK (ESM)
{
Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,6 +10,21 @@

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

## 9.11.0

- feat(browser): Add `http.redirect_count` attribute to `browser.redirect` span ([#15943](https://github.com/getsentry/sentry-javascript/pull/15943))
- feat(core): Add `consoleLoggingIntegration` for logs ([#15955](https://github.com/getsentry/sentry-javascript/pull/15955))
- feat(core): Don't truncate error messages ([#15818](https://github.com/getsentry/sentry-javascript/pull/15818))
- feat(nextjs): Add release injection in Turbopack ([#15958](https://github.com/getsentry/sentry-javascript/pull/15958))
- feat(nextjs): Record `turbopack` as tag ([#15928](https://github.com/getsentry/sentry-javascript/pull/15928))
- feat(nuxt): Base decision on source maps upload only on Nuxt source map settings ([#15859](https://github.com/getsentry/sentry-javascript/pull/15859))
- feat(react-router): Add `sentryHandleRequest` ([#15787](https://github.com/getsentry/sentry-javascript/pull/15787))
- fix(node): Use `module` instead of `require` for CJS check ([#15927](https://github.com/getsentry/sentry-javascript/pull/15927))
- fix(remix): Remove mentions of deprecated `ErrorBoundary` wrapper ([#15930](https://github.com/getsentry/sentry-javascript/pull/15930))
- ref(browser): Temporarily add `sentry.previous_trace` span attribute ([#15957](https://github.com/getsentry/sentry-javascript/pull/15957))
- ref(browser/core): Move all log flushing logic into clients ([#15831](https://github.com/getsentry/sentry-javascript/pull/15831))
- ref(core): Improve URL parsing utilities ([#15882](https://github.com/getsentry/sentry-javascript/pull/15882))

## 9.10.1

- fix: Correct @sentry-internal/feedback docs to match the code ([#15874](https://github.com/getsentry/sentry-javascript/pull/15874))
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
const wat = new Error(`This is a very long message that should be truncated and will be,
this is a very long message that should be truncated and will be,
this is a very long message that should be truncated and will be,
this is a very long message that should be truncated and will be,
this is a very long message that should be truncated and will be`);
const wat = new Error(`This is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be`);

wat.cause = new Error(`This is a very long message that should be truncated and hopefully will be,
this is a very long message that should be truncated and hopefully will be,
this is a very long message that should be truncated and hopefully will be,
this is a very long message that should be truncated and hopefully will be,
this is a very long message that should be truncated and hopefully will be,`);
wat.cause = new Error(`This is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be`);

Sentry.captureException(wat);
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,10 +12,11 @@ sentryTest('should capture a linked error with messages', async ({ getLocalTestU
expect(eventData.exception?.values).toHaveLength(2);
expect(eventData.exception?.values?.[0]).toMatchObject({
type: 'Error',
value: `This is a very long message that should be truncated and hopefully will be,
this is a very long message that should be truncated and hopefully will be,
this is a very long message that should be truncated and hopefully will be,
this is a very long me...`,
value: `This is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be`,
mechanism: {
type: 'chained',
handled: true,
Expand All@@ -26,10 +27,11 @@ this is a very long me...`,
});
expect(eventData.exception?.values?.[1]).toMatchObject({
type: 'Error',
value: `This is a very long message that should be truncated and will be,
this is a very long message that should be truncated and will be,
this is a very long message that should be truncated and will be,
this is a very long message that should be truncated...`,
value: `This is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be`,
mechanism: {
type: 'generic',
handled: true,
Expand Down

This file was deleted.

This file was deleted.

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
import * as Sentry from '@sentry/browser';

window.Sentry = Sentry;

Sentry.init({
dsn: 'https://public@dsn.ingest.sentry.io/1337',
_experiments: {
enableLogs: true,
},
integrations: [Sentry.consoleLoggingIntegration()],
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
console.trace('console.trace', 123, false);
console.debug('console.debug', 123, false);
console.log('console.log', 123, false);
console.info('console.info', 123, false);
console.warn('console.warn', 123, false);
console.error('console.error', 123, false);
console.assert(false, 'console.assert', 123, false);

console.log('');

Sentry.flush();
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
import { expect } from '@playwright/test';
import type { OtelLogEnvelope } from '@sentry/core';

import { sentryTest } from '../../../../utils/fixtures';
import { getFirstSentryEnvelopeRequest, properFullEnvelopeRequestParser } from '../../../../utils/helpers';

sentryTest('should capture console object calls', async ({ getLocalTestUrl, page }) => {
const bundle = process.env.PW_BUNDLE || '';
// Only run this for npm package exports
if (bundle.startsWith('bundle') || bundle.startsWith('loader')) {
sentryTest.skip();
}

const url = await getLocalTestUrl({ testDir: __dirname });

const event = await getFirstSentryEnvelopeRequest<OtelLogEnvelope>(page, url, properFullEnvelopeRequestParser);
const envelopeItems = event[1];

expect(envelopeItems[0]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'trace',
body: { stringValue: 'console.trace 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 1,
},
]);

expect(envelopeItems[1]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'debug',
body: { stringValue: 'console.debug 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 5,
},
]);

expect(envelopeItems[2]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'info',
body: { stringValue: 'console.log 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 10,
},
]);

expect(envelopeItems[3]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'info',
body: { stringValue: 'console.info 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 9,
},
]);

expect(envelopeItems[4]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'warn',
body: { stringValue: 'console.warn 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 13,
},
]);

expect(envelopeItems[5]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'error',
body: { stringValue: 'console.error 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 17,
},
]);

expect(envelopeItems[6]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'error',
body: { stringValue: 'Assertion failed: console.assert 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 17,
},
]);
});
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
import { expect } from '@playwright/test';
import type { OtelLogEnvelope } from '@sentry/core';

import { sentryTest } from '../../../utils/fixtures';
import { getFirstSentryEnvelopeRequest, properFullEnvelopeRequestParser } from '../../../utils/helpers';
import { sentryTest } from '../../../../utils/fixtures';
import { getFirstSentryEnvelopeRequest, properFullEnvelopeRequestParser } from '../../../../utils/helpers';

sentryTest('should capture all logging methods', async ({ getLocalTestUrl, page }) => {
const bundle = process.env.PW_BUNDLE || '';
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -49,6 +49,10 @@ sentryTest("navigation spans link back to previous trace's root span", async ({
},
]);

expect(navigation1TraceContext?.data).toMatchObject({
'sentry.previous_trace': `${pageloadTraceId}-${pageloadTraceContext?.span_id}-1`,
});

expect(navigation2TraceContext?.links).toEqual([
{
trace_id: navigation1TraceId,
Expand All@@ -60,6 +64,10 @@ sentryTest("navigation spans link back to previous trace's root span", async ({
},
]);

expect(navigation2TraceContext?.data).toMatchObject({
'sentry.previous_trace': `${navigation1TraceId}-${navigation1TraceContext?.span_id}-1`,
});

expect(pageloadTraceId).not.toEqual(navigation1TraceId);
expect(navigation1TraceId).not.toEqual(navigation2TraceId);
expect(pageloadTraceId).not.toEqual(navigation2TraceId);
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -34,6 +34,10 @@ sentryTest('includes a span link to a previously negatively sampled span', async
},
]);

expect(navigationTraceContext?.data).toMatchObject({
'sentry.previous_trace': expect.stringMatching(/[a-f0-9]{32}-[a-f0-9]{16}-0/),
});

expect(navigationTraceContext?.trace_id).not.toEqual(navigationTraceContext?.links![0].trace_id);
});
});
Original file line numberDiff line numberDiff line change
Expand Up@@ -43,7 +43,7 @@ test('should correctly instrument `fetch` for performance tracing', async ({ pag
'sentry.op': 'http.client',
'sentry.origin': 'auto.http.browser',
},
description: 'GET https://example.com',
description: 'GET https://example.com/',
op: 'http.client',
parent_span_id: expect.stringMatching(/[a-f0-9]{16}/),
span_id: expect.stringMatching(/[a-f0-9]{16}/),
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,4 +3,4 @@
/// <reference types="next/navigation-types/compat/navigation" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,4 +9,7 @@ const nextConfig = {

module.exports = withSentryConfig(nextConfig, {
silent: true,
release: {
name: 'foobar123',
},
});
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
64308ce
ref(browser/core): Move all log flushing logic into clients (#15831)
AbhiPrasad Mar 28, 2025
f3b9067
Merge pull request #15914 from getsentry/master
github-actions[bot] Mar 28, 2025
5a6e018
ref: Move es-compatibility checks into packages (#15773)
andreiborza Mar 31, 2025
8af26e5
ref: Bump es-compatibility to ES2022 for node-based packages (#15926)
andreiborza Mar 31, 2025
eda7a1e
fix(cjs): Use `module` instead of `require` for CJS check (#15927)
s1gr1d Mar 31, 2025
147989b
feat: Don't truncate error messages (#15818)
Mar 31, 2025
f0fc41f
ref(core): Improve URL parsing utilities (#15882)
AbhiPrasad Apr 1, 2025
06a31c4
build(profiling-node): Fix output directory & caching (#15945)
mydea Apr 1, 2025
298a23c
fix(remix): Remove mentions of deprecated `ErrorBoundary` wrapper (#1…
onurtemizkan Apr 2, 2025
9a1970b
ci(deps): bump actions/create-github-app-token from 1.11.5 to 1.12.0 …
dependabot[bot] Apr 2, 2025
305df9f
feat(nextjs): Record `turbopack` as tag (#15928)
Apr 2, 2025
71409c3
chore(tests): Fix coverage file exclusions (#15944)
Lms24 Apr 2, 2025
3c1b3c9
feat(browser): Add `http.redirect_count` attribute to `browser.redire…
Lms24 Apr 2, 2025
4661f4d
ref(browser): Temporarily add `sentry.previous_trace` span attribute …
Lms24 Apr 2, 2025
3863c29
feat(nextjs): Add release injection in Turbopack (#15958)
Apr 2, 2025
ad5c06c
feat(nuxt): Add nuxt release registry craft entry (#15962)
andreiborza Apr 3, 2025
64b1d0d
feat(nestjs): Add nestjs release registry craft entry (#15963)
andreiborza Apr 3, 2025
ee592ad
feat(tanstackstart-react): Add tanstackstart-react to release registr…
andreiborza Apr 3, 2025
9807efb
chore(nest): Add `@sentry/nestjs` to release registry
cleptric Apr 3, 2025
6501d52
feat(nuxt): Base decision on source maps upload only on Nuxt source m…
s1gr1d Apr 3, 2025
438e8be
feat(core): Add `consoleLoggingIntegration` for logs (#15955)
AbhiPrasad Apr 3, 2025
a6e9651
feat(react-router): Add `sentryHandleRequest` (#15787)
chargome Apr 3, 2025
90ee178
meta: Update CHANGELOG for 9.11.0
Lms24 Apr 3, 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
6 changes: 6 additions & 0 deletions .craft.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -193,8 +193,12 @@ targets:
onlyIfPresent: /^sentry-gatsby-\d.*\.tgz$/
'npm:@sentry/google-cloud-serverless':
onlyIfPresent: /^sentry-google-cloud-serverless-\d.*\.tgz$/
'npm:@sentry/nestjs':
onlyIfPresent: /^sentry-nestjs-\d.*\.tgz$/
'npm:@sentry/nextjs':
onlyIfPresent: /^sentry-nextjs-\d.*\.tgz$/
'npm:@sentry/nuxt':
onlyIfPresent: /^sentry-nuxt-\d.*\.tgz$/
'npm:@sentry/node':
onlyIfPresent: /^sentry-node-\d.*\.tgz$/
'npm:@sentry/react':
Expand All@@ -211,6 +215,8 @@ targets:
onlyIfPresent: /^sentry-svelte-\d.*\.tgz$/
'npm:@sentry/sveltekit':
onlyIfPresent: /^sentry-sveltekit-\d.*\.tgz$/
'npm:@sentry/tanstackstart-react':
onlyIfPresent: /^sentry-tanstackstart-react-\d.*\.tgz$/
'npm:@sentry/vercel-edge':
onlyIfPresent: /^sentry-vercel-edge-\d.*\.tgz$/
'npm:@sentry/vue':
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/auto-release.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,7 +15,7 @@ jobs:
steps:
- name: Get auth token
id: token
uses: actions/create-github-app-token@0d564482f06ca65fa9e77e2510873638c82206f2 # v1.11.5
uses: actions/create-github-app-token@d72941d797fd3113feb6b93fd0dec494b13a2547 # v1.12.0
with:
app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }}
private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -44,6 +44,7 @@ env:
CACHED_BUILD_PATHS: |
${{ github.workspace }}/dev-packages/*/build
${{ github.workspace }}/packages/*/build
${{ github.workspace }}/packages/*/lib
${{ github.workspace }}/packages/ember/*.d.ts
${{ github.workspace }}/packages/gatsby/*.d.ts
${{ github.workspace }}/packages/utils/cjs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -19,7 +19,7 @@ jobs:
steps:
- name: Get auth token
id: token
uses: actions/create-github-app-token@0d564482f06ca65fa9e77e2510873638c82206f2 # v1.11.5
uses: actions/create-github-app-token@d72941d797fd3113feb6b93fd0dec494b13a2547 # v1.12.0
with:
app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }}
private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}
Expand Down
6 changes: 3 additions & 3 deletions .size-limit.js
Original file line numberDiff line numberDiff line change
Expand Up@@ -79,7 +79,7 @@ module.exports = [
path: 'packages/browser/build/npm/esm/index.js',
import: createImport('init', 'browserTracingIntegration', 'replayIntegration', 'replayCanvasIntegration'),
gzip: true,
limit: '80.5 KB',
limit: '81 KB',
},
{
name: '@sentry/browser (incl. Tracing, Replay, Feedback)',
Expand DownExpand Up@@ -210,7 +210,7 @@ module.exports = [
import: createImport('init'),
ignore: ['next/router', 'next/constants'],
gzip: true,
limit: '41 KB',
limit: '42 KB',
},
// SvelteKit SDK (ESM)
{
Expand All@@ -219,7 +219,7 @@ module.exports = [
import: createImport('init'),
ignore: ['$app/stores'],
gzip: true,
limit: '38 KB',
limit: '38.5 KB',
},
// Node SDK (ESM)
{
Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,6 +10,21 @@

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

## 9.11.0

- feat(browser): Add `http.redirect_count` attribute to `browser.redirect` span ([#15943](https://github.com/getsentry/sentry-javascript/pull/15943))
- feat(core): Add `consoleLoggingIntegration` for logs ([#15955](https://github.com/getsentry/sentry-javascript/pull/15955))
- feat(core): Don't truncate error messages ([#15818](https://github.com/getsentry/sentry-javascript/pull/15818))
- feat(nextjs): Add release injection in Turbopack ([#15958](https://github.com/getsentry/sentry-javascript/pull/15958))
- feat(nextjs): Record `turbopack` as tag ([#15928](https://github.com/getsentry/sentry-javascript/pull/15928))
- feat(nuxt): Base decision on source maps upload only on Nuxt source map settings ([#15859](https://github.com/getsentry/sentry-javascript/pull/15859))
- feat(react-router): Add `sentryHandleRequest` ([#15787](https://github.com/getsentry/sentry-javascript/pull/15787))
- fix(node): Use `module` instead of `require` for CJS check ([#15927](https://github.com/getsentry/sentry-javascript/pull/15927))
- fix(remix): Remove mentions of deprecated `ErrorBoundary` wrapper ([#15930](https://github.com/getsentry/sentry-javascript/pull/15930))
- ref(browser): Temporarily add `sentry.previous_trace` span attribute ([#15957](https://github.com/getsentry/sentry-javascript/pull/15957))
- ref(browser/core): Move all log flushing logic into clients ([#15831](https://github.com/getsentry/sentry-javascript/pull/15831))
- ref(core): Improve URL parsing utilities ([#15882](https://github.com/getsentry/sentry-javascript/pull/15882))

## 9.10.1

- fix: Correct @sentry-internal/feedback docs to match the code ([#15874](https://github.com/getsentry/sentry-javascript/pull/15874))
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
const wat = new Error(`This is a very long message that should be truncated and will be,
this is a very long message that should be truncated and will be,
this is a very long message that should be truncated and will be,
this is a very long message that should be truncated and will be,
this is a very long message that should be truncated and will be`);
const wat = new Error(`This is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be`);

wat.cause = new Error(`This is a very long message that should be truncated and hopefully will be,
this is a very long message that should be truncated and hopefully will be,
this is a very long message that should be truncated and hopefully will be,
this is a very long message that should be truncated and hopefully will be,
this is a very long message that should be truncated and hopefully will be,`);
wat.cause = new Error(`This is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be`);

Sentry.captureException(wat);
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,10 +12,11 @@ sentryTest('should capture a linked error with messages', async ({ getLocalTestU
expect(eventData.exception?.values).toHaveLength(2);
expect(eventData.exception?.values?.[0]).toMatchObject({
type: 'Error',
value: `This is a very long message that should be truncated and hopefully will be,
this is a very long message that should be truncated and hopefully will be,
this is a very long message that should be truncated and hopefully will be,
this is a very long me...`,
value: `This is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be,
this is a very long message that should not be truncated and hopefully won't be`,
mechanism: {
type: 'chained',
handled: true,
Expand All@@ -26,10 +27,11 @@ this is a very long me...`,
});
expect(eventData.exception?.values?.[1]).toMatchObject({
type: 'Error',
value: `This is a very long message that should be truncated and will be,
this is a very long message that should be truncated and will be,
this is a very long message that should be truncated and will be,
this is a very long message that should be truncated...`,
value: `This is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be,
this is a very long message that should not be truncated and won't be`,
mechanism: {
type: 'generic',
handled: true,
Expand Down

This file was deleted.

This file was deleted.

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
import * as Sentry from '@sentry/browser';

window.Sentry = Sentry;

Sentry.init({
dsn: 'https://public@dsn.ingest.sentry.io/1337',
_experiments: {
enableLogs: true,
},
integrations: [Sentry.consoleLoggingIntegration()],
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
console.trace('console.trace', 123, false);
console.debug('console.debug', 123, false);
console.log('console.log', 123, false);
console.info('console.info', 123, false);
console.warn('console.warn', 123, false);
console.error('console.error', 123, false);
console.assert(false, 'console.assert', 123, false);

console.log('');

Sentry.flush();
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
import { expect } from '@playwright/test';
import type { OtelLogEnvelope } from '@sentry/core';

import { sentryTest } from '../../../../utils/fixtures';
import { getFirstSentryEnvelopeRequest, properFullEnvelopeRequestParser } from '../../../../utils/helpers';

sentryTest('should capture console object calls', async ({ getLocalTestUrl, page }) => {
const bundle = process.env.PW_BUNDLE || '';
// Only run this for npm package exports
if (bundle.startsWith('bundle') || bundle.startsWith('loader')) {
sentryTest.skip();
}

const url = await getLocalTestUrl({ testDir: __dirname });

const event = await getFirstSentryEnvelopeRequest<OtelLogEnvelope>(page, url, properFullEnvelopeRequestParser);
const envelopeItems = event[1];

expect(envelopeItems[0]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'trace',
body: { stringValue: 'console.trace 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 1,
},
]);

expect(envelopeItems[1]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'debug',
body: { stringValue: 'console.debug 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 5,
},
]);

expect(envelopeItems[2]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'info',
body: { stringValue: 'console.log 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 10,
},
]);

expect(envelopeItems[3]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'info',
body: { stringValue: 'console.info 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 9,
},
]);

expect(envelopeItems[4]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'warn',
body: { stringValue: 'console.warn 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 13,
},
]);

expect(envelopeItems[5]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'error',
body: { stringValue: 'console.error 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 17,
},
]);

expect(envelopeItems[6]).toEqual([
{
type: 'otel_log',
},
{
severityText: 'error',
body: { stringValue: 'Assertion failed: console.assert 123 false' },
attributes: [],
timeUnixNano: expect.any(String),
traceId: expect.any(String),
severityNumber: 17,
},
]);
});
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
import { expect } from '@playwright/test';
import type { OtelLogEnvelope } from '@sentry/core';

import { sentryTest } from '../../../utils/fixtures';
import { getFirstSentryEnvelopeRequest, properFullEnvelopeRequestParser } from '../../../utils/helpers';
import { sentryTest } from '../../../../utils/fixtures';
import { getFirstSentryEnvelopeRequest, properFullEnvelopeRequestParser } from '../../../../utils/helpers';

sentryTest('should capture all logging methods', async ({ getLocalTestUrl, page }) => {
const bundle = process.env.PW_BUNDLE || '';
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -49,6 +49,10 @@ sentryTest("navigation spans link back to previous trace's root span", async ({
},
]);

expect(navigation1TraceContext?.data).toMatchObject({
'sentry.previous_trace': `${pageloadTraceId}-${pageloadTraceContext?.span_id}-1`,
});

expect(navigation2TraceContext?.links).toEqual([
{
trace_id: navigation1TraceId,
Expand All@@ -60,6 +64,10 @@ sentryTest("navigation spans link back to previous trace's root span", async ({
},
]);

expect(navigation2TraceContext?.data).toMatchObject({
'sentry.previous_trace': `${navigation1TraceId}-${navigation1TraceContext?.span_id}-1`,
});

expect(pageloadTraceId).not.toEqual(navigation1TraceId);
expect(navigation1TraceId).not.toEqual(navigation2TraceId);
expect(pageloadTraceId).not.toEqual(navigation2TraceId);
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -34,6 +34,10 @@ sentryTest('includes a span link to a previously negatively sampled span', async
},
]);

expect(navigationTraceContext?.data).toMatchObject({
'sentry.previous_trace': expect.stringMatching(/[a-f0-9]{32}-[a-f0-9]{16}-0/),
});

expect(navigationTraceContext?.trace_id).not.toEqual(navigationTraceContext?.links![0].trace_id);
});
});
Original file line numberDiff line numberDiff line change
Expand Up@@ -43,7 +43,7 @@ test('should correctly instrument `fetch` for performance tracing', async ({ pag
'sentry.op': 'http.client',
'sentry.origin': 'auto.http.browser',
},
description: 'GET https://example.com',
description: 'GET https://example.com/',
op: 'http.client',
parent_span_id: expect.stringMatching(/[a-f0-9]{16}/),
span_id: expect.stringMatching(/[a-f0-9]{16}/),
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,4 +3,4 @@
/// <reference types="next/navigation-types/compat/navigation" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,4 +9,7 @@ const nextConfig = {

module.exports = withSentryConfig(nextConfig, {
silent: true,
release: {
name: 'foobar123',
},
});
Loading