Skip to content

Instrument your app

What leaves your app

A trace is built in your process, and you decide what goes in it. By default it carries ids and numbers, not your documents.

Sent by default#

In the trace Example
The query text "How many days do I have to request a refund?"
The label { "type": "keyword", "values": ["30 days"] }
Chunk and document ids refund-policy#2, refund-policy
Scores, ranks and token counts 0.498, rank 2, 34 tokens
Whether each chunk matches the label matches_label: true
Your retrieval settings top_k, threshold, filter, rerank and context limits
What you pass to finish() the model name, the answer, answer_correct
Your app's name, env and version support-bot, prod

The query and the answer are text your users wrote or read. If either is sensitive, redact it before you start the run, or leave answer out of finish().

Not sent by default#

Chunk text. The SDK checks each chunk against your label inside your process and sends only the yes or no. The server never needs the text to diagnose a trace.

To include it anyway, for example to read chunks in the dashboard's raw trace view:

JavaScript
createProfiler({ includeText: true });

Chunk metadata, except the keys your filter uses. A filter on tenant sends each chunk's tenant value, because that is what proves a FILTER_REMOVED finding. Other keys stay behind.

To send more:

JavaScript
createProfiler({ metadataKeys: ["tenant", "lang"] }); // these, plus the filter's keys
createProfiler({ metadataKeys: "all" });

Not collected at all#

The SDK does not send embeddings, your prompt template, API keys for other services, or anything about your users. It makes no network calls of its own: a trace goes only where your sink sends it.

Keeping traces local#

Nothing requires the hosted service. With fileSink or no sink at all, traces stay on your machine, and run.diagnose() and the CLI work offline.