Docs nav

Reference

SDKs

@foam-ai/node and @foam-ai/browser are the two most common install paths. Together they cover the server and client of a typical full-stack app.

We have support for other stacks. If you're looking to be OTel-instrumented but aren't today, let us know. We can support new packages within 72 hours.

@foam-ai/node

Node.js servers

Single foam.init() at app entry. Wires up OTLP traces, logs, and metrics; patches console.* to OTel logs; captures uncaught exceptions and unhandled rejections. Pass getNodeAutoInstrumentations() to opt into HTTP, Express, and database-driver instrumentations.

npm install @foam-ai/node@alpha
v0.1.0-alpha.3View on npm
@foam-ai/browser

Browser apps

Drop-in foam.init() that captures page loads, route transitions, Web Vitals (LCP, FID, CLS, INP), XHR / Fetch, and resource loading. Propagates trace context to your backend so client and server traces stitch together.

npm install @foam-ai/browser
v0.1.0-alpha.7View on npm
@foam-ai/vercel-otel

Next.js on Vercel

Returns a registerOTel-compatible config object pre-wired for Foam: trace exporter, log processor, and optional metric reader. Spread into @vercel/otel's registerOTel call in your instrumentation.ts hook.

npm install @vercel/otel @foam-ai/vercel-otel
foam-ruby

Ruby on Rails

Initializer-based setup; exports via OTLP. Auto-instruments Rails controllers & routing, Active Record, Action Pack / View / Mailer, Active Job, and Rack middleware.

gem 'foam-ruby'
v0.1.0.alpha14View on RubyGems
@foam-ai/nextbuild-time

Next.js sourcemap upload

Build-time plugin that generates, uploads, and cleans up production sourcemaps during `next build`. Pair with @foam-ai/vercel-otel or @foam-ai/node to get readable stack traces in production traces.

npm install --save-dev @foam-ai/next
v0.1.0-alpha.3View on npm