Skip to content

fix: add a stacktrace for monitoring#8301

Open
khendrikse wants to merge 1 commit into
mainfrom
kh/add-stacktrace-for-monitoring
Open

fix: add a stacktrace for monitoring#8301
khendrikse wants to merge 1 commit into
mainfrom
kh/add-stacktrace-for-monitoring

Conversation

@khendrikse

Copy link
Copy Markdown
Contributor

🎉 Thanks for submitting a pull request! 🎉

Summary

We are currently losing the stacktraces being sent, this should help fix this.


For us to review and ship your PR efficiently, please perform the following steps:

  • Open a bug/issue before writing your code 🧑‍💻. This ensures we can discuss the changes and get feedback from everyone that should be involved. If you`re fixing a typo or something that`s on fire 🔥 (e.g. incident related), you can skip this step.
  • Read the contribution guidelines 📖. This ensures your code follows our style guide and
    passes our tests.
  • Update or add tests (if any source code was changed or added) 🧪
  • Update or add documentation (if features were changed or added) 📝
  • Make sure the status checks below are successful ✅

A picture of a cute animal (not mandatory, but encouraged)

@khendrikse khendrikse requested review from a team as code owners June 12, 2026 13:07
@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e3ed0cd7-5d9b-4d85-a628-bd1cae759d28

📥 Commits

Reviewing files that changed from the base of the PR and between 392af83 and 86f08f6.

📒 Files selected for processing (1)
  • site/netlify/functions/error-reporting.ts
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • netlify/blueprints (manual)

📝 Walkthrough

Summary by CodeRabbit

Bug Fixes

  • Enhanced error reporting with improved error object reconstruction from CLI error data.
  • Implemented stack trace normalization, standardizing file paths and intelligently categorizing error frames for better error identification.
  • Refined error tracking system to more accurately identify project-related errors and provide improved debugging capabilities.

Walkthrough

The error-reporting Netlify function now rebuilds real Error objects from incoming CLI JSON fields (message, name, stack, cause) instead of notifying Bugsnag with plain objects. New helper functions normalize stacktrace frame file paths by stripping install-specific prefixes, converting path separators to forward slashes, and marking frames as in-project when they reference netlify-cli/. The Bugsnag notification callback applies frame normalization while maintaining existing validation and early-return behavior.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding stacktrace functionality to the error-reporting monitoring system.
Description check ✅ Passed The description is directly related to the changeset, explaining that stacktraces were being lost and the PR fixes this issue by implementing stacktrace support.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch kh/add-stacktrace-for-monitoring

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed due to a network error.


Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

Copy link
Copy Markdown

📊 Benchmark results

Comparing with 392af83

  • Dependency count: 1,127 (no change)
  • Package size: 379 MB (no change)
  • Number of ts-expect-error directives: 354 (no change)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants