Zero-Config Auto-Instrumentation

Monita SDK
Intelligent Logging

A powerful, TypeScript-first logging SDK with automatic error tracking, performance monitoring, and user interaction capture. Similar to Sentry and LogRocket, but with full control over your data.

Auto Error Tracking
Performance Monitoring
Network Tracking
User Interactions
Privacy-First
~50KBGzipped
<30sSetup Time
Zero ConfigRequired
Auto-Instrumentation

What Gets Captured Automatically

With zero configuration, the SDK automatically captures comprehensive telemetry data

Errors
ERROR
Uncaught exceptions, promise rejections
  • JavaScript errors
  • Promise rejections
  • Stack traces
  • Source maps
Performance
DEBUG/INFO/WARN
Page loads, resource timing, Core Web Vitals
  • Core Web Vitals
  • Resource timing
  • Navigation timing
  • Memory usage
Network
DEBUG/WARN/ERROR
Fetch/XHR requests with status and timing
  • HTTP requests
  • Response times
  • Status codes
  • Request/response size
Page Views
INFO
Navigation and SPA route changes
  • Page navigation
  • SPA routing
  • Referrer tracking
  • Session duration
Console
ERROR/WARN
console.error() and console.warn() calls
  • Console errors
  • Console warnings
  • Stack traces
  • Arguments capture
Interactions
DEBUG/TRACE
User clicks, scrolls (optional)
  • Click events
  • Scroll tracking
  • Form interactions
  • Element selectors
Interactive Demo

Try Monita Live

Experience auto-instrumentation in action. Trigger events and see real-time capture.

Send Test Log
Try sending logs to see them appear in real-time
Live Log Stream2 logs
Real-time log visualization
INFO
1:06:16 PM

Application started

{
  "version": "1.0.0",
  "environment": "demo"
}
WARN
1:09:16 PM

High memory usage detected

{
  "usage": "85%",
  "threshold": "80%"
}
Zero-Config Setup

Get Started in 30 Seconds

Install, initialize, and start capturing events automatically

1
Install the SDK
Terminal
npm install monita
Or:yarn add monitapnpm add monita
2
Initialize with Auto-Instrumentation
app.ts
import { Monita } from "monita";

// Initialize with auto-instrumentation
const logger = new Monita({
  apiKey: "your-api-key",
  projectId: "your-project-id",
  environment: "production",
  serviceName: "my-web-app",
});

// That's it! Auto-capture is already working:
// ✅ JavaScript errors are automatically captured
// ✅ Network requests are monitored
// ✅ Performance metrics are collected
// ✅ Page views are tracked
3
Optional Manual Logging
manual-logging.ts
// Manual logging (optional - auto-capture handles most cases)
logger.info("User started checkout");
logger.error("Payment failed", new Error("Card declined"));

// Enhanced logging with context
logger.setContext({
  userId: "12345",
  feature: "checkout",
  experimentId: "ab-test-v2",
});

// Capture exceptions with additional context
logger.captureException(new Error("Something broke"), {
  component: "PaymentForm",
  action: "submit",
});
What Happens Automatically
Events captured without any additional code

Error Tracking

Uncaught exceptions and promise rejections

Performance Monitoring

Core Web Vitals, page load times

Network Requests

Fetch/XHR monitoring with timing

Page Views

Navigation and SPA route changes

Bundle Impact
Lightweight and performant
~50KB
Gzipped
Minimal
CPU Impact
Advanced Capabilities

Beyond Basic Logging

Comprehensive observability with intelligent automation and privacy protection

IN DEVELOPMENT

API Reference

Complete API Documentation

Comprehensive reference for all methods, options, and configuration

Core Methods
Essential logging methods
logger.info(message, data?)logger.warn(message, data?)logger.error(message, error?)logger.debug(message, data?)
Exception Handling
Advanced error capture
captureException(error, context?)captureMessage(message, level, data?)addBreadcrumb(message, category?)
Context Management
Global and scoped context
setContext(context)clearContext()withContext(context, callback)
Performance
Performance monitoring methods
startTimer(name)endTimer(name)measureFunction(fn, name?)
Lifecycle
SDK lifecycle management
logger.flush()logger.close()logger.isEnabled()
Configuration
Runtime configuration
logger.setLogLevel(level)logger.enable() / logger.disable()logger.updateConfig(config)
Best Practices

Production-Ready Implementation

Follow these guidelines to maximize the value of auto-instrumentation

Recommended Practices

Trust auto-instrumentation

Let the SDK capture most events automatically - manual logging should be minimal

Set meaningful context

Use setContext() to add user ID, feature flags, and business context

Configure by environment

Use different log levels and capture settings for dev/staging/prod

Add breadcrumbs for complex flows

Use breadcrumbs to trace user journeys through multi-step processes

Monitor bundle size impact

The SDK is lightweight (~50KB) but monitor your bundle analyzer

Common Pitfalls

Don't over-log manually

Auto-capture handles most cases - excessive manual logging creates noise

Don't enable all features in production

User interactions and console messages can be very verbose

Don't ignore privacy settings

Review auto-sanitization settings and add custom filters if needed

Don't forget error boundaries

Add React/Vue error boundaries for comprehensive error capture

Don't block initialization

Initialize the SDK early but don't block app startup on SDK errors

Roadmap

What's Coming Next

Upcoming features and improvements to the Monita SDK

React Native Support
v2.2In Progress
Native crash reporting and performance monitoring for mobile apps
Expo Integration
v2.3Planned
Seamless integration with Expo managed workflow
Advanced Session Replay
v2.4Research
Visual session replay with privacy controls
Custom Dashboard Widgets
v2.5Planned
Build custom visualizations for your metrics
Slack/Teams Integrations
v2.6Planned
Real-time alerts and notifications
GraphQL Request Tracing
v2.7Research
Detailed GraphQL query and mutation tracking
Resources & Support

Learn More

Comprehensive documentation, examples, and community support

Full Documentation
Complete guides, tutorials, and API reference
Code Examples
Real-world examples and integration patterns
GitHub Repository
Open source SDK and community contributions
Changelog
Latest updates and new features
Support
Get help from our support team
Ready to Start?

Start Auto-Capturing in 30 Seconds

Join thousands of developers who trust Monita SDK for comprehensive auto-instrumentation

No credit card required
10,000 free events per month
Zero-config auto-instrumentation