Strada is an OpenTelemetry backend with error tracking, logs, traces, metrics, analytics, and a SQL CLI. Use @strada.sh/sdk to configure OTel once, pass its tracer to Spiceflow, then use the same SDK for logs and handled exceptions.
Create a project first, or list existing projects to find the project ID:
12345strada database create
strada projects create my-api
# Later, find the project ID and ingest endpoint againstrada projects list
Install Strada in your Spiceflow app:
1npm install @strada.sh/sdk
Then initialize Strada before creating the Spiceflow app:
The Spiceflow request spans, custom child spans, logs, and captureException() calls all flow to the same Strada project. Use the CLI to inspect them:
123strada issues list -p my-api --since 24h
strada logs -p my-api --since 1h
strada query "SELECT count() FROM otel_traces"-p my-api
React error tracking
Spiceflow exposes React 19's root error handlers (onCaughtError, onUncaughtError, onRecoverableError) via setReactErrorHandlers. These fire for every React render error globally, even when the user has their own ErrorBoundary. Call it before React hydrates, typically at the top of your client entry or inside your SDK init.
1234567891011121314151617181920212223242526272829import{ setReactErrorHandlers }from'spiceflow/react'import{ captureException }from'@strada.sh/sdk'setReactErrorHandlers({onCaughtError(error, errorInfo){// Fires when any ErrorBoundary catches an error.// errorInfo.componentStack is the React component tree.captureException(error,{
tags:{ reactHandler:'onCaughtError'},
extra:{ componentStack: errorInfo.componentStack},})},onUncaughtError(error, errorInfo){// Fires when no ErrorBoundary catches the error.// React unmounts the entire tree after this.captureException(error,{
tags:{ reactHandler:'onUncaughtError'},
extra:{ componentStack: errorInfo.componentStack},})},onRecoverableError(error, errorInfo){// Fires on hydration mismatches and other recoverable failures.// React re-renders from scratch after this.captureException(error,{
tags:{ reactHandler:'onRecoverableError'},
extra:{ componentStack: errorInfo.componentStack},})},})
Handler
When it fires
React behavior after
onCaughtError
Error caught by an ErrorBoundary
Fallback UI renders
onUncaughtError
Error not caught by any boundary
Tree unmounts
onRecoverableError
Hydration mismatch or auto-recovery
Client re-render
The handlers are set on globalThis and read by Spiceflow's client entry at hydration time. If you call setReactErrorHandlers after hydration, the handlers won't take effect. Always call it early, before any React rendering happens.