Documentation
Guides and references for getting the most out of Sophonz.
Guides
Getting Started
Introduction
Sophonz starts instrumentation in the browser and the mobile app and carries the same trace through to your backend, on OpenTelemetry.
Quick Start
Install the SDK and start collecting telemetry in under five minutes.
Connect an agent with MCP
Connect a coding agent such as Claude Code to the Sophonz MCP server and it creates the project and app, installs the SDK, and checks that data is arriving.
Production
Frontend SDKs
Web
Installation
How to install the Sophonz Browser SDK in your web frontend project via CDN or NPM.
Configuration
Full reference for Sophonz Browser SDK initialization options, and the remote configuration that turns instrumentation on and off from the server.
Instrumentation
What each of the Browser SDK's fourteen instrumentations captures, the spans it produces, the attributes Web Vitals emits, and how to turn each one on or off.
API Reference
Complete reference for every public API the Sophonz Browser SDK provides.
Sensitive Data Handling
URL redaction is applied by default; attribute redaction is opt-in. What the SDK strips from URLs out of the box, how to extend it with sanitizeUrl, and how to redact attribute values with attributeScrubbers.
WebView Integration
How to integrate the Sophonz Browser SDK with a mobile native app's WebView so web screens continue the session the native SDK already started.
Source Map Upload
Upload a build's source maps to Sophonz per web version, so production stack traces resolve to original files and line numbers.
Examples
A single HTML page that shows what the Browser SDK actually sends, straight from the browser.
Supported Platforms
Browser, WebView, framework, and package manager requirements supported by Sophonz Browser SDK.
Next.js
Next.js
The Sophonz Next.js SDK gives App Router apps one config for browser and server monitoring — SophonzProvider on the client, register() on the server, sharing a single trace.
Installation
Install @sophonz/nextjs, wire register() into instrumentation.ts, and mount SophonzProvider in the App Router root layout.
Configuration
Full reference for @sophonz/nextjs configuration — the shared SophonzNextConfig options, environment variables, the defaults it sets, and reaching the underlying browser and Node.js SDK options.
Examples
Complete examples of @sophonz/nextjs in an App Router project — minimal setup, adding attributes in Route Handlers and Server Actions, and database query tracing.
Android
Android SDK
How the OpenTelemetry-based Android SDK is put together, what it collects, and the order to read these pages in.
Installation
Applying the Gradle plugin, authenticating to the package repository, and starting the Android SDK in your app.
Configuration
Every option in sophonz-config.json and the Gradle sophonz extension, and how the collector URL and app key are set.
Instrumentation
What each built-in Android instrumentation captures, the spz.type it attaches, whether it is on by default, and how to turn it on or off.
API reference
The public API on the Sophonz object — sessions and users, logs and exceptions, spans, trace enrichment, and OpenTelemetry extension.
Mapping File Upload
Upload R8/ProGuard mapping.txt so obfuscated stack traces resolve to their original classes, methods and line numbers.
Legacy — v1.0
How to install and configure the Sophonz Android SDK v1.0.
Legacy — v1.1 Extension
How to install and configure the Sophonz Android SDK v1.1 with Extension support.
Legacy — Vanilla
How to install and configure the Sophonz Android Vanilla SDK v1.1.
iOS
iOS SDK
How the OpenTelemetry-based Apple SDK is put together, what it collects, its current state, and the order to read these pages in.
Installation
Adding the Apple SDK with Swift Package Manager or CocoaPods, and starting it in your app.
Configuration
Every field of Sophonz.Options, the capture service builder, per-service options, and the current state of the delivery path.
Instrumentation
What each Apple SDK capture service collects, the spz.type it attaches, whether it is installed by default, and its platform limits.
API reference
The public API on the Sophonz class — lifecycle, users and sessions, logs and crashes, spans, breadcrumbs, push notifications, experiments, and SwiftUI.
Examples
Finished examples of the Apple SDK in an app — minimal setup, your own exporter, tuning capture services, screens and spans, SwiftUI, and crash context.
dSYM Upload
Upload a build's dSYMs so crash and error stack traces resolve to function names, files and line numbers, laid out by thread the way Xcode shows them.
Legacy — Installation (old SDK)
How to install the Sophonz iOS SDK using XCFramework, CocoaPods, or Swift Package Manager.
Legacy — API & Configuration (old SDK)
Reference for the Sophonz iOS SDK Options class, key APIs, and initialization examples.
Legacy — WebView & Integration (old SDK)
Connecting WebView sessions, integrating Objective-C projects, recommendations, and support for the Sophonz iOS SDK.
Flutter
Flutter
What the Sophonz Flutter SDK captures, how it sits on top of the Android and Apple SDKs, the packages it ships as, and the order to read this guide in.
Installation
Step-by-step setup for a new Flutter app — the git dependency, Android Gradle and iOS CocoaPods or SwiftPM wiring, native start calls, and the Dart start sequence.
Configuration
The native configuration a Flutter app needs on each platform — sophonz-config.json and Sophonz-Info.plist — how service identity works, and every option available from Dart.
Instrumentation
What a Flutter app reports without extra code — Dart errors, frames, isolate hangs, startup and lifecycle from the Flutter layer, and crashes, ANRs and sessions from the native SDKs — and where Android and iOS differ.
Navigation
Tracking Flutter routes as views and screen-load spans with SophonzNavigationObserver or sophonz_go_router, including StatefulShellRoute, route naming and screens that are not routes.
Networking
Recording HTTP requests from Dart with SophonzHttpClient, the sophonz_dio interceptor or recordNetworkRequest, and propagating the W3C traceparent header so backend traces join the app's requests.
API reference
Every public Dart API in the Sophonz Flutter SDK — lifecycle, errors, logs, spans, network requests, views, users, sessions, exporters and the OpenTelemetry API — with signatures and Android and iOS support.
Release builds
Readable stack traces from a Flutter release build — R8 mapping files on Android, dSYMs on iOS, and what happens to Dart stack traces with --obfuscate and --split-debug-info.
Examples
A complete Flutter app setup with Sophonz — pubspec, native files, the main.dart start sequence, Dio with traceparent, go_router, a span around a screen load, handled errors, and user and session context.
Upgrading
Moving a Flutter app to a new Sophonz Flutter SDK release — changing the git tag in every entry, updating pubspec.lock, and keeping the Android Gradle plugin and the iOS SophonzIO pod at the versions the release is built against.
React Native
React Native
How the React Native SDK sits on top of the Android and Apple SDKs, which packages it is made of, and the order to read these pages in.
Installation
Adding the React Native packages, getting access to the private native SDKs, setting them up with the Expo config plugin, the setup wizard or by hand, and starting the SDK.
Configuration
The app identity on each platform, where the collector URL and app key live, the order iOS resolves them in, and every option of initialize, sdkConfig, sophonz-config.json and the Expo config plugin.
Instrumentation
What a React Native app captures with no code — native crashes, ANRs, network, lifecycle — what initialize adds for JavaScript errors and promise rejections, what each add-on package records, and where Android and iOS differ.
Networking and distributed tracing
How requests made with fetch and XMLHttpRequest are captured, how the traceparent header joins them to backend traces on Android and iOS, propagating a JavaScript span to your API, and recording requests the SDKs cannot see.
Navigation
Recording a ux.view span per screen with @sophonz/react-native-navigation for expo-router, React Navigation and react-native-navigation — setup, span names and attributes, app state handling and options.
Redux
Adding the @sophonz/react-native-redux middleware to a Redux Toolkit store, with or without hooks, and exactly what each dispatched action records.
OpenTelemetry and OTLP
Creating custom spans with the OpenTelemetry JS API through @sophonz/react-native-tracer-provider — setup, context, span context, platform limits — and sending the same telemetry to another backend with @sophonz/react-native-otlp.
API reference
Every export of the React Native packages — startup, hooks, logs and errors, sessions, users, network recording, bundle ids, types, the tracer provider, navigation, Redux and OTLP — with signatures, fallbacks and where Android and iOS behave differently.
Release builds and symbolication
What is readable in a React Native release build — JavaScript stack traces from Hermes bundles, R8 mappings on Android, dSYMs on iOS — what Sophonz can resolve today, and a Gradle plugin interaction to avoid.
Examples
A complete React Native start sequence with the SDK, the tracer provider and React Navigation, followed by a traced API call, a custom span, handled errors, an error boundary and a logout flow.
Backend SDKs
Node.js
Node.js
The Sophonz Node.js SDK brings OpenTelemetry-based observability to Node.js server applications with automatic instrumentation, framework middleware, and exception capture.
Installation
Install and initialize the Sophonz Node.js SDK — programmatically with init() or via the opentelemetry-instrument preload binary.
Configuration
Full reference for Sophonz Node.js SDK configuration — SDKConfig options for init()/initSDK() and the SOPHONZ_* / OTEL_* environment variables.
Middleware
Enrich request spans in Express, Koa, Fastify, and NestJS with the Sophonz Node.js SDK — baggage, client IP, user-agent, custom attributes, and error handlers.
API Reference
Public API of the Sophonz Node.js SDK — init, shutdown, middleware, error handlers, trace attributes, logger transports, and the bundled official OpenTelemetry API.
Examples
Complete, runnable server examples for Express, Koa, Fastify, and NestJS with the Sophonz Node.js SDK — init-first ordering, request middleware, logging, and error handlers.
Python
Python
The Sophonz Python SDK is an OpenTelemetry distro that sends traces, metrics, and logs from Python server applications to Sophonz, with framework middleware and exception capture.
Installation
Install and initialize the Sophonz Python SDK — programmatically with init() or with the opentelemetry-instrument command — and shut it down cleanly under gunicorn and uvicorn.
Configuration
Full reference for Sophonz Python SDK configuration — init()/init_sdk() options, instrumentation config, SQLCommenter for PostgreSQL, and the SOPHONZ_* / OTEL_* environment variables.
Framework Guides
Wire the Sophonz Python SDK into Flask, FastAPI, and Django applications and their production servers — gunicorn workers, uvicorn and lifespan, Django entrypoints, middleware order, and error handling.
Middleware
Enrich request spans in Flask, FastAPI, and Django with the Sophonz Python SDK — baggage and session.id, client IP, user-agent, custom attributes, and error handlers.
Instrumentation
What the Sophonz Python SDK captures automatically and how to control it — instrumentation loading, logging and exception capture, advanced network capture with redaction, baggage promotion, and custom spans.
Database Tracing
Trace PostgreSQL queries from Python with psycopg, psycopg2, SQLAlchemy, and the Django ORM, and carry the trace into the database with SQLCommenter so pg_tracing adds server-side spans to the same trace.
Browser to Backend Tracing
Continue a trace started by the Sophonz Browser SDK in a Python backend and into PostgreSQL — tracePropagationTargets, CORS for traceparent, tracestate, and baggage, session.id on server spans, and how to verify the link.
Deployment
Run Python services with the Sophonz SDK in production — programmatic init() or opentelemetry-instrument, environment and secret layout, containers with a non-root user and read-only root filesystem, Kubernetes manifests, and graceful shutdown.
API Reference
Public API of the Sophonz Python SDK — init, init_sdk, shutdown, force_flush, trace attributes, exception recording, SophonzOptions, the Flask, FastAPI, and Django helpers, and the re-exported OpenTelemetry API.
Examples
Complete Flask, FastAPI, and Django servers with the Sophonz Python SDK, laid out like the Sophonz sample servers — SDK start-up before imports, request helpers, CORS for browser traces, PostgreSQL with SQLCommenter, logging, and error handling.
Java
Java
Send OpenTelemetry traces, metrics, and logs from any Java server to Sophonz using the official OpenTelemetry Java agent — no Sophonz package required.
Installation
Attach the official OpenTelemetry Java agent to your JVM and configure it with environment variables to send traces, metrics, and logs to Sophonz.
Go
Go
Send OpenTelemetry traces, metrics, and logs from any Go server to Sophonz using the official go.opentelemetry.io modules — no Sophonz package required.
Installation
Wire the official Go OpenTelemetry SDK to export traces and logs over OTLP, and configure it with environment variables to send telemetry to Sophonz.
Rust
Rust
Send OpenTelemetry traces and logs from any Rust server to Sophonz using the official opentelemetry crates — no Sophonz package required.
Installation
Wire the official Rust OpenTelemetry crates to export traces and logs over OTLP, and configure them with environment variables to send telemetry to Sophonz.
Configuration
What the Sophonz collector needs from a Rust service and where each value is set — OTLP environment variables, resource attributes, propagators, sampling, batching, and log filtering with the official opentelemetry crates.
Framework Middleware
Create a server span for every request in axum, tower, actix-web, and tonic — extract the incoming W3C traceparent, name the span after the route, and record status and errors, using crates verified against opentelemetry 0.33.
Distributed Tracing
Carry one trace from a browser or mobile app through a Rust service and on to the services it calls — CORS for traceparent and baggage, session.id on server spans, and injecting the context into reqwest requests.
Database Tracing
Get spans for SQL queries in Rust with sqlx, diesel, and tokio-postgres — what each driver emits by itself, query spans with db.* attributes, and passing traceparent to PostgreSQL for pg_tracing.
Deployment
Run a Rust service that reports to Sophonz in production — the exporter's threads and the tokio runtime, TLS and CA certificates in the image, environment and secrets in Kubernetes, and flushing on graceful shutdown.
Elixir
Elixir
Send OpenTelemetry traces from any Elixir or Phoenix server to Sophonz using the official opentelemetry Erlang/Elixir packages — no Sophonz package required.
Installation
Add the official OpenTelemetry Erlang/Elixir packages, configure the OTLP exporter, and set environment variables to send traces from Phoenix or plain Elixir apps to Sophonz.
Ruby on Rails
Infrastructure
Overview
PostgreSQL
PostgreSQL instrumentation
The telemetry available from PostgreSQL depends on whether the database is self-operated or a cloud-managed service. This page compares the collection paths and the attributes each one provides.
Self-hosted PostgreSQL
Use the pg_tracing extension to have PostgreSQL emit its own spans. Covers building the image, server settings, the verification procedure, and the app key constraint.
Cloud-managed PostgreSQL
Client spans, query statistics, and logs — the three paths available where extensions cannot be installed, as on RDS, Aurora, Cloud SQL, and Azure Database.
MySQL
Redis
Kafka
RabbitMQ
MongoDB
Dashboards
Grafana Dashboards
Grafana Dashboards Overview
How to visualize Sophonz OpenTelemetry telemetry data in Grafana.
Dashboard Reference
The nine v3 dashboards Sophonz provides, panel by panel — which table each panel reads, what it computes and how, and how variables and drill-down links tie the dashboards together.
Dashboard Setup
How to provision Grafana datasources and dashboards for the Sophonz infrastructure.
Custom Panels
Six of the panel plugins Sophonz builds and installs into Grafana, the ones made for a single Sophonz view — what each one draws, the data and options it takes, and how it is configured in dashboard JSON.
Sophonz Chart Panels
The eight chart panels built on the shared Sophonz Chart library — TopN, Hitmap, Equalizer, Arc Equalizer, Waterfall, Line, Pie and Gauge — with the frame shape each one reads, every option and a query from a provisioned dashboard.
AI Agent
AI Agent
AI Agent Overview
How Sophonz AI Agent detects problems from real user data and automatically proposes code fixes.
GitHub App
Install the Sophonz GitHub App on your repository to automatically create issues and suggest code fixes driven by real-user error data collected by the Sophonz SDK.
GitLab App
Install the Sophonz GitLab App on your project to automatically create issues and suggest code fixes driven by real-user error data collected by the Sophonz SDK.
Error & Crash Auto-fix
A pipeline where AI agents analyze production errors and crashes and automatically draft code-fix PRs/MRs.
Coverage & Test Generation
A pipeline that finds high-coverage paths in real user sessions and turns them into automated test cases.
Agent Orchestration
The orchestration layer that defines, connects, runs, and observes agents, plus agent lifecycle and MCP & Skills.
Scenarios
End-to-end scenarios showing how Sophonz AI Agent detects errors and automatically creates issues and code-fix PRs/MRs.