0.1.0-beta.3
March 22, 2026Analytics dashboard redesign
The built-in analytics dashboard has been completely redesigned with a Chrome DevTools-inspired UI.
All pages now share the same UX pattern: full-width list on the left, detail panel slides in from the right when you click an item, X to close.
- Overview — compact traffic chart, slowest procedures + error hotspots lists, sortable procedure table
- Requests — Recharts overview bar chart, inline waterfall bars, right panel with span waterfall + I/O
- Errors — stat strip with error codes + top procedures, right panel with stack trace + headers
- Sessions — Recharts overview bar chart, right panel switches between session summary and request detail
- Session detail — timing donut chart (Recharts PieChart), procedure stats, status breakdown
See Analytics for full documentation.
Drizzle ORM integration
New tracing integration for Drizzle ORM. Instrument your Drizzle instance once and all queries are automatically traced in the analytics dashboard — no manual trace() calls needed.
import { instrumentDrizzle, withSilgiCtx } from 'silgi/drizzle'
const db = instrumentDrizzle(drizzle(url, { schema }), {
dbName: 'myapp',
peerName: 'db.example.com',
peerPort: 5432,
})
// In a silgi procedure:
const listUsers = s.$resolve(async ({ ctx }) => {
return withSilgiCtx(ctx, () => db.select().from(users))
// Dashboard shows: db.statement (2.4ms) with full SQL detail
})Features:
instrumentDrizzle()— patches Drizzle session methods to intercept all querieswithSilgiCtx()— bridges request context to the DB layer via AsyncLocalStorage- Captures: SQL statement, operation type, table name, duration, errors
- Works with all Drizzle drivers (PostgreSQL, MySQL, SQLite, Turso)
- Instance patching, not prototype — idempotent and safe
- Supports transactions (re-instruments per transaction)
See Drizzle integration docs for setup and examples.
Better Auth integration
New tracing integration for Better Auth. All auth operations (sign-in, sign-up, OAuth, session management) are automatically traced in the analytics dashboard.
Plugin approach — auto-trace HTTP auth routes
import { silgiTracing } from 'silgi/better-auth'
const auth = betterAuth({
plugins: [
silgiTracing(), // auto-traces all auth operations
],
})Programmatic approach — trace auth.api.* calls
import { instrumentBetterAuth, withSilgiCtx } from 'silgi/better-auth'
const auth = instrumentBetterAuth(betterAuth({ ... }))
// In a silgi procedure:
const me = s.$resolve(async ({ ctx }) => {
return withSilgiCtx(ctx, () =>
auth.api.getSession({ headers: ctx.headers })
)
})Features:
silgiTracing()— Better Auth plugin, auto-traces all HTTP auth routesinstrumentBetterAuth()— wrapsauth.api.*methods for programmatic tracingwithSilgiCtx()— runs a function with silgi context for span collection- Captures: operation type, auth method, provider, user/session IDs, errors
- Dashboard shows:
auth.signin.email (4.2ms),auth.oauth.callback.github (120ms), etc.
See Better Auth integration docs for setup and examples.
Span input/output capture
trace() now captures input and output data on individual spans:
await ctx.trace('db.users.findMany', () => db.users.findMany(), {
input: { limit: 10 },
output: (users) => ({ count: users.length }),
})The output option accepts a derive function to avoid capturing the full response. Span input/output is displayed in the expanded span detail view in the dashboard.
Procedure-level capture
New procedure option on trace() to record input/output at the HTTP request level:
ctx.trace('db.query', () => query(), {
procedure: { input, output: (result) => result },
})See Analytics span options for full API reference.
Coexisting routes
Silgi can now coexist with existing Nitro/Nuxt routes. Return undefined for unmatched routes to let the framework handle them:
export default {
fetch: async (request: Request) => {
const response = await silgiHandler(request)
if (response.status === 404) return
return response
},
}See Nitro coexisting routes for details.
Response headers captured
Analytics now captures actual response headers (content-type, cache-control, x-request-id) by deferring the flush to after the Response is constructed. Response headers are visible in the request detail page in the dashboard.
Error to request cross-reference
Errors now include a requestId field linking back to the HTTP request. The dashboard shows a clickable badge to navigate from error to the request that caused it.
Streaming analytics
ReadableStream and SSE (AsyncIterableIterator) responses are now recorded in analytics. Previously they were invisible — the handler returned before record() was called.
Security fixes
- Session cookie now has
HttpOnlyflag (prevents XSS session theft) requestToRedactedJsonnow actually redacts sensitive headers (authorization, cookie, x-api-key)sessionToRedactedJsonredacts headers (was passing raw data)
Other changes
- Slow request threshold increased from 10ms to 100ms
- Sync fast-path error now correctly captures input and spans (was
undefined) - Nuxt integration: dedicated docs page with typed client composable, project structure, binary protocols
- Nitro integration: rewritten docs with modular structure and tracing examples
- Docs: analytics moved from plugins section to top-level (it's a built-in feature, not a plugin)
- Docs: examples URLs fixed (
pebblely/silgi→productdevbook/silgi)