mcpField
S
sdk

sdk

Remote
flarelog.devData & Analytics6Updated 5d ago

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

  1. 01Record logs, errors, and distributed traces
  2. 02Support multiple JavaScript runtimes
  3. 03Send telemetry to OTLP backends
  4. 04Capture AI inference tokens, latency, and cost
  5. 05Track tool calls and errors

Use cases

  1. 01Trace requests across services
  2. 02Review AI model call costs and latency
  3. 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.

Endpointhttps://mcp.loopboard.dev?project=your project
Copy install command
Claude CodeTerminal
Cursor.cursor/mcp.json
VS Code.vscode/mcp.json
Claude Desktopclaude_desktop_config.json
Windsurf~/.codeium/windsurf/mcp_config.json

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.

All endpoints
Streamable HTTPhttps://mcp.loopboard.dev?project=your projectAuth required

Tools

10
ParameterTypeRequiredDescription
titlestringYesTask title (required)
descriptionstringNoOptional task description
statusenumNoInitial status (default: todo)todo | in-progress | done | blocked
tagsarrayNoOptional 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.

npm version License: MIT


Documentation

docs.flarelog.dev

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

Markdown supported

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.