Skip to content

SDK Overview ​

Nadi provides official SDKs for multiple platforms, making it easy to integrate error monitoring into your applications.

Available SDKs ​

SDKPackageRequirementsStatus
Laravelnadi-pro/nadi-laravelPHP 8.1+, Laravel 9+Stable
PHPnadi-pro/nadi-phpPHP 8.1+Stable
WordPressnadi-pro/nadi-wordpressPHP 8.1+, WP 5.0+Stable
JavaScript@nadi-pro/browserModern browsersStable
CakePHPnadi-pro/nadi-cakephpPHP 8.1+, CakePHP 4.5+/5.xStable
CodeIgniternadi-pro/nadi-codeigniterPHP 8.1+, CodeIgniter 4.3+Stable
Yii 3nadi-pro/nadi-yiiPHP 8.1+, Yii 3Stable
Yii 2nadi-pro/nadi-yii2PHP 8.1+, Yii 2.0.45+Stable
Drupalnadi-pro/nadi-drupalPHP 8.1+, Drupal 10.1+/11Stable

Choosing an SDK ​

Laravel Applications ​

Use the Laravel SDK for Laravel applications. It provides:

  • Automatic exception handling integration
  • Laravel-specific context (routes, middleware, queues)
  • Artisan commands for setup and testing
  • Blade error pages integration
  • Queue job monitoring
bash
composer require nadi-pro/nadi-laravel
php artisan nadi:install

Laravel SDK Documentation →

PHP Applications ​

Use the PHP SDK for any PHP application:

  • Framework-agnostic design
  • Multiple transporter options (file, HTTP)
  • Flexible sampling strategies
  • PSR-3 logger integration
bash
composer require nadi-pro/nadi-php

PHP SDK Documentation →

WordPress Sites ​

Use the WordPress Plugin for WordPress sites:

  • One-click installation
  • Admin UI for configuration
  • WooCommerce integration Coming Soon
  • WordPress-specific context

WordPress SDK Documentation →

Browser Applications ​

Use the JavaScript SDK for browser applications:

  • Automatic error capturing
  • Web Vitals monitoring
  • Breadcrumb tracking
  • Session replay Coming Soon
  • Framework integrations (React, Vue, Angular, Next.js) Coming Soon
bash
npm install @nadi-pro/browser

JavaScript SDK Documentation →

CakePHP Applications ​

Use the CakePHP SDK for CakePHP applications:

  • Plugin-based integration
  • Automatic exception capturing
  • CakePHP-specific context (controllers, actions)
  • Cake console commands for setup and testing
bash
composer require nadi-pro/nadi-cakephp
cake nadi:install

CakePHP SDK Documentation →

CodeIgniter Applications ​

Use the CodeIgniter SDK for CodeIgniter 4 applications:

  • Service and filter-based integration
  • Automatic exception capturing
  • CodeIgniter-specific context (controllers, methods)
  • Spark commands for setup and testing
bash
composer require nadi-pro/nadi-codeigniter
php spark nadi:install

CodeIgniter SDK Documentation →

Yii 3 Applications ​

Use the Yii 3 SDK for Yii 3 applications:

  • DI container integration
  • Middleware-based exception capturing
  • OpenTelemetry support
  • Yii-specific context
bash
composer require nadi-pro/nadi-yii

Yii 3 SDK Documentation →

Yii 2 Applications ​

Use the Yii 2 SDK for Yii 2 applications:

  • Component-based integration
  • Bootstrap integration for automatic setup
  • Yii 2-specific context (controllers, actions)
  • Console application support
bash
composer require nadi-pro/nadi-yii2

Yii 2 SDK Documentation →

Drupal Sites ​

Use the Drupal SDK for Drupal sites:

  • Module-based installation
  • Admin UI for configuration
  • Drupal-specific context (routes, services)
  • Drush commands for setup and testing
bash
composer require nadi-pro/nadi-drupal
drush en nadi

Drupal SDK Documentation →

Core Concepts ​

All Nadi SDKs share common concepts:

Events ​

Events are the primary data structure in Nadi. Types include:

  • Exceptions - Captured errors and exceptions
  • Messages - Manual log messages
  • Breadcrumbs - User actions and navigation
  • Performance - Web Vitals and timing data

Context ​

Context enriches events with additional information:

  • User - Current user details
  • Tags - Key-value pairs for filtering
  • Extra - Additional arbitrary data
  • Request - HTTP request details

Sampling ​

Sampling controls what percentage of events are captured:

  • Fixed Rate - Capture X% of all events
  • Dynamic Rate - Adjust based on load
  • Interval - Capture at time intervals
  • Peak Load - Increase during high traffic

Transporters ​

Transporters determine how events are sent:

  • File - Write to local log files (recommended)
  • HTTP - Send directly to Nadi API

Recommended Setup

Use the file transporter with Shipper for best reliability. This approach handles network issues gracefully and doesn't block your application.

SDK Architecture ​

Next Steps ​

Choose the SDK for your platform:

Released under the MIT License.