
Research
/Security News
Popular npm Packages in the keyv and Cacheable Namespaces Compromised in Active Supply Chain Attack
Popular npm packages keyv and cacheable compromised.
Local-first LLM observability. PostgreSQL only. Deploy in 30 seconds.
Traces is a lightweight alternative to Langfuse, Lunary, and LangWatch. No ClickHouse, no Redis, no Docker — just PostgreSQL and a single Node.js process.
npx traces-dev
| Langfuse | Lunary | Traces | |
|---|---|---|---|
| Deploy time | 15+ min (Docker, 6 services) | Docker + K8s | 30 seconds |
| Dependencies | PG + ClickHouse + Redis + MinIO | PG + Redis + K8s | PostgreSQL only |
| RAM | 4-8 GB | 2-4 GB | ~200 MB |
| Local models | Basic | No | First-class (tok/s) |
| SDK | Complex hierarchy | Moderate | 2 lines |
| Self-host cost | $20-50/mo | Similar | $0 |
# Using npx (no install needed)
npx traces-dev
# Or install globally
npm install -g traces-dev
traces start
# Custom database
DATABASE_URL="postgresql://user:pass@host:5432/mydb" npx traces-dev
The server auto-creates tables on first boot, generates API keys, and starts the dashboard.
npm install @traces/sdk
import { Traces } from '@traces/sdk';
import OpenAI from 'openai';
const traces = new Traces({
secretKey: 'sk-trc-...', // from server startup output
baseUrl: 'http://localhost:3100',
});
// Auto-instrument — wraps all API calls automatically
const openai = traces.wrap(new OpenAI());
// Use as normal — Traces captures everything
const response = await openai.chat.completions.create({
model: 'gpt-4o',
messages: [{ role: 'user', content: 'Hello!' }],
});
That's it. Open http://localhost:3100 to see your traces.
┌─────────────────────────────────────────┐
│ Traces (single Node.js process) │
│ │
│ ┌──────────┐ ┌────────────────────┐ │
│ │ Fastify │ │ Next.js Dashboard │ │
│ │ Trace API│ │ (embedded static) │ │
│ └────┬─────┘ └────────┬───────────┘ │
│ │ │ │
│ ┌────┴─────────────────┴───────────┐ │
│ │ PostgreSQL │ │
│ │ traces, spans, prompts, costs │ │
│ └──────────────────────────────────┘ │
└─────────────────────────────────────────┘
6 pages, all using a frosted-glass Apple-inspired design:
import { Traces } from '@traces/sdk';
const traces = new Traces({ secretKey: 'sk-trc-...' });
// Works with any OpenAI-compatible client
const openai = traces.wrap(new OpenAI());
const anthropic = traces.wrap(new Anthropic());
const trace = await traces.trace({ name: 'summarize', userId: 'user-123' });
const span = trace.span({ name: 'llm-call', model: 'claude-sonnet-4' });
span.input({ messages: [{ role: 'user', content: 'Summarize this...' }] });
const result = await client.chat(messages);
span.output(result).tokens(1500, 800).end();
await traces.flush();
const trace = await traces.trace({
name: 'chat-session',
userId: 'user-123',
sessionId: 'session-abc',
});
const span1 = trace.span({ name: 'classify', model: 'claude-haiku-4-5' });
// ... classify intent
span1.end();
const span2 = trace.span({ name: 'respond', model: 'claude-sonnet-4' });
// ... generate response
span2.end();
POST /api/traces Create a trace
POST /api/spans Create span(s) — supports batch (array)
GET /api/traces List traces (with span count, cost, latency)
GET /api/traces/:id Trace detail with all spans
GET /api/stats/overview Summary stats (cost, latency, errors)
GET /api/stats/timeseries Daily breakdown by model/provider
GET /api/stats/models Per-model metrics
GET /api/pricing Model pricing table
GET /api/prompts List prompts (latest version)
GET /api/prompts/:name All versions of a prompt
POST /api/prompts Create prompt / new version
WS /api/live WebSocket stream of incoming spans
Traces automatically calculates cost when you send inputTokens and outputTokens. Supported models:
| Variable | Default | Description |
|---|---|---|
DATABASE_URL | postgresql://localhost:5432/traces | PostgreSQL connection string |
TRACES_PORT | 3100 | Server port |
TRACES_HOST | 0.0.0.0 | Bind address |
LOG_LEVEL | info | debug, info, warn, error |
MIT — parallelromb
FAQs
Local-first LLM observability. PostgreSQL only. Deploy in 30 seconds.
We found that traces-dev demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Popular npm packages keyv and cacheable compromised.

Security News
A misconfiguration gave three Anthropic models internet access, and one, believing it was in a simulation, shipped a credential-stealing package to PyPI.

Security News
/Company News
Socket has joined the new Composer and Packagist sponsorship program as a launch sponsor, supporting the team that keeps PHP's package ecosystem secure.