Skip to content

Conversation

@lforst
Copy link
Contributor

@lforst lforst commented Apr 9, 2025

We changed what file we want users to create for client instrumentation because Next.js added the instrumentation-client.ts hook as a native mechanism.

I thought of doing versioned docs but that is a huge pain in the butt for all of the places we have the client config. The SDK logs a warning to migrate you from sentry.client.config.ts to instrumentation-client.ts in any case.

@vercel
Copy link

vercel bot commented Apr 9, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sentry-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 9, 2025 0:00am
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
changelog ⬜️ Ignored (Inspect) Visit Preview Apr 9, 2025 0:00am
develop-docs ⬜️ Ignored (Inspect) Visit Preview Apr 9, 2025 0:00am

@codecov
Copy link

codecov bot commented Apr 9, 2025

Bundle Report

Changes will decrease total bundle size by 15 bytes (-0.0%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
sentry-docs-server-cjs 11.13MB -9 bytes (-0.0%) ⬇️
sentry-docs-client-array-push 9.47MB -6 bytes (-0.0%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: sentry-docs-client-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
static/chunks/pages/_app-*.js -3 bytes 868.7kB -0.0%
static/chunks/8165-*.js -3 bytes 410.1kB -0.0%
server/middleware-*.js 5.55kB 6.55kB 555.3% ⚠️
server/middleware-*.js -5.55kB 1.0kB -84.74%
static/rmmjBYONpq65h9AJYWFCd/_buildManifest.js (New) 578 bytes 578 bytes 100.0% 🚀
static/rmmjBYONpq65h9AJYWFCd/_ssgManifest.js (New) 77 bytes 77 bytes 100.0% 🚀
static/2ggWBO4-*.js (Deleted) -77 bytes 0 bytes -100.0% 🗑️
static/2ggWBO4-*.js (Deleted) -578 bytes 0 bytes -100.0% 🗑️
view changes for bundle: sentry-docs-server-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
1729.js -3 bytes 1.75MB -0.0%
../instrumentation.js -3 bytes 1.08MB -0.0%
9523.js -3 bytes 1.05MB -0.0%

@mydea
Copy link
Member

mydea commented Apr 9, 2025

Just to be clear/sure, this also works for older next.js versions I suppose?

@lforst
Copy link
Contributor Author

lforst commented Apr 9, 2025

Just to be clear/sure, this also works for older next.js versions I suppose?

Yes, the SDK "backfills" the feature for older nextjs versions by creating a webpack entrypoint for "client-instrumentation.ts". That is our migration path.

@lforst lforst merged commit 959d158 into master Apr 9, 2025
11 checks passed
@lforst lforst deleted the lforst-instrumentation-client branch April 9, 2025 12:16
bitsandfoxes pushed a commit that referenced this pull request Apr 24, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Apr 25, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants