Skip to content

Conversation

@FunamaYukina
Copy link
Member

@FunamaYukina FunamaYukina commented Mar 25, 2025

Issue

Recently in liam-app, sourcemap was not being sent to sentry.

ss 2974

I thought I needed sourcemap.assets as per the warning, but I was able to send sourcemap without setting assets in docs, so I changed the settings as in docs. (I removed the assets setting)

docs sentry setting is here:

export default withSentryConfig(withMDX(config), {
// For all available options, see:
// https://github.com/getsentry/sentry-webpack-plugin#options
org: process.env.SENTRY_ORG,
project: process.env.SENTRY_PROJECT,
// Only print logs for uploading source maps in CI
silent: !process.env.CI,
// For all available options, see:
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/
// Upload a larger set of source maps for prettier stack traces (increases build time)
widenClientFileUpload: true,
// Automatically annotate React components to show their full name in breadcrumbs and session replay
reactComponentAnnotation: {
enabled: true,
},
// Uncomment to route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers.
// This can increase your server load as well as your hosting bill.
// Note: Check that the configured route will not match with your Next.js middleware, otherwise reporting of client-
// side errors will fail.
// tunnelRoute: "/monitoring",
// Hides source maps from generated client bundles
hideSourceMaps: true,
// Automatically tree-shake Sentry logger statements to reduce bundle size
disableLogger: true,
// Enables automatic instrumentation of Vercel Cron Monitors. (Does not yet work with App Router route handlers.)
// See the following for more information:
// https://docs.sentry.io/product/crons/
// https://vercel.com/docs/cron-jobs
automaticVercelMonitors: true,
})

I confirmed that the sourcemap was successfully sent.✅
vercel: https://vercel.com/route-06-core/liam-app/Hhoy2UgTWSZNk8ZXBzTwLAwwUqn7
sentry: https://route06cojp.sentry.io/settings/projects/liam-erd-web/source-maps/

ss 2975
ss 2976

Why is this change needed?

What would you like reviewers to focus on?

Testing Verification

What was done

🤖 Generated by PR Agent at fc06bcd

  • Removed incorrect sourcemaps settings from next.config.ts.
  • Ensured compatibility with Sentry documentation for sourcemap handling.
  • Simplified configuration by relying on hideSourceMaps for source map management.

Detailed Changes

Relevant files
Bug fix
next.config.ts
Removed incorrect sourcemap settings in `next.config.ts` 

frontend/apps/app/next.config.ts

  • Removed the sourcemaps configuration block.
  • Retained hideSourceMaps for managing source map visibility.
  • Simplified the configuration for better alignment with Sentry
    documentation.
  • +0/-6     

    Additional Notes


    Need help?
  • Type /help how to ... in the comments thread for any questions about Qodo Merge usage.
  • Check out the documentation for more information.
  • @changeset-bot
    Copy link

    changeset-bot bot commented Mar 25, 2025

    ⚠️ No Changeset found

    Latest commit: fc06bcd

    Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

    This PR includes no changesets

    When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

    Click here to learn what changesets are, and how to add one.

    Click here if you're a maintainer who wants to add a changeset to this PR

    @vercel
    Copy link

    vercel bot commented Mar 25, 2025

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

    Name Status Preview Comments Updated (UTC)
    liam-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 25, 2025 5:25am
    liam-erd-sample ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 25, 2025 5:25am
    4 Skipped Deployments
    Name Status Preview Comments Updated (UTC)
    liam-docs ⬜️ Ignored (Inspect) Visit Preview Mar 25, 2025 5:25am
    test-liam-app ⬜️ Ignored (Inspect) Mar 25, 2025 5:25am
    test-liam-docs ⬜️ Ignored (Inspect) Mar 25, 2025 5:25am
    test-liam-erd-sample ⬜️ Ignored (Inspect) Mar 25, 2025 5:25am

    @supabase
    Copy link

    supabase bot commented Mar 25, 2025

    Updates to Preview Branch (update-app-next-config) ↗︎

    Deployments Status Updated
    Database Tue, 25 Mar 2025 05:20:46 UTC
    Services Tue, 25 Mar 2025 05:20:46 UTC
    APIs Tue, 25 Mar 2025 05:20:46 UTC

    Tasks are run on every commit but only new migration files are pushed.
    Close and reopen this PR if you want to apply changes from existing seed or migration files.

    Tasks Status Updated
    Configurations Tue, 25 Mar 2025 05:20:50 UTC
    Migrations Tue, 25 Mar 2025 05:20:51 UTC
    Seeding Tue, 25 Mar 2025 05:20:51 UTC
    Edge Functions Tue, 25 Mar 2025 05:20:51 UTC

    View logs for this Workflow Run ↗︎.
    Learn more about Supabase for Git ↗︎.

    @FunamaYukina FunamaYukina force-pushed the update-app-next-config branch from 6df9eb7 to fc06bcd Compare March 25, 2025 05:20
    @FunamaYukina FunamaYukina changed the title delete sourcemap setting 🔧 Match next-config settings with docs so that sourcemap can be sent. Mar 25, 2025
    @FunamaYukina FunamaYukina marked this pull request as ready for review March 25, 2025 05:28
    @FunamaYukina FunamaYukina requested a review from a team as a code owner March 25, 2025 05:28
    @FunamaYukina FunamaYukina requested review from MH4GF, NoritakaIkeda, hoshinotsuyoshi and junkisai and removed request for a team March 25, 2025 05:28
    @qodo-free-for-open-source-projects
    Copy link
    Contributor

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ No major issues detected

    @qodo-free-for-open-source-projects
    Copy link
    Contributor

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Impact
    Possible issue
    Fix sourcemap configuration

    The hideSourceMaps: true setting conflicts with the purpose of this PR which is
    to enable sourcemap sending to Sentry. When this flag is true, source maps won't
    be accessible to Sentry.

    frontend/apps/app/next.config.ts [102]

    -hideSourceMaps: true,
    +hideSourceMaps: false,
    • Apply this suggestion
    Suggestion importance[1-10]: 9

    __

    Why: The suggestion correctly identifies a critical configuration issue. The PR removes the explicit sourcemaps configuration block but leaves hideSourceMaps: true, which would prevent Sentry from accessing sourcemaps. Setting it to false is essential for proper error tracking functionality.

    High
    • More

    Copy link
    Contributor

    @MH4GF MH4GF left a comment

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    Thanks!!

    @MH4GF MH4GF added this pull request to the merge queue Mar 25, 2025
    Merged via the queue into main with commit 0bc019a Mar 25, 2025
    20 checks passed
    @MH4GF MH4GF deleted the update-app-next-config branch March 25, 2025 05:45
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Projects

    None yet

    Development

    Successfully merging this pull request may close these issues.

    3 participants