apppulse-browser
v0.2.2
Published
Lightweight frontend observability SDK for runtime error tracking and browser telemetry.
Maintainers
Readme
AppPulse Browser SDK
Lightweight frontend observability SDK for modern web applications.
Automatically track:
- Runtime JavaScript crashes
- Unhandled promise rejections
- Custom telemetry events
Built for scalable and resilient browser telemetry pipelines.
⚠️ AppPulse Browser SDK is currently in active early-stage development as part of the broader AppPulse observability platform.
Features
Automatic Monitoring
- Runtime JavaScript error tracking
- Unhandled promise rejection tracking
- Session tracking
- Device & browser metadata collection
Custom Telemetry
- Manual custom event tracking
- User identification support
- Metadata attachment
- Environment & release tagging
Reliability Pipeline
- In-memory event queue
- Automatic batch transport
- Retry persistence using sessionStorage
- Retry recovery on reload
- Priority-based event delivery
- Critical event instant transport
- Retry attempt limiting
- Event deduplication
- Graceful SDK cleanup lifecycle
Architecture
- Lightweight SDK footprint
- Framework agnostic
- Modular transport layer
- Async-safe queue system
- Bounded memory protection
- Debug mode support
Installation
npm install apppulse-browseror use AppPulse CLI:
npx appulseQuick Start
1. Create AppPulse Instance
// src/lib/apppulse.js
import AppPulseBrowser from "apppulse-browser";
const tracker = new AppPulseBrowser({
apiKey: "YOUR_API_KEY",
endpoint: "https://YOUR_DOMAIN/api/logs",
environment: "development",
release: "1.0.0",
debug: true,
});
export default tracker;2. Initialize During App Startup
// main.jsx
import "./lib/apppulse";That’s it.
AppPulse automatically starts monitoring:
- Runtime crashes
- Unhandled promise rejections
No additional setup required.
Automatic Error Tracking
AppPulse automatically captures:
// runtime error
undefined.map();
// unhandled promise rejection
Promise.reject(new Error("API failed"));Custom Event Tracking
Track important application events and failures.
import tracker from "./lib/apppulse";
tracker.track("checkout_failed", {
orderId: "123",
reason: "payment_declined",
});User Identification
Attach user information to telemetry events.
tracker.identify({
userId: "USER_ID",
});SDK Cleanup
Destroy the SDK instance during application teardown if needed.
tracker.destroy();This cleans up:
- Event listeners
- Queue timers
- In-memory telemetry queues
Event Pipeline
AppPulse Browser SDK includes a resilient telemetry pipeline designed for frontend observability reliability.
Included Reliability Features
- Batched event transport
- Retry persistence
- Retry recovery
- Critical event prioritization
- Event deduplication
- Graceful shutdown persistence
Critical telemetry bypasses batching and is transported immediately to improve crash reporting reliability.
Event Payload Includes
Every event automatically includes:
- Event ID
- Retry count
- Session ID
- Timestamp
- Current URL
- User agent
- Device information
- Environment
- Release version
- Metadata
- Schema version
Configuration
| Option | Description |
| ------------- | --------------------------------------------------------- |
| apiKey | Project API key |
| endpoint | AppPulse ingestion endpoint |
| environment | Environment name (production, staging, development) |
| release | Application release version |
| debug | Enables SDK debug logs |
Planned Features
Upcoming observability capabilities planned for AppPulse:
- Network/API monitoring
- Performance monitoring
- Web Vitals tracking
- Session replay
- Console tracking
- Source map support
- Incident alerting
- Distributed tracing
- Dashboard & analytics UI
Browser Support
Supports modern browsers with:
- Fetch API
- Promise support
- ES Modules
Backend Status
The AppPulse Browser SDK currently requires a compatible AppPulse ingestion backend.
The hosted AppPulse backend platform is currently under active development.
Version
Current version: 0.2.0
License
UNLICENSED
Author
Built by BuildsByCS
