Instrument the request, not just the model.

Choose meaningful boundaries, name the steps and collect context deliberately.

Instrumentation

A model call is one part of an AI feature. The user experiences the whole request: authentication, retrieval, prompt assembly, generation, validation and delivery. Instrument that path before deciding where to optimise.

Start with a request boundary

Give each application request a stable trace identifier. Represent meaningful operations as spans and preserve parent relationships when one operation starts another. Use names that describe the work, such as retrieve_context or generate_response, rather than a unique prompt or customer name.

Record what helps a decision

Duration, result status, provider, model identifier and usage counts can answer different questions. Keep units explicit. A token count and a currency estimate are different measures; the latter also depends on the rate and billing assumptions used.

Make retries visible

A second attempt should have its own span. Keep both attempts under the original request so that total latency includes the failure, the wait and the recovery. Whether a failed call incurs a charge depends on the provider and failure mode; the Tracefield demo uses a clearly labelled example charge.

Collect deliberately

Prompts and responses may contain sensitive content. Decide what to exclude, redact or sample before recording it. Prefer safe identifiers and references when retaining the original payload is unnecessary. Match retention and access to the purpose of the data.

Verify a complete journey

Send a known test request through your own application. Confirm the expected spans, their relationships and the units in your chosen telemetry system. This website demonstrates the presentation of a trace; it does not provide a telemetry collector or SDK.

FOLLOW THE SIGNAL

See the whole request.

From the first token to the final answer. Bring the detail into view.

Explore the product ↗

Tracefield is a fictional product. All metrics and integrations are illustrative.

Create a free website with Framer, the website builder loved by startups, designers and agencies.