Web frameworks
LLM observability for NestJS, whole app
NestJS exposes a DI registry, so one line traces every provider and controller method, guards and decorators intact.
Set up NestJS
The snippet is copied from the SDK README, not paraphrased. Keys shown as tk_live_... are the environment key from Settings › Environments.
evalkit.init({ subscriptionKey: "tk_live_...", serviceName: "orchestrator" });
const app = await NestFactory.create(AppModule);
await evalkit.enableNestjsAutoTrace(app); // ← the only line you add
await app.listen(5000);Copied from sdk-ts/README.md § Framework middleware › NestJS — trace the whole app
Install → first trace
- 01
Install the SDK
pip install syntropylabs-evalkit or npm install syntropylabs-evalkit.
- 02
Call init() once
At the top of your entrypoint, with your environment key and a service name.
- 03
Call enableNestjsAutoTrace(app)
Each incoming request becomes a root trace with downstream model, database and HTTP calls nested underneath.
- 04
Send one request and open its trace
The request appears in Traces as a root span; Services shows the endpoint.
What a turn looks like
Sample data in the product’s own table. Hover, focus or tap a claim to see the columns it points at.
Sample run
| Operation | Service | Status | Model | Latency | Tokens | ≈Cost | Score |
|---|---|---|---|---|---|---|---|
| support_agent.turn8f3a1c0d94e2session sess_4b1e | support-api | ok | gpt-4o-mini | 1.84 s | 3,412 | $0.0006 | 92%auto |
| refund_agent.turnc21d7e5a30b8session sess_9a02tool loop | refund-worker | ok | claude-sonnet-4 | 4.31 s | 7,905 | $0.0389 | 68%auto |
| claude-code.turn5be04f7d1a96session sess_f77c | Claude Code | unset | claude-sonnet-4 | 48.20 s | 61,208 | $0.19 | — |
| rag.answere9a2b6c4d015error | docs-bot | error | gpt-4o | 6.02 s | 9,880 | $0.0312 | 41%auto |
| voice.turn17c8d3f2a4e0session sess_20d1 | ivr-agent | ok | gpt-4o-realtime | 0.92 s | 1,104 | $0.0071 | — |
fig. 1 · the traces table this integration fills · sample data
What you see
Taken from the SDK READMEs’ coverage tables. with flag means the signal leaves your machine only when you opt in.
| Signal | Captured | Detail |
|---|---|---|
| Each incoming request becomes a root trace | yes | — |
| Model, database and HTTP calls nested under the request | yes | — |
| End-user identity on the request’s trace | partial | setUser() inside the request binds the identity to that trace only |
| Your own functions | yes | every provider and controller method, through DiscoveryService; the call never throws |
Limitations
- createNestjsInterceptor() is the per-route alternative when you do not want the whole app wrapped.
- The TypeScript SDK attaches completion and token counts only on the success path, so a failed stream carries the error but not the partial output; the Python SDK keeps both.
Next steps
Trace NestJS today
Tracing is free for one project on every plan, coding-agent traces included. Evaluations, datasets and simulation are Pro and up.