<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/sample-ai-traces-at-100-without-sampling-everything-r6uzumoun" -->

---
title: Sample AI traces at 100% without sampling everything
description: When debugging AI agent runs, head-based trace sampling creates a critical blind spot: the sampling decision is made once at the root HTTP span, so a dropped...
canonical: https://daily.dev/posts/sample-ai-traces-at-100-without-sampling-everything-r6uzumoun
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Sample AI traces at 100% without sampling everything | daily.dev
og:description: When debugging AI agent runs, head-based trace sampling creates a critical blind spot: the sampling decision is made once at the root HTTP span, so a dropped...
og:url: https://daily.dev/posts/sample-ai-traces-at-100-without-sampling-everything-r6uzumoun
og:image: https://api.daily.dev/og/posts/R6UzUMOUN.png
og:image:alt: Sample AI traces at 100% without sampling everything
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Sample AI traces at 100% without sampling everything

**[Sentry Engineering](https://daily.dev/sources/sentry)** · 8 min read · 0 upvotes · 0 comments

## Summary

When debugging AI agent runs, head-based trace sampling creates a critical blind spot: the sampling decision is made once at the root HTTP span, so a dropped request silently discards all child LLM and tool-call spans. Unlike HTTP requests, agent runs are non-deterministic — each one makes unique decisions, so losing a sampled trace means losing irreplaceable debugging context. The solution is to use tracesSampler to identify AI-serving routes and sample them at 100%, while keeping a lower baseline rate for everything else. For cases where 100% sampling isn't feasible due to scale or cost, Sentry Metrics and Logs can capture aggregate signals (token usage, latency, call counts) independently of trace sampling. A cost comparison shows LLM API calls are 10–100x more expensive than the observability spans, making full AI trace sampling economically justified in most cases.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://blog.sentry.io/sample-ai-traces-at-100-percent-without-sampling-everything>

## Similar posts on daily.dev

- [Sampling: the philosopher’s stone of distributed tracing](https://daily.dev/posts/sampling-the-philosopher-s-stone-of-distributed-tracing-gpotwuue0) · The New Stack · 0 upvotes · 0 comments
- [Complete Guide to End-to-End Tracing in LLM Applications for Developers](https://daily.dev/posts/complete-guide-to-end-to-end-tracing-in-llm-applications-for-developers-r3l2s6xom) · PromptLayer Blog · 1 upvotes · 1 comments
- [You can’t debug what you can’t see — Observability for AI Agents](https://daily.dev/posts/you-can-t-debug-what-you-can-t-see-observability-for-ai-agents-8yaiqpabv) · CNCF · 1 upvotes · 0 comments
- [Session Traces and Cost Controls Help Diagnose AI Agent Failures](https://daily.dev/posts/session-traces-and-cost-controls-help-diagnose-ai-agent-failures-cphogfesa) · InfoQ · 0 upvotes · 0 comments
- [When Status OK Is Still a Failure: Silent AI Agent Breakage](https://daily.dev/posts/when-status-ok-is-still-a-failure-silent-ai-agent-breakage-fp21fyf2r) · Telerik · 1 upvotes · 0 comments

---

Tags: [#devops](https://daily.dev/tags/devops), [#ai-agents](https://daily.dev/tags/ai-agents), [#observability](https://daily.dev/tags/observability)

[View this post on daily.dev](https://daily.dev/posts/sample-ai-traces-at-100-without-sampling-everything-r6uzumoun)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Sample AI traces at 100% without sampling everything","url":"https://daily.dev/posts/sample-ai-traces-at-100-without-sampling-everything-r6uzumoun","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/sample-ai-traces-at-100-without-sampling-everything-r6uzumoun"},"datePublished":"2026-07-09T06:36:00.837Z","dateModified":"2026-07-09T06:36:40.815Z","description":"When debugging AI agent runs, head-based trace sampling creates a critical blind spot: the sampling decision is made once at the root HTTP span, so a dropped...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/4f29f05c8f9d1c184a21c4d33a4c6aab?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/4f29f05c8f9d1c184a21c4d33a4c6aab?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Sentry Engineering","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Sentry Engineering","logo":"https://media.daily.dev/image/upload/s--qqXwMThM--/f_auto/v1710505439/logos/sentry","url":"https://daily.dev/sources/sentry"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/sample-ai-traces-at-100-without-sampling-everything-r6uzumoun","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"devops,ai-agents,observability","timeRequired":"PT8M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Sentry Engineering","item":"https://daily.dev/sources/sentry"},{"@type":"ListItem","position":3,"name":"Sample AI traces at 100% without sampling everything"}]}
```

