Quick Start
Get Apperio running in your application in under 5 minutes.
Prerequisites
https://loghive.vercel.app and create your first project to get an API key.Step 1: Install the SDK
Install the apperio package from npm:
npm install apperioOr use your preferred package manager:
yarn add apperio
# or
pnpm add apperioStep 2: Initialize Apperio
Import and initialize Apperio at the entry point of your application. You need your project ID and API key from the Apperio dashboard.
import Apperio from class="syntax-string">"apperio";
Apperio.init({
projectId: class="syntax-string">"YOUR_PROJECT_ID",
apiKey: class="syntax-string">"YOUR_API_KEY",
environment: class="syntax-string">"production",
autoCapture: {
errors: true,
performance: true,
network: true,
console: true,
},
});Info
YOUR_PROJECT_ID and YOUR_API_KEY with the values from your project settings page. You can find these under Project Settings > API Key.Step 3: Send Your First Log
Use the logging API to send events at any level. Apperio supports six log levels: trace, debug, info, warn, error, and fatal.
class="syntax-comment">// Simple info log
Apperio.info(class="syntax-string">"Application started successfully");
class="syntax-comment">// Log with structured data
Apperio.info(class="syntax-string">"User signed in", {
userId: class="syntax-string">"user_123",
method: class="syntax-string">"oauth",
provider: class="syntax-string">"github",
});
class="syntax-comment">// Log an error with context
try {
await fetchUserData();
} catch (err) {
Apperio.error(class="syntax-string">"Failed to fetch user data", {
error: err,
retryCount: class="syntax-number">3,
});
}Step 4: View in Dashboard
Open the Apperio dashboard at https://loghive.vercel.app and navigate to your project. You will see your logs appearing in real-time in the log stream view.
The dashboard provides multiple views for your data:
# Dashboard views available:
# - Log Stream: Real-time log viewer with filtering
# - Error Analysis: Grouped errors with stack traces
# - Performance: Web Vitals and response time charts
# - Activity: User sessions and interaction tracking
# - Alerts: Notification rules and alert historyStep 5: Enable Auto-Capture
With auto-capture enabled, Apperio automatically instruments your application to collect errors, performance data, and more without any additional code:
Apperio.init({
projectId: class="syntax-string">"YOUR_PROJECT_ID",
apiKey: class="syntax-string">"YOUR_API_KEY",
autoCapture: {
errors: true, class="syntax-comment">// Uncaught errors & unhandled rejections
performance: true, class="syntax-comment">// Core Web Vitals(LCP, FID, CLS)
network: true, class="syntax-comment">// XHR and Fetch request tracking
console: true, class="syntax-comment">// Console.log/warn/error capture
pageviews: true, class="syntax-comment">// Page navigation tracking
interactions: true, class="syntax-comment">// Click and form submission tracking
},
});
class="syntax-comment">// That's it! Apperio handles the rest automatically.What's Next
Now that you have Apperio running, explore these topics to get the most out of the platform:
# Recommended reading order:
# 1. SDK Configuration - Fine-tune capture settings
# 2. Data Sanitization - Configure PII protection
# 3. Error Tracking - Advanced error grouping
# 4. Alert Rules - Set up notifications
# 5. Team Management - Invite collaborators