Overview
The TypeScript SDK provides Logfire support for JavaScript and TypeScript applications across Node.js, browsers, Cloudflare Workers, and other OpenTelemetry-compatible runtimes.
These docs cover the JavaScript packages that live in the pydantic/logfire-js repository. The main Logfire documentation remains focused on the Python SDK and the Logfire platform; this chapter is the package and runtime guide for JavaScript applications.
logfireprovides the runtime-agnostic manual tracing API: spans, logs, levels, error reporting, sampling helpers, evaluations, and managed variables.@pydantic/logfire-nodeconfigures the OpenTelemetry Node SDK, exporters, automatic instrumentation, logs, metrics, and thelogfiremanual API.@pydantic/logfire-browserconfigures browser tracing and re-exports thelogfiremanual API for client code.@pydantic/logfire-cf-workersinstruments Cloudflare Workers and forwards Worker spans to Logfire.
Use Getting Started for a minimal script, then move to the package page for your runtime:
- Server-side Node.js applications should start with Node.js.
- Browser applications should start with Browser, especially the proxy requirement.
- Cloudflare Workers should start with Cloudflare Workers.
- Framework users can use the Express, Next.js, Deno, or Vercel AI SDK guides.