LocalTrace

Start

Introduction

LocalTrace is a local APM for coding agents. MCP is the product. The UI is optional.

An agent that writes code without seeing the running system is guessing. It can read the source, run tests, and grep logs — but it cannot see what actually happened: which SQL was slow, which HTTP call returned 500, which Redis key missed, which span failed.

LocalTrace exists to close that gap.

The goal is not another dashboard. The goal is visibility for the agent — so it can test, debug, and develop against the real behavior of the system, not only against the code it wrote.

What it is

LocalTrace is a local APM that sits on your machine, accepts telemetry from your app, and exposes it to coding agents over MCP.

  1. Ingest — your app already talks OpenTelemetry, Sentry, or Datadog. Point OTLP/HTTP, Sentry, or Datadog at 127.0.0.1:4318, or OTLP/gRPC at 127.0.0.1:4317.
  2. Store — traces, logs, and metrics land in SQLite. No cluster. No account.
  3. See — the agent lists traces, opens a span tree, pulls the slowest SQL, and reads correlated logs. You can do the same in the UI if you want.

Use it while an agent is building a feature, writing a migration, or chasing a bug: run the app, hit the path, ask the agent what happened.

Surfaces

SurfaceWho it is forRole
MCP (/mcp)The agentPrimary interface. Query traces, SQL, logs, services. Investigate a failure.
Native ingestYour existing SDKsZero new instrumentation. Point OTLP, Sentry, or dd-trace at localhost.
HTTP APIAgent + UISame services as MCP. Deterministic, filterable, local.
UIYouCompanion view. The agent does not need it.

The UI is a human overlay on the same data. MCP is the product.

That means:

  • Tools, resources, and prompts are first-class — not an afterthought bolted onto a REST API.
  • Tool descriptions tell the agent how to investigate, not just what a field is called.
  • Ingest speaks the protocols agents and apps already emit. No custom SDK, no vendor lock-in, no cloud account.
  • Storage is a local SQLite file. Disposable. Inspectable. The agent can read it.

Metrics

Ingest and store work (OTLP + Datadog series). Agents read them over MCP (list_metric_facets, query_metrics) or HTTP (GET /api/metrics, GET /api/metrics/facets). There is no metrics UI — traces and logs are the companion views.

Status

Early and local-only. Schema and APIs change without migration paths — wipe and re-ingest. That is intentional: this is a development instrument for agents, not a production APM.

Source: github.com/skaznowiecki/localtrace. Licensed MIT.