Introduction
What is Because and how does it work?
Because is a decision tracing SDK for complex systems (pricing engines, quoting tools, approval workflows) that produce results that are hard to explain after the fact. Because lets you record every decision a system makes, so stakeholders can see why a specific result was produced for a given set of inputs, without developers having to dig through code.
A trace captures one run of your system. Spans record the individual steps: the data fetched, the rules applied, the values computed. View them as a timeline in the Because dashboard.
Key concepts
Trace: a single execution of your business logic. Has a name, optional input/output, optional metadata, and a duration.
Span: a step within a trace. Each span has a type that tells the dashboard how to render it:
| Type | Use for |
|---|---|
message | Plain text messages with level (info/warn/error) |
json | Structured JSON data |
table | Tabular data with optional highlighting |
chart | Line, bar, pie, or scatter charts |
http | Outbound HTTP requests |
db | Database queries (SQL or NoSQL) |
llm | LLM calls: prompt, model, response |
image | Images rendered inline in the dashboard |