-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
meta: Add CHANGELOG entry for 8.5.0
#12236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
a87af78
Merge pull request #12195 from getsentry/master
github-actions[bot] a9e6ba8
fix(node): Add origin to redis span (#12201)
mydea 0ac519a
chore(ci): Remove unused NODE_VERSION 16 env from browser ci tests (#…
andreiborza a9cef35
fix(browser): Remove optional chaining in INP code (#12196)
AbhiPrasad 41951ba
fix(nextjs): Don't report React postpone errors (#12194)
805c577
build(react/remix): Use new `jsx` JSX transform instead of `React.cre…
ca4afef
feat(react): Add React 19 to peer deps (#12207)
AbhiPrasad 5791a38
fix(replay): Update matcher for hydration error detection to new Reac…
3ea5373
fix(nextjs): Use global scope for generic event filters (#12205)
93c467d
test: Disable ember-release and embroider-optimized ember canary test…
AbhiPrasad 186e982
feat(solidjs): Add solidjs SDK basic package (#12193)
andreiborza 8fa393c
fix(node): Change import of `@prisma/instrumentation` to use default …
cc1cb7b
feat(node): Ensure manual OTEL setup works (#12214)
mydea 5a1fae6
feat(core): Allow to pass custom scope to `captureFeedback()` (#12216)
mydea 330750d
feat(core): Add `startNewTrace` API (#12138)
Lms24 b188e61
feat(node): Add `@sentry/node/preload` hook (#12213)
mydea 5469f89
feat(lforst): Only allow `SerializedSession` in session envelope item…
8479698
build: Add size-limit entry for metrics (#12227)
mydea 3e179e1
test(e2e): Unflake sveltekit test (#12228)
2043f2d
feat(nextjs): Use Vercel's `waitUntil` to defer freezing of Vercel La…
c2b9079
fix(aws-serverless): Avoid minifying `Module._resolveFilename` in Lam…
Lms24 1f8f1b8
ref(profiling-node): Add warning when using non-LTS node (#12211)
AbhiPrasad 5282753
fix: Only import `inspector` asynchronously (#12231)
timfish 83c255a
fix(aws): Ensure lambda layer uses default export from `ImportInTheMi…
Lms24 8dca102
fix(browser): Improve browser extension error message check (#12146)
Lms24 0fbe39a
feat(browser): Do not include metrics in base CDN bundle (#12230)
mydea f32f88d
meta: Add CHANGELOG entry for `8.5.0`
Lms24 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
12 changes: 10 additions & 2 deletions
12
...-integration-tests/suites/metrics/test.ts → ...tests/suites/metrics/metricsEvent/test.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
dev-packages/browser-integration-tests/suites/metrics/metricsShim/init.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import * as Sentry from '@sentry/browser'; | ||
|
||
window.Sentry = Sentry; | ||
|
||
Sentry.init({ | ||
dsn: 'https://[email protected]/1337', | ||
}); | ||
|
||
// This should not fail | ||
Sentry.metrics.increment('increment'); | ||
Sentry.metrics.distribution('distribution', 42); | ||
Sentry.metrics.gauge('gauge', 5); | ||
Sentry.metrics.set('set', 'nope'); |
36 changes: 36 additions & 0 deletions
36
dev-packages/browser-integration-tests/suites/metrics/metricsShim/test.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { expect } from '@playwright/test'; | ||
|
||
import { sentryTest } from '../../../utils/fixtures'; | ||
import { shouldSkipMetricsTest } from '../../../utils/helpers'; | ||
|
||
sentryTest('exports shim metrics integration for non-tracing bundles', async ({ getLocalTestPath, page }) => { | ||
// Skip in tracing tests | ||
if (!shouldSkipMetricsTest()) { | ||
sentryTest.skip(); | ||
} | ||
|
||
const consoleMessages: string[] = []; | ||
page.on('console', msg => consoleMessages.push(msg.text())); | ||
|
||
let requestCount = 0; | ||
await page.route('https://dsn.ingest.sentry.io/**/*', route => { | ||
requestCount++; | ||
return route.fulfill({ | ||
status: 200, | ||
contentType: 'application/json', | ||
body: JSON.stringify({ id: 'test-id' }), | ||
}); | ||
}); | ||
|
||
const url = await getLocalTestPath({ testDir: __dirname }); | ||
|
||
await page.goto(url); | ||
|
||
expect(requestCount).toBe(0); | ||
expect(consoleMessages).toEqual([ | ||
'You are using metrics even though this bundle does not include tracing.', | ||
'You are using metrics even though this bundle does not include tracing.', | ||
'You are using metrics even though this bundle does not include tracing.', | ||
'You are using metrics even though this bundle does not include tracing.', | ||
]); | ||
}); |
15 changes: 15 additions & 0 deletions
15
...packages/browser-integration-tests/suites/tracing/trace-lifetime/startNewTrace/subject.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
const newTraceBtn = document.getElementById('newTrace'); | ||
newTraceBtn.addEventListener('click', async () => { | ||
Sentry.startNewTrace(() => { | ||
Sentry.startSpan({ op: 'ui.interaction.click', name: 'new-trace' }, async () => { | ||
await fetch('http://example.com'); | ||
}); | ||
}); | ||
}); | ||
|
||
const oldTraceBtn = document.getElementById('oldTrace'); | ||
oldTraceBtn.addEventListener('click', async () => { | ||
Sentry.startSpan({ op: 'ui.interaction.click', name: 'old-trace' }, async () => { | ||
await fetch('http://example.com'); | ||
}); | ||
}); |
10 changes: 10 additions & 0 deletions
10
...kages/browser-integration-tests/suites/tracing/trace-lifetime/startNewTrace/template.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
</head> | ||
<body> | ||
<button id="oldTrace">Old Trace</button> | ||
<button id="newTrace">new Trace</button> | ||
</body> | ||
</html> |
106 changes: 106 additions & 0 deletions
106
dev-packages/browser-integration-tests/suites/tracing/trace-lifetime/startNewTrace/test.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
import { expect } from '@playwright/test'; | ||
import { sentryTest } from '../../../../utils/fixtures'; | ||
import type { EventAndTraceHeader } from '../../../../utils/helpers'; | ||
import { | ||
eventAndTraceHeaderRequestParser, | ||
getFirstSentryEnvelopeRequest, | ||
getMultipleSentryEnvelopeRequests, | ||
shouldSkipTracingTest, | ||
} from '../../../../utils/helpers'; | ||
|
||
sentryTest( | ||
'creates a new trace if `startNewTrace` is called and leaves old trace valid outside the callback', | ||
async ({ getLocalTestUrl, page }) => { | ||
if (shouldSkipTracingTest()) { | ||
sentryTest.skip(); | ||
} | ||
|
||
const url = await getLocalTestUrl({ testDir: __dirname }); | ||
|
||
await page.route('http://example.com/**', route => { | ||
return route.fulfill({ | ||
status: 200, | ||
contentType: 'application/json', | ||
body: JSON.stringify({}), | ||
}); | ||
}); | ||
|
||
const [pageloadEvent, pageloadTraceHeaders] = await getFirstSentryEnvelopeRequest<EventAndTraceHeader>( | ||
page, | ||
url, | ||
eventAndTraceHeaderRequestParser, | ||
); | ||
|
||
const pageloadTraceContext = pageloadEvent.contexts?.trace; | ||
|
||
expect(pageloadEvent.type).toEqual('transaction'); | ||
|
||
expect(pageloadTraceContext).toMatchObject({ | ||
op: 'pageload', | ||
trace_id: expect.stringMatching(/^[0-9a-f]{32}$/), | ||
span_id: expect.stringMatching(/^[0-9a-f]{16}$/), | ||
}); | ||
expect(pageloadTraceContext).not.toHaveProperty('parent_span_id'); | ||
|
||
expect(pageloadTraceHeaders).toEqual({ | ||
environment: 'production', | ||
public_key: 'public', | ||
sample_rate: '1', | ||
sampled: 'true', | ||
trace_id: pageloadTraceContext?.trace_id, | ||
}); | ||
|
||
const transactionPromises = getMultipleSentryEnvelopeRequests<EventAndTraceHeader>( | ||
page, | ||
2, | ||
{ envelopeType: 'transaction' }, | ||
eventAndTraceHeaderRequestParser, | ||
); | ||
|
||
await page.locator('#newTrace').click(); | ||
await page.locator('#oldTrace').click(); | ||
|
||
const [txnEvent1, txnEvent2] = await transactionPromises; | ||
|
||
const [newTraceTransactionEvent, newTraceTransactionTraceHeaders] = | ||
txnEvent1[0].transaction === 'new-trace' ? txnEvent1 : txnEvent2; | ||
const [oldTraceTransactionEvent, oldTraceTransactionTraceHeaders] = | ||
txnEvent1[0].transaction === 'old-trace' ? txnEvent1 : txnEvent2; | ||
|
||
const newTraceTransactionTraceContext = newTraceTransactionEvent.contexts?.trace; | ||
expect(newTraceTransactionTraceContext).toMatchObject({ | ||
op: 'ui.interaction.click', | ||
trace_id: expect.stringMatching(/^[0-9a-f]{32}$/), | ||
span_id: expect.stringMatching(/^[0-9a-f]{16}$/), | ||
}); | ||
|
||
expect(newTraceTransactionTraceHeaders).toEqual({ | ||
environment: 'production', | ||
public_key: 'public', | ||
sample_rate: '1', | ||
sampled: 'true', | ||
trace_id: newTraceTransactionTraceContext?.trace_id, | ||
transaction: 'new-trace', | ||
}); | ||
|
||
const oldTraceTransactionEventTraceContext = oldTraceTransactionEvent.contexts?.trace; | ||
expect(oldTraceTransactionEventTraceContext).toMatchObject({ | ||
op: 'ui.interaction.click', | ||
trace_id: expect.stringMatching(/^[0-9a-f]{32}$/), | ||
span_id: expect.stringMatching(/^[0-9a-f]{16}$/), | ||
}); | ||
|
||
expect(oldTraceTransactionTraceHeaders).toEqual({ | ||
environment: 'production', | ||
public_key: 'public', | ||
sample_rate: '1', | ||
sampled: 'true', | ||
trace_id: oldTraceTransactionTraceHeaders?.trace_id, | ||
// transaction: 'old-trace', <-- this is not in the DSC because the DSC is continued from the pageload transaction | ||
// which does not have a `transaction` field because its source is URL. | ||
}); | ||
|
||
expect(oldTraceTransactionEventTraceContext?.trace_id).toEqual(pageloadTraceContext?.trace_id); | ||
expect(newTraceTransactionTraceContext?.trace_id).not.toEqual(pageloadTraceContext?.trace_id); | ||
}, | ||
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
dev-packages/e2e-tests/test-applications/nextjs-15/app/ppr-error/[param]/page.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import * as Sentry from '@sentry/nextjs'; | ||
|
||
export default async function Page({ | ||
searchParams, | ||
}: { | ||
searchParams: { id?: string }; | ||
}) { | ||
try { | ||
console.log(searchParams.id); // Accessing a field on searchParams will throw the PPR error | ||
} catch (e) { | ||
Sentry.captureException(e); // This error should not be reported | ||
await new Promise(resolve => setTimeout(resolve, 1000)); // Wait for any async event processors to run | ||
await Sentry.flush(); | ||
throw e; | ||
} | ||
|
||
return <div>This server component will throw a PPR error that we do not want to catch.</div>; | ||
} |
6 changes: 5 additions & 1 deletion
6
dev-packages/e2e-tests/test-applications/nextjs-15/next.config.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not 100% sure, should we use the cjs or esm example here? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess CJS is probably fine, thinking about this... so disregard this comment I guess!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I asked myself the same thing 😅 I guess CJS is still used more frequently so... 🤷
Basically I wanted to add a small snippet to show the use case but not copy the entire PR description.