All Integrations
DatabasesTigerOps SDK

SQLite Integration

Monitor embedded database file size, WAL metrics, and query performance from your application process. Get slow query capture, lock contention alerts, and AI root cause analysis without adding database infrastructure.

Setup

How It Works

01

Install the TigerOps SDK

Add the TigerOps SDK for your language (Python, Node.js, Go, or Rust) to your application. The SDK instruments your SQLite connection pool to collect query timing, WAL stats, and file metrics with zero schema changes.

02

Wrap Your SQLite Connection

Replace your direct SQLite connection with the TigerOps-instrumented wrapper. It intercepts query execution, collects EXPLAIN QUERY PLAN data for slow queries, and reads the PRAGMA stats after each connection open.

03

Configure WAL & File Alerts

Set thresholds for WAL file size, checkpoint frequency, database page count growth, and slow query duration. TigerOps sends metrics from your application process directly to the ingest endpoint.

04

Correlate with Application Traces

TigerOps links SQLite slow query events to the application request traces that triggered them. You can see exactly which API endpoint, background job, or user action caused a database performance regression.

Capabilities

What You Get Out of the Box

Database File Size Tracking

SQLite file size, page count, page size, freelist page count, and unused space ratio tracked over time. Alert when database growth rate will breach your storage budget before it happens.

WAL Mode Metrics

WAL file size, WAL frame count, checkpoint frequency, checkpoint duration, and write-ahead log overflow detection for databases running in WAL journal mode.

Query Performance Profiling

Per-query execution time histograms, slow query capture with EXPLAIN QUERY PLAN output, full table scan detection, and missing index suggestions based on actual query patterns.

Connection & Lock Metrics

Busy timeout hit rates, SQLITE_BUSY error counts, lock contention duration, and concurrent reader/writer counts for databases serving multi-threaded or multi-process workloads.

Schema Change Tracking

Automatic detection of schema migrations via the schema_version PRAGMA. TigerOps records migration timestamps and correlates performance changes with schema evolution over time.

AI Slow Query Attribution

When query latency increases, TigerOps AI identifies whether the root cause is a missing index, WAL checkpoint stall, cache eviction pressure, or a new query pattern introduced by a recent deployment.

Configuration

TigerOps SQLite SDK Integration

Instrument your SQLite database in Node.js or Python with the TigerOps SDK in under 5 minutes.

sqlite-instrumentation.js
# Install the TigerOps SQLite SDK
npm install @tigerops/sqlite-sdk better-sqlite3

// sqlite-instrumentation.js
import Database from 'better-sqlite3'
import { instrument } from '@tigerops/sqlite-sdk'

// Wrap your existing SQLite connection
const rawDb = new Database('./data/app.db', { wal: true })

const db = instrument(rawDb, {
  apiKey: process.env.TIGEROPS_API_KEY,
  databaseName: 'app-production',

  // Slow query threshold for EXPLAIN capture
  slowQueryThresholdMs: 50,

  // WAL metrics polling interval
  walPollIntervalMs: 10000,

  // File size and page metrics
  fileMetrics: {
    enabled: true,
    pollIntervalMs: 30000,
  },

  // Alert thresholds (sent as metric annotations)
  alerts: {
    walFileSizeMb: 100,
    busyTimeoutHitsPerMinute: 10,
    databaseSizeGb: 5,
    slowQueryCaptureDurationMs: 200,
  },
})

// Use db exactly as before — all monitoring is transparent
const rows = db.prepare('SELECT * FROM orders WHERE status = ?').all('pending')
FAQ

Common Questions

Does TigerOps work with SQLite in serverless environments like Cloudflare Workers?

Yes. TigerOps provides a lightweight edge-compatible SDK for Cloudflare Workers and other edge runtimes. Metrics are buffered in memory and flushed asynchronously using the Workers waitUntil API so they never impact request latency.

Can TigerOps monitor multiple SQLite databases in the same process?

Yes. You can instrument multiple SQLite connections independently, each with a unique database name label. TigerOps aggregates metrics per database and provides per-file dashboards alongside a combined application-level view.

How does TigerOps capture WAL metrics without modifying SQLite?

TigerOps reads WAL metrics via the PRAGMA wal_checkpoint and PRAGMA page_count commands on a configurable interval. For WAL hook-based real-time metrics, the SDK registers a sqlite3_wal_hook callback in supported runtimes (C, Go, Rust).

Does the TigerOps SQLite SDK impact write performance?

The SDK overhead is under 1 microsecond per query for metric collection. Slow query capture (EXPLAIN QUERY PLAN) is only triggered for queries exceeding your configured threshold, defaulting to 100ms, so routine fast queries have no additional overhead.

Can I use TigerOps with libSQL, the SQLite-compatible fork used by Turso?

Yes. TigerOps supports both the standard SQLite C library and libSQL. The Node.js SDK wraps @libsql/client automatically when detected. You can monitor local file-mode libSQL databases and remote Turso databases from the same SDK integration.

Get Started

Stop Flying Blind with Your Embedded SQLite Databases

WAL health monitoring, slow query capture, and lock contention alerts. Instrument in 5 minutes.