API Overview
This page is a package-level map of the public TypeScript SDK APIs. It is not a generated API reference.
Manual tracing and logging:
span(message, options)andspan(message, attributes, options, callback)startSpan(message, attributes?, options?)log(),trace(),debug(),info(),notice(),warning(),error(),fatal()reportError(message, error, extraAttributes?)Level
Configuration helpers and utilities:
configureLogfireApi()logfireApiConfigresolveBaseUrl()resolveSendToLogfire()serializeAttributes()LogfireAttributeScrubberNoopAttributeScrubberTailSamplingProcessorULIDGenerator- sampling helpers such as
levelOrDuration()
Subpaths:
logfire/evalslogfire/vars
Node.js runtime setup:
configure(options?)logfireConfigforceFlush()shutdown()DiagLogLevel
The package also re-exports the public API from logfire.
Browser runtime setup:
configure(options)returns an async shutdown functionDiagLogLevel
The package also re-exports the public API from logfire.
Cloudflare Worker setup:
instrument(handler, config)instrumentInProcess(handler, config)instrumentTail(handler, config)getTailConfig(config)exportTailEventsToLogfire(events, env)
Unlike the Node and browser packages, this package does not re-export the manual logfire API as named exports. Import spans, logs, and reportError from logfire directly:
import * as logfire from 'logfire'
import { instrument } from '@pydantic/logfire-cf-workers'