Comments (10)
@dorin-flooz Thanks for pointing this out! I updated the docs so they are in line with v8.
I guess the warning won't go away if you import the files like in the snippet @HazAT suggested. You have to delete the server.config
and edge.config
files. The contents of the files need to be added to the register()
function like this:
export async function register() {
if (process.env.NEXT_RUNTIME === 'nodejs') {
Sentry.init({
dsn: env.DSN
tracesSampleRate: 1.0,
});
}
if (process.env.NEXT_RUNTIME === 'edge') {
Sentry.init({
dsn: env.DSN
tracesSampleRate: 1.0,
});
}
}
from sentry-javascript.
Hey, sorry about that - we are jumping on this as we speak.
in the meantime, to unblock you, can you create a file instrumentation.ts
and do this:
export async function register() {
if (process.env.NEXT_RUNTIME === 'nodejs') {
await import('./sentry.server.config');
}
if (process.env.NEXT_RUNTIME === 'edge') {
await import('./sentry.edge.config');
}
}
as outlined here
https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/#create-initialization-config-files
from sentry-javascript.
hey @HazAT / @s1gr1d, thanks for the quick reply! What about versioned docs - any plans to have that implemented?
We have postponed the upgrade to 8.0.0 due to the issues above, but if I understand correctly you have now overwritten https://docs.sentry.io/platforms/javascript/guides/nextjs to match the v8.0.0 API - in this case how would we access the v7.00-specific documentation until we upgrade?
from sentry-javascript.
@dorin-flooz we discussed this internally and probably going to work on them
but since this is a bit of a larger project it will take a while but keep an eye out.
Thanks for the feedback!
from sentry-javascript.
the doc concerning "telemetry" is still missing, no?
How to tackle To disable telemetry, set
options.telemetryto
false.
?
Thanks for the hints
from sentry-javascript.
Hello @kbsali, do you mean this section: https://docs.sentry.io/platforms/javascript/guides/astro/sourcemaps/#disabeling-telemetry-data-collection
from sentry-javascript.
@s1gr1d this is specific to Astro/vite apparently, we are running a nextjs project
from sentry-javascript.
@kbsali I am not 100% sure if we are talking about the same thing. You are right, it is currently not directly documented when the Next.js docs talk about extending the configuration. However, Astro and Next.js both use the vite-plugin and provide the same build options (you can find them here for vite and here for webpack). Is this what you were searching for? We can elaborate on this in the docs.
from sentry-javascript.
as far as I can tell
@sentry/nextjs
uses@sentry/webpack-plugin
@sentry/astro
uses@sentry/vite-plugin
I see options for webpack-plugin
but i'm not sure how to apply it in the context of @sentry/nextjs
from sentry-javascript.
Oh yes, Next.js is using webpack, but the options are the same. The options specifically for the webpack plugin are defined here. And the docs show you how to configure your build options (the link I posted in my previous comment).
I think, what you want to achieve is this in your next.config.ts
:
export default withSentryConfig(nextConfig, {
// your other options...
telemetry: false
});
Is this helping you? If yes, we will add this to the docs.
from sentry-javascript.
Related Issues (20)
- Add solidstart to release registry
- Add release registry target entry for solidstart to craft.yml
- Add solidstart SDK docs
- Add solidstart onboarding
- A drop in simultaneous requests per seconds with Bun when Sentry is active HOT 3
- Align `Span` interface with changes in Otel Span interface
- Could not find a declaration file for module `@sentry/profiling-node` HOT 5
- Sentry SDK sends events of type `session` twice to two different DSNs
- Add Nuxt SDK package boilerplate
- Inconsisten span origin naming
- SpyOn captureException no longer works in sentry/react 8 HOT 2
- V8 Integrations are broken HOT 9
- Code sign the Sentry lambda layer to use in code signed lambdas HOT 1
- Module not found: Can't resolve 'opentelemetry-instrumentation-fetch-node' HOT 3
- Local variables missing when exception originates in node_modules dependency HOT 4
- Renable http instrumentation test for node-express-esm-preload
- JavaScript heap out of memory HOT 6
- Feedback Modal: Missing Screenshot btn in production HOT 3
- Sentry.captureFeedback produces unviewable images in sentry.io
- Problems with `@sentry/astro` on Netlify HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sentry-javascript.