Skip to main content
Version: Next

SochDB v0.3.1 Release Notes

Release Date: January 4, 2026
Type: Minor Release
Status: Stable


๐ŸŽฏ Overviewโ€‹

SochDB v0.3.1 introduces optional, privacy-respecting usage analytics to help improve the database while maintaining user privacy. This release adds anonymous usage information collection with full transparency and user control.


โœจ What's Newโ€‹

Anonymous Usage Analyticsโ€‹

Optional telemetry to understand how SochDB is used in production, with strict privacy guarantees:

Events Trackedโ€‹

  1. database_opened โ€” Sent once when database is initialized

    • Properties: mode (embedded/server), has_custom_path (boolean)
    • Helps understand deployment patterns
  2. error โ€” Static error tracking for reliability improvements

    • Properties: error_type (category), location (code path)
    • No dynamic error messages โ€” only static identifiers
    • Example: "query_error" at "sql.execute" (no SQL queries, no user data)

Privacy Guaranteesโ€‹

โœ… Anonymous ID โ€” Stable SHA-256 hash of machine info (hostname, OS, arch)
โœ… No PII โ€” No usernames, file paths, query content, or error messages
โœ… Opt-out โ€” Set SOCHDB_DISABLE_ANALYTICS=true to disable completely
โœ… Optional Dependencies โ€” Graceful degradation if analytics libraries unavailable
โœ… Open Source โ€” All analytics code visible in repository

SDK Implementationโ€‹

Python SDK:

from sochdb import Database
from sochdb.analytics import capture_error

# Analytics automatically tracks database_opened
db = Database.open("./mydb")

# Track errors (static info only)
try:
db.execute(query)
except Exception:
capture_error("query_error", "sql.execute")

Installation with analytics:

pip install sochdb[analytics]  # Includes posthog
# or
pip install sochdb # Works without analytics

JavaScript SDK:

import { Database, captureError } from '@sochdb/sochdb';

// Analytics automatically tracks database_opened
const db = await Database.open('./mydb');

// Track errors (static info only)
try {
await db.execute(query);
} catch (err) {
await captureError('query_error', 'sql.execute');
}

Installation:

npm install @sochdb/sochdb
# posthog-node is optionalDependency (works without it)

Rust SDK:

use sochdb_core::analytics;

// Enable analytics feature in Cargo.toml
// sochdb-core = { version = "0.4.0", features = ["analytics"] }

let db = Database::open("./mydb")?;
analytics::analytics().track_database_open("./mydb", "embedded");

// Track errors
if let Err(_) = db.query(sql) {
analytics::capture_error("query_error", "query::execute");
}

Disabling Analyticsโ€‹

Set environment variable before running your application:

export SOCHDB_DISABLE_ANALYTICS=true
python your_app.py

# Or inline
SOCHDB_DISABLE_ANALYTICS=true ./your_binary

No events will be sent when disabled.


๐Ÿ”ง Improvementsโ€‹

Documentation Updatesโ€‹

  • Updated all version references from 0.2.9 to 0.3.1
  • Updated installation guides for Python, JavaScript, Rust, Go
  • Consistent versioning across all SDK documentation
  • Updated benchmark metadata in README

Build Systemโ€‹

  • Rust: Analytics feature enabled by default in client crates
    • sochdb, sochdb-python, sochdb-grpc include analytics
    • Added json feature to ureq for PostHog API calls
  • JavaScript: Fixed ESM import paths for analytics module
  • Python: Analytics as optional dependency group

๐Ÿ› Bug Fixesโ€‹

  • JavaScript: Fixed ESM import requiring .js extension in database.ts
  • Rust: Fixed analytics payload structure for PostHog API
  • Tests: Updated version expectations in JavaScript tests (0.3.0 โ†’ 0.3.1)

๐Ÿ“ฆ Installationโ€‹

Pythonโ€‹

pip install sochdb==0.3.1

# With analytics support
pip install sochdb[analytics]==0.3.1

JavaScript / Node.jsโ€‹

npm install @sochdb/sochdb@0.3.1

Rustโ€‹

[dependencies]
sochdb = "0.4.0"

# Or with analytics
sochdb-core = { version = "0.4.0", features = ["analytics"] }

Goโ€‹

go get github.com/sochdb/sochdb-go@v0.3.1

๐Ÿงช Testingโ€‹

All SDKs fully tested:

  • โœ… Python: Analytics integration verified
  • โœ… JavaScript: 74 tests passing
  • โœ… Rust: 362 tests passing (1 flaky test in parallel HNSW)

Test analytics locally:

# Python
python test_error_tracking.py

# JavaScript
node test_error_tracking.js

# Rust
cd test_analytics_rust && cargo run

๐Ÿ” Privacy & Securityโ€‹

What Data is Collected?โ€‹

When database_opened event fires:

{
"event": "database_opened",
"distinct_id": "0c628825688f52aa",
"properties": {
"mode": "embedded",
"has_custom_path": true,
"sdk": "python",
"sdk_version": "0.4.0",
"os": "Darwin",
"arch": "x86_64"
}
}

When error event fires:

{
"event": "error",
"distinct_id": "0c628825688f52aa",
"properties": {
"error_type": "connection_error",
"location": "database.open",
"sdk": "python",
"sdk_version": "0.4.0",
"os": "Darwin",
"arch": "x86_64"
}
}

What is NOT collected:

  • โŒ File paths
  • โŒ Database names
  • โŒ Query content
  • โŒ Error messages
  • โŒ User data
  • โŒ IP addresses
  • โŒ Hostnames (hashed only)

Anonymous ID Generationโ€‹

# Stable hash of machine-specific info
machine_info = [hostname, os, arch, uid]
anonymous_id = sha256("|".join(machine_info))[:16]
# Example: "0c628825688f52aa"

Same machine always gets same ID, but ID cannot be reversed to identify the machine.


๐Ÿ”„ Migration Guideโ€‹

From v0.3.0 to v0.3.1โ€‹

No breaking changes. This is a backward-compatible minor release.

Optional: Install analytics dependencies if you want to contribute usage data:

# Python
pip install posthog>=3.0.0

# JavaScript (already in optionalDependencies)
npm install posthog-node

# Rust (already enabled via features)
# No action needed

Opt-out: Add to your deployment configuration:

# .env file
SOCHDB_DISABLE_ANALYTICS=true

# Docker
ENV SOCHDB_DISABLE_ANALYTICS=true

# Kubernetes
env:
- name: SOCHDB_DISABLE_ANALYTICS
value: "true"

๐Ÿ“š Resourcesโ€‹


๐Ÿ™ Acknowledgmentsโ€‹

Thank you to the community for feedback on privacy-preserving telemetry design. Analytics helps us prioritize bug fixes and feature development while respecting user privacy.


๐Ÿ“… What's Next (v0.3.2)โ€‹

  • Distributed query execution
  • Enhanced SQL JOIN performance
  • Compression improvements for large datasets
  • More granular analytics controls

Full Changelog: https://github.com/sochdb/sochdb/compare/v0.3.0...v0.3.1


Released: January 4, 2026
License: Apache 2.0
Maintainer: @sushanthpy