@fixwire/core
v0.2.1
Published
Fixwire SDK core: client, scopes, redaction, budgets, delivery
Maintainers
Readme
Bugs reach production. Fixwire finds them first: errors, traces, logs and AI agent runs in one place, an AI debugger on every plan, and your data kept in the region you choose.
Fixwire SDK core for JavaScript
Welcome to @fixwire/core, the runtime-agnostic core of the official
JavaScript SDK for Fixwire: the client, scopes,
on-device redaction, the crash-loop budget, delivery, tracing and AI agent
tracing that every runtime package shares. It is part of the
Fixwire SDK for JavaScript, whose
README has the full guide.
📦 Getting started
Prerequisites
- A Fixwire account and project: sign up at fixwire.io.
- Node.js 20 or newer, a modern browser or an edge runtime.
Installation
Install the SDK for your runtime instead; it brings this package and re-exports everything here:
| Package | For |
|---|---|
| @fixwire/node | Node.js: servers, workers, CLIs and serverless functions |
| @fixwire/browser | Web apps |
| @fixwire/edge | Cloudflare Workers, Vercel Edge, Deno Deploy, Netlify Edge Functions |
| @fixwire/react | React, with @fixwire/browser |
npm install @fixwire/node
pnpm add @fixwire/node
yarn add @fixwire/nodeBasic configuration
import * as Fixwire from "@fixwire/node"; // or @fixwire/browser, @fixwire/edge
Fixwire.init({
dsn: "https://<publishable key>@ingest.eu.fixwire.io",
release: "[email protected]",
environment: "production",
tracesSampleRate: 0.2, // record 20% of traces
// sendDefaultPii: true, // also send users' IP addresses from proxy headers (Node.js)
// redact: false, // turn off masking of secrets and personal data
});The DSN is your project's publishable key and the ingest host,
https://<publishable key>@<host>; without one, the SDK does nothing.
init() never throws: a broken DSN or option is said in a warning on the
console and the SDK stays off.
Quick usage example
Fixwire.captureMessage("Hello Fixwire!"); // an info-level message in your project
try {
JSON.parse("{ not json");
} catch (err) {
Fixwire.captureException(err); // the error, with its stack, causes and breadcrumbs
}✨ Why Fixwire
- Secrets stay on the device. The core masks secrets and personal data with the same rules as the Fixwire server, before anything is sent.
- A crash loop costs a few events, not your quota. Each issue sends a burst of 10 events, then 1 a minute, and a count of the rest.
- It never gets in your app's way. Captures never throw, and queues, strings (1,024 bytes by default), stacks (100 frames) and retries (4 sends) all have fixed limits.
- OpenTelemetry inside. It speaks the Fixwire protocol (OpenTelemetry's OTLP/HTTP plus a few small JSON endpoints).
- Your data stays where you want it. Fixwire keeps it in the region you choose for your project: the EU today, more regions soon.
🧩 Integrations
What the core provides, through every runtime package:
| Integration | What it does | How to use |
|---|---|---|
| OpenAI | Chat completions, responses and embeddings (streamed too) become spans with the model, tokens and finish reasons | Fixwire.wrapOpenAI(new OpenAI()) |
| Anthropic | Messages (streamed too) become chat spans with the model, tokens (cache tokens too) and stop reason | Fixwire.wrapAnthropic(new Anthropic()) |
| AI agents | Agent runs, model calls and tool calls with the OpenTelemetry GenAI conventions | Fixwire.ai.agent(), ai.chat(), ai.tool(), ai.embeddings() |
| OpenTelemetry | Your OpenTelemetry spans' traces on Fixwire's errors; your OTLP exporters pointed at Fixwire | Fixwire.openTelemetryIntegration(otel), Fixwire.otlpExporterOptions(dsn) |
| Custom runtimes | A client without globals, or for a runtime of your own | new Client(options, platform) |
⚙️ Configuration
Every option of init() and new Client() is listed in the
repository README.
🧪 Examples
The examples show the runtime packages: an Express API, a worker, a Vite app and an agent on Claude.
📚 Documentation
The full guide lives in the repository README and the examples.
🚧 Coming from another error tracker?
The API follows the shape most error-tracking SDKs share: init,
captureException, captureMessage, setUser, setTag, addBreadcrumb,
withScope, withIsolationScope and startSpan. Moving over is mostly a
change of package and DSN.
🙌 Want to contribute?
We'd love your help, whether it's a bug report, a fix or a new integration. Start with the contributing guide, then pick from the open issues or the good first issues.
🛟 Need help?
- Questions: ask on Discord or Slack.
- Bugs: open a GitHub issue.
- Found a security issue? Please don't open an issue; follow the security policy.
🔗 Resources
📃 License
The SDK is open source under the MIT license; see LICENSE. Parts are derived from other MIT-licensed SDKs; see NOTICE.
😘 Contributors
Thanks to everyone who helps make Fixwire better!
