iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
The reliable way to measure an AI agent in production is to trace every execution as a distributed trace: one immutable root run for the user task, with child spans for orchestration, model requests, retrieval, tools, retries, fallbacks, and the final response. Record monotonic and wall-clock timestamps, provider usage, status, errors, retries, identifiers, and price-table versions. This lets you calculate end-to-end latency, time to first token, token consumption, estimated cost, provider-billed cost, reliability, and quality for the same run.
Start with one trace per agent task
Create a root run_id as soon as your service accepts a user request. Every operation performed for that task must inherit the trace context and a parent span ID. A single conversational turn can contain several model calls, retrieval queries, tool invocations, retries, fallback models, and parallel subagents; measuring only the final HTTP request hides the work that determines latency and cost.
Identifiers to attach to every run
run_idand trace ID, generated at ingress and never changed.- Workflow, agent, and agent-version identifiers.
- User or tenant identifier, subject to your privacy policy.
- Provider, model, endpoint, service tier, geography when relevant, deployment, release, and environment.
- Parent span ID, operation type, attempt number, and whether the span is on the critical path.
Span types
Use a root span for the complete user task and child spans for orchestration, each model request, retrieval operation, external tool call, serialization or network step when it materially affects timing, retry, fallback, and final response generation. Keep parallel spans as separate children rather than adding their durations together; their overlap is essential to understanding wall-clock behavior.
Required timing and outcome fields
- Start and end wall-clock timestamps for correlation with logs and provider reports.
- Monotonic start and end timestamps for elapsed-duration calculations that are not affected by clock corrections.
- Status such as success, error, timeout, cancelled, or incomplete.
- Error class, provider error code, timeout budget, retry count, and fallback reason.
- Input and output references or redacted payloads, with retention and sampling flags.
Measure latency at multiple layers
There is no single useful latency number. Track the user-visible wall-clock time and the component timings that explain it. Report at least P50, P95, and P99 so tail behavior is visible.
#1 Best Overall
- Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
- With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
- Wide Application: attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
- Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
- Economical &Reusable: Built durable materials with a long-lasting battery,our CAGIWIRU air duster it's a sustainable alternative to disposable air cans.
| Metric | How to calculate | What it reveals |
|---|---|---|
| End-to-end task latency | Final usable result timestamp minus request-acceptance timestamp | Total user wait, including queueing, orchestration, model calls, tools, retries, and rendering |
| Time to first token (TTFT) | First streamed output token timestamp minus model-request start | Queue and prefill delay before generation begins |
| Model request duration | Provider response completion minus provider request start | Time spent in each model call, including waiting and generation |
| Tool or retrieval latency | External-call end minus external-call start, including serialization and network wait | Slow APIs, searches, databases, and connector overhead |
| Time per output token | Duration after the first output token divided by the number of subsequent output tokens | Decode throughput after prefill |
| Critical-path latency | Elapsed time along the serial dependency chain; preserve parallel branches separately | Which operations actually determine completion time |
OpenTelemetry GenAI semantic conventions define gen_ai.server.request.duration for request latency, gen_ai.server.time_to_first_token for first-token latency, and gen_ai.server.time_per_output_token for decode time. The last metric starts after the first output token and divides by subsequent output-token count, so do not calculate it from total duration or total output tokens.
Streaming details
Record the timestamp of the first non-empty output token or chunk and the timestamp of the final usage event separately. A stream can produce visible text and then terminate before usage arrives. Mark that request as incomplete instead of assigning zero tokens or zero cost.
Serial versus parallel work
For sequential spans, the critical path is close to their summed duration. For concurrent retrievals or subagents, wall-clock completion may be near the slowest branch while total compute and token usage equal the sum of all branches. Store both critical_path_ms and work_ms so a latency optimization is not mistaken for a cost reduction.
Free tools Windows power users keep installed
One-click scans. No signup required.
Implement production tracing step by step
- Create the root context. At ingress, generate an immutable
run_id, start a root span, and capture request-accepted time, workflow, tenant, agent version, release, environment, and model policy. - Propagate context. Pass trace context through queues, worker processes, model SDK calls, retrieval layers, and tools. Preserve the parent span ID when work crosses a process or service boundary.
- Open a span for each operation. Start one span for every model request and tool invocation. Add retrieval, orchestration, retry, fallback, and final-response spans where they represent real work.
- Use two clocks. Store wall-clock timestamps for cross-system correlation and monotonic elapsed timestamps for duration and percentile calculations.
- Capture outcomes. Close each span with status, error class, provider code, timeout, attempt number, retry count, and fallback information. Record whether the operation was cancelled or ended without a normal response.
- Persist raw usage. Store the provider response usage object unchanged alongside normalized fields. Raw data is needed when a provider adds a token class or revises an accounting field.
- Normalize usage. Map provider fields into a common event linked to the model span and root
run_id. Keep an explicit unknown state for missing values. - Price the call. Join token classes to the version of the price table effective at the request timestamp, then emit an estimated-cost event.
- Reconcile. Match daily instrumented estimates with provider usage and cost exports. Retain both values and create a variance record when they differ.
- Build views from immutable events. Generate latency percentiles from spans and financial reports from usage and cost events, rather than overwriting historical values when a price changes.
Capture token usage without undercounting
Prefer provider-returned usage fields over local estimates. Tokenizers can differ by model, endpoint, tool format, and hidden reasoning behavior. Keep the raw response and normalize at least the following fields:
Rank #2
- Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
- Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
- Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
- Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
- Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth
| Normalized field | Meaning | Handling rule |
|---|---|---|
input_tokens |
Tokens supplied to the model, including cached input when the provider defines it that way | Store the provider value and its inclusion rules |
cached_input_tokens |
Input tokens served from a provider cache | Keep separate for pricing and cache analysis |
cache_creation_tokens |
Tokens used to create or write a cache entry | Record only when the provider reports it |
output_tokens |
Generated completion tokens | Keep distinct from input and reasoning classes |
reasoning_tokens |
Provider-reported hidden reasoning output | Include in output accounting when the provider specifies that rule |
total_tokens |
Provider total | Retain as reported and validate against component fields without silently replacing it |
OpenAI usage fields
OpenAI documents input_tokens, input_tokens_details.cached_tokens, output_tokens, output_tokens_details.reasoning_tokens, and total_tokens. Cached tokens are included in input tokens, and reasoning tokens are included in output tokens. Recorded usage is best-effort: it can arrive after the turn, be null, and should not be treated as the final bill. Your ingestion pipeline therefore needs a late-update path keyed by request and run ID.
Anthropic usage fields
Anthropic’s Usage API reports uncached input, cached input, cache-creation, and output tokens. It can group or filter results by model, workspace, service tier, context window, geography, and other dimensions. Use those dimensions to reconcile organization-level reports with the spans generated by individual runs.
Missing and late usage
- Never convert a missing usage object to zero.
- Set
usage_status=unknownorincompleteand retain the request for asynchronous reconciliation. - Track a usage-completeness rate: complete model calls divided by all model calls.
- Capture the final streaming usage event when present. If the stream ends first, leave token and cost values unresolved rather than fabricating them.
- Keep provider, endpoint, model, response timestamp, and service tier with every usage event; the same model name can have different accounting rules across endpoints or tiers.
Calculate estimated cost and reconcile it to the bill
Use a versioned price table. A price row should be keyed by provider, model, endpoint, token class, currency, geography or service tier where relevant, and effective timestamp. Never apply today’s price to an old run without recording that choice.
estimated_call_cost = Σ(token_class_count × price_per_unit) + provider_tool_charges + applicable_fixed_charges
Rank #3
- 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
- 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
- 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
- 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
- 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.
Apply the formula to every model call, then roll the results up to the root run, workflow, tenant, deployment, and day. Include retries, fallbacks, parallel subagents, cached-input pricing, reasoning output, web search, code execution, and other third-party tools when they generate charges.
What to retain for financial control
| Value | Purpose |
|---|---|
| Estimated instrumented cost | Explains which calls, token classes, retries, tools, and subagents produced a run’s cost |
| Provider-billed cost | Financial control total from provider usage or cost exports |
| Variance | Difference between the two, with a reason code such as late usage, missing tool charge, price-table mismatch, or uninstrumented call |
Anthropic’s Cost API reports USD amounts as decimal strings in cents and includes token-usage, web-search, and code-execution cost types. Preserve the provider amount exactly, convert it to your reporting currency only in a derived field, and retain the original currency and precision.
Do not infer savings from a high cached-input percentage. Cached input can still be billed, and repeated calls may process a large history. Compare total task cost and latency at the quality level the application requires.
Reconciliation workflow
- Close the model span and write the first estimate as soon as usage is available.
- Run a daily import of provider usage and cost data.
- Match provider records to request IDs, span IDs, or a deterministic composite of timestamp, model, endpoint, and tenant when a direct ID is unavailable.
- Apply late usage updates and mark estimates superseded rather than deleting them.
- Group unmatched provider charges and unmatched instrumented calls for investigation.
- Alert when variance exceeds a threshold or when usage completeness falls below your operating target.
Design a dashboard that answers operational questions
The minimum production dashboard should combine spans, immutable usage events, cost records, and a quality signal tied to the same run_id.
Rank #4
- 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
- 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
- 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
- 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
- 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.
| Dashboard area | Required views |
|---|---|
| Outcome | Successful-task rate, error rate, timeout rate, cancellation rate, and fallback rate |
| Speed | End-to-end, TTFT, model, tool, and retrieval latency at P50, P95, and P99 |
| Tokens | Input, cached input, cache creation, output, reasoning, and total tokens per task |
| Cost | Estimated and reconciled provider cost per task, successful task, workflow, and tenant |
| Work profile | Model-call count, tool-call count, retry count, fallback count, parallel branch count, and critical-path contribution |
| Quality | Task success, human feedback, evaluation score, or another application outcome joined by run ID |
| Breakdowns | Model, workflow, tenant, geography, release, deployment, agent version, and environment |
Hosted tracing products can shorten dashboard implementation. LangSmith documents token, latency including P50 and P99, error, cost, feedback, and threshold-alert views, with integrations for major model SDKs, other frameworks, and OpenTelemetry. A hosted view is useful only if its events retain the identifiers and raw usage needed for your accounting and privacy requirements.
Choose an observability approach
| Option | Best fit | What it provides | What to add |
|---|---|---|---|
| OpenTelemetry | Teams that need vendor-neutral instrumentation | Portable traces, metrics, context propagation, and GenAI semantic attributes | A backend, retention policy, provider billing exports, and cost normalization |
| OpenAI agent tracing | Applications built around OpenAI Agents | Native session traces, step inputs and outputs, duration, status, timeline ordering and overlap, usage categories, and OTLP JSON export | Cross-provider traces and independent billing reconciliation when other services are involved |
| Anthropic OpenTelemetry with Usage and Cost APIs | Claude deployments needing request and tool spans plus organization reports | GenAI spans for model requests and tools, token reports, cost types, and grouping by operational dimensions | Equivalent instrumentation for non-Anthropic calls and a common price schema |
| LangSmith | Teams prioritizing a hosted dashboard and framework integrations | Percentile charts, token and cost breakdowns, feedback, alerts, and integrations | Validation that hosted records are complete enough for billing and privacy controls |
Provider-native views remain necessary for billing semantics that a generic exporter cannot reconstruct. OpenTelemetry is a portability layer, not a replacement for provider usage and cost reports.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Control cardinality, privacy, and retention
Trace metadata is valuable but can become expensive or expose sensitive content. Keep accounting and incident-analysis metadata unsampled, while sampling payload bodies according to risk and cost.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →- Use stable identifiers rather than email addresses or raw customer text in high-cardinality metric labels.
- Redact secrets, authentication headers, payment data, and regulated personal information before payload capture.
- Store payload hashes, sizes, schema versions, and redaction status when full content is unnecessary.
- Sample complete prompts and outputs for debugging, but retain unsampled span timing, status, token counts, model, tenant, and cost events required for accounting.
- Apply separate retention periods to payloads, traces, usage events, and reconciled financial records.
- Restrict access to raw prompts and outputs more tightly than access to aggregate latency or cost dashboards.
Compare models or agent designs on the same axes
A faster model is not automatically a better production choice. Compare equivalent workloads and report the following together:
Best Value
- 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
- 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
- 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
- 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
- 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.
- Speed: TTFT, total latency, critical-path latency, and tail latency.
- Efficiency: input, output, cached, cache-creation, and reasoning tokens per successful task.
- Cost: reconciled USD per successful task and per customer outcome, not merely cost per model call.
- Reliability: success, timeout, retry, fallback, and tool-error rates.
- Quality: task success or human feedback under the same workload and acceptance criteria.
- Operational burden: instrumentation coverage, data retention, metric cardinality, alerting effort, and reconciliation complexity.
When one design uses parallel subagents, show both wall-clock latency and total work. When one design retries more often, include every attempt in token and cost totals. When a model changes prompt caching or hidden reasoning behavior, compare the complete task-level outcome rather than a single token class.
Alerts and troubleshooting branches
Tail latency rises while P50 is stable
Break P99 down by model, region, service tier, tool, tenant, release, and queue time. Inspect critical-path spans for a slow external dependency or a small set of retries. A stable median can conceal a regional outage or a queue affecting only burst traffic.
TTFT rises but decode speed does not
Separate queue and prefill time from post-first-token decode time. Check request size, context-window utilization, cache hit behavior, provider service tier, and admission queues before changing output limits.
Cost rises without a token increase
Compare price-table versions, service tiers, geography, cache-creation charges, reasoning-token fields, tool charges, and the mix of models. Reconcile against provider reports before concluding that instrumentation is wrong.
Provider cost exceeds instrumented cost
Look for untraced retries, direct SDK calls outside the tracing wrapper, parallel workers with lost context, late usage events, provider-side tool charges, and price rows with the wrong effective timestamp. Track unmatched provider records until every variance has a reason.
Token totals are unexpectedly zero or null
Inspect streaming final events and asynchronous usage updates. Verify that the usage object is not being dropped during timeout handling. Store an explicit incomplete state and retry reconciliation; zero means the provider reported zero, not that your collector failed.
Trace volume or metric cost is too high
Keep unsampled accounting events and span metadata, sample payload bodies, remove unbounded text from metric labels, and aggregate high-cardinality dimensions in logs or traces instead of time-series labels.
Recommended Free Tools
Quick Recap
A practical production checklist
- Every accepted task receives one immutable root run ID.
- Queues, SDKs, retrieval systems, and tools propagate trace context.
- Each model request and tool invocation has a span with parent ID, timestamps, status, and attempt number.
- TTFT and post-first-token time are measured separately.
- Parallel spans preserve overlap and critical-path information.
- Raw provider usage is retained and normalized into input, cache, output, reasoning, and total fields.
- Missing usage is marked unknown or incomplete, never zero.
- Every estimate records the price-table version and effective timestamp.
- Retries, fallbacks, subagents, cached input, reasoning, and third-party tools are included in cost rollups.
- Provider-billed cost is reconciled daily with variance alerts.
- Dashboards show P50, P95, and P99 latency, reliability, tokens, cost, work profile, and quality by model, workflow, tenant, release, and agent version.
- Payload sampling, redaction, access control, and retention are explicit.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

