obs-unified

Examples

Runnable examples, instrumentation guides, recipes, and migration paths.

Use this page to pick the right starting point. Runnable examples are things you can clone, scaffold, or run locally. Reference examples are docs and snippets to copy into an existing app.

Fastest paths

GoalStart hereType
First run from a fresh checkoutGetting startedGuide
Run everything from one local imageDockerfile.local via pnpm local:image && pnpm local:runRunnable image
Try obs-unified with realistic trafficdemo/Runnable demo
Scaffold a new React + Hono appobs-unified create, choose React + Vite + HonoRunnable template
Add obs-unified to an existing React + Hono appReact + Hono walkthroughWalkthrough
Add obs-unified to an existing Python Flask appPython Flask walkthroughWalkthrough
Add browser analytics onlyAnalytics SDKReference
Add TypeScript backend telemetryTelemetry SDKReference
Instrument Python, JVM, or .NETLanguage recipesRecipes

Runnable examples

ExampleWhat it showsRun / entry point
Dockerfile.localAll-in-one local image with Postgres, collector, dashboard, file blob storage, and seed data.pnpm local:image && pnpm local:run
packages/cli/templates/react-vite/React + Vite frontend, Hono Node API, AnalyticsProvider, backend spans, and click-to-trace propagation.obs-unified create my-app, choose React + Vite + Hono
packages/cli/templates/vanilla-ts/Browser-only Vite + TypeScript analytics.obs-unified create my-app, choose Vanilla TypeScript
packages/cli/templates/hono-workers/Hono on Cloudflare Workers with backend telemetry wiring.obs-unified create my-api, choose Hono on Workers
apps/obs-demo/AI calls, RAG, tool calls, session tracking, and evaluation scenarios.pnpm dev, then curl http://127.0.0.1:8787/api/demo/run-all
apps/collector-node/Standalone Node collector with Postgres + MinIO.docker compose up -d from apps/collector-node
demo/OpenTelemetry Astronomy Shop feeding obs-unified with polyglot microservice traffic.pnpm demo:setup, pnpm demo:preflight, pnpm demo:up

SDK examples

RuntimeExampleNotes
Node.js / TypeScriptsdks/node/examples/basic.tsFirst-party Node SDK usage
Node.js / TypeScriptsdks/node/examples/smoke.mjsLightweight SDK smoke path
Gosdks/go/examples/basic/main.goGo SDK init and span conventions
Rustsdks/rust/examples/basic.rsRust SDK init and helper usage

Instrumentation guides

App shapeGuide
React + HonoInstrumenting your app
Python + FlaskPython Flask instrumentation
Browser / React analyticsAnalytics SDK
TypeScript backend / WorkersTelemetry SDK
Deeper backend instrumentationSDK API reference
Profiling / pprofdocs/howto/profiling.md in the repo
eBPF / host metricsdocs/howto/ebpf.md in the repo

Language recipes

RuntimeRecipe
Pythondocs/recipes/python.md
JVM / Java / Kotlindocs/recipes/jvm.md
.NETdocs/recipes/dotnet.md
Gosdks/go/README.md
Rustsdks/rust/README.md
SDK skeleton for contributorssdks/_template/README.md

Migration examples

SourceGuide
Sentrydocs/migrate/from-sentry.md
PostHogdocs/migrate/from-posthog.md
Honeycombdocs/migrate/from-honeycomb.md
Old @obs/* package scopedocs/migrate/from-obs-scope.md

Verification

After wiring any example, verify the collector and browser CORS path:

obs-unified doctor http://localhost:8790 --origin http://localhost:5173

For browser examples, the origin should match the app you are testing. For the Astronomy Shop demo, use http://localhost:8080.

On this page