About sdk
@flarelog/sdk is an observability SDK for logs, errors, and traces across JavaScript runtimes. It also captures AI inference metrics, including tokens, latency, cost, tool calls, and errors.
Key features
- 01Record logs, errors, and distributed traces
- 02Support multiple JavaScript runtimes
- 03Send telemetry to OTLP backends
- 04Capture AI inference tokens, latency, and cost
- 05Track tool calls and errors
Use cases
- 01Trace requests across services
- 02Review AI model call costs and latency
- 03Send telemetry to an OTLP backend
Configuration
Remote servers need no local install. Pick your client, then copy the config or install in one click.
https://mcp.loopboard.dev?project=your projectclaude mcp add --transport http kanban https://mcp.loopboard.dev?project=your project{"mcpServers":{"kanban":{"type":"http","url":"https://mcp.loopboard.dev?project=your project"}}}Open in Cursor{"servers":{"kanban":{"type":"http","url":"https://mcp.loopboard.dev?project=your project"}}}Open in VS Code{"mcpServers":{"kanban":{"type":"http","url":"https://mcp.loopboard.dev?project=your project"}}}{"mcpServers":{"kanban":{"serverUrl":"https://mcp.loopboard.dev?project=your project"}}}Run commands in a terminal; paste JSON into the client’s MCP config and restart. Servers that need sign-in will prompt on first connect.
https://mcp.loopboard.dev?project=your projectAuth requiredTools
10| Parameter | Type | Required | Description |
|---|---|---|---|
| title | string | Yes | Task title (required) |
| description | string | No | Optional task description |
| status | enum | No | Initial status (default: todo)todo | in-progress | done | blocked |
| tags | array | No | Optional tags for categorization |
Details
From the project README@flarelog/sdk
Zero-dependency observability for any JavaScript runtime.
Ships logs, errors, and W3C-propagated traces from Cloudflare Workers, Vercel, Node.js, or the browser to FlareLog or any OTLP backend. One SDK, every platform.
Documentation
Complete documentation with installation guides, API reference, framework integrations, and platform-specific setup.
Quick Start
npm install @flarelog/sdk
import { flarelog } from "@flarelog/sdk";
const logger = flarelog({});
logger.info("Hello!"); // → console (zero config)
Add your API key to ship to the dashboard:
FLARELOG_API_KEY=fl_your_key
AI Inference Observability
Zero-config instrumentation for OpenAI, Anthropic, Cloudflare Workers AI, Vercel AI SDK, and any OpenAI-compatible gateway. Captures tokens, latency, cost in USD, tool calls, and errors — viewable in the AI observability dashboard.
import { flarelog } from "@flarelog/sdk";
const logger = flarelog({
apiKey: process.env.FLARELOG_API_KEY,
ai: true, // one flag — every fetch() to OpenAI/Anthropic/etc. is captured
});
Need fine-grained control? Pass a config object instead:
const logger = flarelog({
apiKey: process.env.FLARELOG_API_KEY,
ai: {
captureSamples: true,
priceOverrides: { "gpt-4o": { input: 2.5, output: 10 } },
},
});
You can also use flarelogAI directly (re-exported from the main package):
import { flarelog, flarelogAI } from "@flarelog/sdk";
const logger = flarelog({ apiKey: process.env.FLARELOG_API_KEY });
const handle = flarelogAI(logger);
// handle.dispose() to remove instrumentation later
Streaming OpenAI calls capture tokens when you enable usage reporting (Anthropic and Workers AI capture usage automatically):
await fetch("https://api.openai.com/v1/chat/completions", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.OPENAI_API_KEY}` },
body: JSON.stringify({
model: "gpt-4o",
stream: true,
stream_options: { include_usage: true }, // ← required for streaming token capture
messages: [{ role: "user", content: "Hello" }],
}),
});
See the AI Observability guide for the full docs.
Features
- Zero dependencies — nothing to audit, nothing to conflict
- Any JavaScript runtime — Cloudflare Workers, Vercel, Node.js, browsers
- W3C trace propagation — distributed tracing across services
- Auto-detection — environment, release, platform
- OTLP-compatible — ships to Grafana, Honeycomb, Datadog, or any OTLP backend
- AI inference observability — zero-config token, cost, and latency tracking for OpenAI, Anthropic, Workers AI, Vercel AI SDK, and any OpenAI-compatible gateway
License
MIT
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.