Skip to content

Conversation

matux
Copy link
Contributor

@matux matux commented Aug 4, 2025

Description of the change

This PR introduces a fully fledged Rollbar example in Next. This is what I had been using to test the SDK. I cleaned it up, and added a README (base written by Claude, then reviewed and modified).

This is a comprehensive Next.js example application that demonstrates Rollbar error monitoring integration. It provides a fully functional demo with interactive error testing capabilities and detailed setup documentation.

Key changes:

  • Creates a complete Next.js application with Rollbar integration using @rollbar/react
  • Implements various error testing scenarios (manual errors, uncaught errors, promise rejections, component errors)
  • Includes comprehensive styling and responsive design for the demo interface
rec.mp4

Related issues

SDK-518/make-sure-all-sdk-examples-work-properly

@matux matux requested a review from Copilot August 4, 2025 22:08
@matux matux self-assigned this Aug 4, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a comprehensive Next.js example application that demonstrates Rollbar error monitoring integration. It provides a fully functional demo with interactive error testing capabilities and detailed setup documentation.

Key changes:

  • Creates a complete Next.js application with Rollbar integration using @rollbar/react
  • Implements various error testing scenarios (manual errors, uncaught errors, promise rejections, component errors)
  • Includes comprehensive styling and responsive design for the demo interface

Reviewed Changes

Copilot reviewed 8 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
examples/next/package.json Defines project dependencies including @rollbar/react, Next.js, and React with local Rollbar package reference
examples/next/pages/index.js Main application component with Rollbar Provider setup and interactive error testing buttons
examples/next/pages/posts/first-post.js Simple example page demonstrating Next.js routing
examples/next/styles/Home.module.css Comprehensive CSS module with styling for the demo interface and error testing buttons
examples/next/styles/global.css Global CSS reset and base styles
examples/next/next.config.js Next.js configuration with webpack customization for Rollbar integration
examples/next/README.md Detailed documentation covering setup, usage, and integration points
examples/next/.gitignore Git ignore rules for Next.js build artifacts and local files
Comments suppressed due to low confidence (1)

examples/next/pages/index.js:66

  • [nitpick] The variable name 'nullObject' is misleading since it's intentionally set to null to trigger an error. Consider renaming it to 'nullValue' or 'intentionallyNull' to better reflect its purpose in the error testing context.
    const nullObject = null;

@matux matux enabled auto-merge (squash) August 5, 2025 18:23
@matux matux merged commit cc44b6e into master Aug 5, 2025
4 checks passed
@matux matux deleted the matux/next-js-example branch August 5, 2025 18:27
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