Skip to content

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.

Packages

  • logfire provides the runtime-agnostic manual tracing API: spans, logs, levels, error reporting, sampling helpers, evaluations, and managed variables.
  • @pydantic/logfire-node configures the OpenTelemetry Node SDK, exporters, automatic instrumentation, logs, metrics, and the logfire manual API.
  • @pydantic/logfire-browser configures browser tracing and re-exports the logfire manual API for client code.
  • @pydantic/logfire-cf-workers instruments Cloudflare Workers and forwards Worker spans to Logfire.

Where to Start

Use Getting Started for a minimal script, then move to the package page for your runtime: