1.0.11 • Published 7 months ago

@debugg-ai/nextjs v1.0.11

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

DebuggAI SDK wrapper for Next.js

npm version npm dm npm dt

See the Official DebuggAI Next.js SDK Docs to get started.

Compatibility

Currently, the minimum supported version of Next.js is 13.2.0.

Installation

To get started installing the SDK, use the DebuggAI Next.js Wizard by running the following command in your terminal or read the Getting Started Docs:

npx @debugg-ai/wizard@latest -i nextjs

The wizard will prompt you to log in to DebuggAI. After the wizard setup is completed, the SDK will automatically capture unhandled errors, and monitor performance.

Custom Usage

To set context information or to send manual events, you can use @debugg-ai/nextjs as follows:

import * as DebuggAI from '@debugg-ai/nextjs';

// Set user information, as well as tags and further extras
DebuggAI.setTag('user_mode', 'admin');
DebuggAI.setUser({ id: '4711' });
DebuggAI.setContext('application_area', { location: 'checkout' });

// Add a breadcrumb for future events
DebuggAI.addBreadcrumb({
  message: '"Add to cart" clicked',
  // ...
});

// Capture exceptions or messages
DebuggAI.captureException(new Error('Oh no.'));
DebuggAI.captureMessage('Hello, world!');

Links