Questions, answered

Setup, performance, security checks, load replay, your data, and how Causeline compares with other debugging, tracing and security tools. Something missing? Open an issue.

Is Causeline safe to run in production?

No, and it makes sure of that. Causeline is for development and QA. It is off unless causeline.enabled is true, and it refuses to start when a prod or production profile is active, because it shows headers, cookies and bodies in full.

Do I need an account, an agent or a collector?

No. Causeline runs inside your Spring Boot application and serves its UI at /causeline. There is no account, no cloud service and no separate process to run.

Which versions are supported?

Spring Boot 4.1 with Spring MVC or WebFlux on Java 21 or newer, and React 18 or newer. With @causeline/next, Next.js server code (requests, route handlers, server actions, rendering and fetch) joins the same trace. Edge runtime code isn’t traced yet.

Does it work with my OpenTelemetry setup?

Yes. It propagates the W3C traceparent header and is built on Micrometer Observation and OpenTelemetry. It can also export redacted spans over OTLP to Jaeger, Grafana Tempo or an OpenTelemetry Collector.

What does it record, and can I hide sensitive data?

By default it records headers, query strings, request and response bodies, SQL with bound values and exception details, and shows them only in your local UI. Any of it can be blocked with causeline.capture.* settings or the React capture prop, and anything exported is redacted.

Can I keep what I saw as a test?

Yes. Add causeline-test in test scope and put @CauselineTest on a @SpringBootTest. It checks the trace the test produced: no failed spans or exceptions (caught-and-logged ones included), the SQL query count, no N+1, and which controller, service and repository methods ran. There are no timing checks, so a test gives the same answer on any machine. Copy as MockMvc test in the UI writes one for you from a captured request.

How do I trace a request through a Spring Boot app?

Add the causeline-spring-boot starter and set causeline.enabled: true in a dev profile. Every request then shows up at /causeline as one trace: the HTTP request, controller, @Observed services, repositories, each SQL statement with its values, and outbound calls. Add @causeline/react and the trace starts at the click in the browser.

How do I find slow SQL queries and N+1 problems?

Every JDBC and R2DBC statement is a span with its real values and its duration. When the same query runs five or more times under one parent, Causeline flags it as N+1, names the query that loaded the rows, and suggests JOIN FETCH, @EntityGraph or batch fetching. Explain query shows the plan and points out full table scans.

How is Causeline different from Zipkin, Jaeger or an APM tool?

Those are built to collect traces from services in production. Causeline is for development and QA: it runs inside your app with no collector, starts the trace at the React click, shows request and response bodies and SQL values, names the bottleneck, and can replay a request and compare the runs. It can also export redacted spans over OTLP to Jaeger or Grafana Tempo.

Will it slow down my application?

Very little. On the demo app it added about 2 ms at p99 to a full checkout with everything captured. Spans leave the request thread through a bounded queue that drops and counts spans rather than ever blocking a request, and the React SDK is under 10 KB gzipped.

Does it work with microservices, Kafka and RabbitMQ?

Yes. Point a downstream Spring Boot service at the calling service with causeline.export.upstream and calls between them show as one trace. Kafka and RabbitMQ producers and consumers appear as message spans, and @Async work stays in the request’s trace.

Does it work with Spring Security?

Yes. Permit /causeline/** in your security configuration. Causeline protects those paths itself with an access token, checks the Host header, and only accepts browser spans from allowed origins.

Where are traces stored?

In memory, inside your app: the latest 1,000 traces within 64 MB, oldest first out. Nothing is sent anywhere unless you turn on OTLP export or causeline.store.persist, and both write redacted copies.

Is Causeline a security scanner?

No. It reads the traffic you already send while developing and flags OWASP Top 10 hints on it: a secret in a log or a response, a request value in SQL or in an outbound URL, insecure response headers and cookies. The active probes (IDOR, mass assignment, open redirect, auth boundary) are one request each, sent by you. It never crawls your app or attacks on its own, so it complements a scanner like ZAP or Burp rather than replacing it.

Can it replace k6 or JMeter?

No. Load replay sends a captured request or flow many times from inside your app and tells you which span grew: the transaction, the connection pool, the one query. The load comes from the same machine, so the numbers are relative, not capacity figures. When you need real load, copy the request as a k6 script.

Is it safe to send probes and load runs?

They only go to local or to targets you configure, and load also needs allow-load: true on a target. Every probe is one request you send by hand, POST, PUT and DELETE ask for confirmation first, and the API enforces the load limits. Point it at your own dev or QA environment, never at production.

Can my coding agent use Causeline?

Yes. Causeline serves its traces over MCP at /causeline/mcp, so Claude Code, Cursor, Copilot or Claude Desktop can list traces, read one with its insights and security hints, compare two runs, find the source file, and replay a request after a fix. Connect Claude Code with:

claude mcp add --transport http causeline http://localhost:8080/causeline/mcp --header "X-Causeline-Token: <token>"

The Connect agent button in the Causeline UI shows the command with your token. Causeline itself runs no AI; it answers your agent.

What can an AI agent see and do through MCP?

It sees traces the way an export shows them: credentials, sensitive values and SQL literals are redacted, because an agent’s context usually goes to a model provider, and causeline.mcp.hide keeps chosen paths away from it.

It may replay only GET and HEAD, or what you list in causeline.mcp.replay.allow (deny wins), only to local or targets marked allow-mcp, at most 20 a minute. Requests with side effects need its confirmation, it can’t change headers, and it can’t run probes or load. Its replays are tagged Agent in the UI.

Does it work with Spring AI, RAG and Python?

Yes. With Spring AI 2.0 in your app, model calls and vector searches join the trace, streaming included. The RAG panel shows the query, the ranked chunks with their scores, the final prompt with each chunk marked In prompt or Not in prompt, the answer and its tokens. Plain rules, with no model, flag low relevance, a chunk that missed the prompt, an answer cut off by its token limit and a context near its limit.

If Spring calls a FastAPI service, pip install "causeline[langchain]" puts that service and its LangChain calls in the same trace. Prompts, answers and chunks stay in the local UI: exports and coding agents get the metadata only, and a replay, load run or agent replay that would call a model again is refused until you allow it. Causeline never runs a model itself.

Is it free?

Yes. Causeline is open source under the Apache License 2.0. The code, issues and roadmap are on GitHub.