Installation

Set up Foam in three steps.

1

Connect Slack

Foam uses Slack to notify the right person or channel when an issue needs action.

Why: Slack is where Foam alerts the right person or team about the issue and links to the report.

2

Connect GitHub

Foam uses GitHub to understand your repositories and open installation PRs.

Why: GitHub gives Foam the code context it needs to run error and code analysis.

3

Foam installs itself

FoamFoam

Think wizard npm install, but way better: Foam opens small SDK setup PRs.

Why: The SDK gives Foam runtime signals from production so it can connect errors to traces, logs, metrics, and code.

Example installation PRs authored by foam[bot]

config/initializers/foam.rbnew
1+# frozen_string_literal: true
2+
3+Foam::Ruby.init(
4+ token: ENV['OTEL_FOAM_COLLECTOR_BEARER_TOKEN'],
5+ service_name: 'client-rails'
6+)
Gemfile
11 gem 'stackprof'
22 gem 'sentry-rails', '~> 5.24'
33 gem 'sentry-ruby'
4+# Foam OpenTelemetry
5+gem 'foam-ruby'
46 gem 'sentry-sidekiq'

Package details

Below are some of the packages we currently support.

Ruby

foam-ruby

Ruby gem. Initializer-based setup. Exports via OTLP.

Installs

  • Rails controllers & routing
  • Active Record queries
  • Action Pack (HTTP)
  • Action View (templates)
  • Action Mailer
  • Active Job (workers)
  • Rack middleware
rubygems.org
gem 'foam-ruby'
Node.js

@foam-ai/node-opentelemetry

Node.js SDK. Uses the instrumentation hook or standalone require.

Installs

  • Next.js SSR & API routes
  • Express / Fastify / Koa
  • HTTP clients (fetch, axios)
  • Database drivers (Prisma, pg)
  • gRPC calls
npmjs.com
npm install @foam-ai/node-opentelemetry
Browser

@foam-ai/browser

Browser SDK. Script-tag or import. Propagates trace context to backend.

Installs

  • Page loads & route transitions
  • Web Vitals (LCP, FID, CLS, INP)
  • XHR & Fetch calls
  • Trace propagation to backend
  • Resource loading
npmjs.com
npm install @foam-ai/browser

If your services already emit OpenTelemetry, you don't need our SDK. Just add Foam as another endpoint: point your existing collector at our OTLP endpoint and we listen alongside whatever you have today. Enterprises can typically set up a sidecar instead, which is even simpler. Please reach out to perla@foam.ai for more details.

OTLP endpoint

https://otlp.foam.ai:4317

Authentication

Send the Authorization: Bearer YOUR_TOKEN header with each request. Tokens are issued from your Foam account.

Example: OTel Collector exporter

exporters: otlp/foam: endpoint: otlp.foam.ai:4317 headers: Authorization: Bearer ${FOAM_TOKEN} service: pipelines: traces: exporters: [otlp/foam] logs: exporters: [otlp/foam] metrics: exporters: [otlp/foam]