Skip to contentমূল লেখায় যান

Topic 08 · AI conceptsটপিক 08 · AI concepts

Observability for AI Agents

An AI agent does many steps before it gives an answer: it calls a model, runs tools, and calls the model again. When the result is wrong, the final answer alone does not tell you which step failed. Observability records each step, so you can find the cause with evidence and not with guesses.

8 min read8 মিনিটে পড়া যায় · 7 sections7টি সেকশন · 11 sources11টি সোর্স · updated Nov 2026আপডেট: Nov 2026

Reading an agent traceএকটা এজেন্ট trace পড়া

Open one trace and find which step went wrong. Switch to the final answer only and see what you lose.একটা trace খুলে দেখুন কোন ধাপ ভুল হয়েছে। শুধু শেষ উত্তর দেখুন আর দেখুন কী হারায়।

2 min2 মিনিট7 steps7টি ধাপ
  • Spansস্প্যান1 / 6
  • Timeসময়0 s
  • Errors foundপাওয়া error0
1 / 6 spans1 / 6 spantest-fixer agenttest-fixer এজেন্টTraceTracestoreস্টোরOne agent run, one trace · bars show timeএকটা এজেন্ট run, একটা trace · বার মানে সময়invoke_agent test-fixerinvoke_agent test-fixer

You’ll learnআপনি শিখবেন

  • What a span isspan কী✓
  • Why each model call and tool call is a spanপ্রতিটা model call ও tool call কেন আলাদা span
  • How error.type marks a failed steperror.type কীভাবে ব্যর্থ ধাপ চিহ্নিত করে
  • Why the final answer alone is not enoughশুধু শেষ উত্তর কেন যথেষ্ট না

In plain words

Observability lets you understand a system from the outside Source 1সোর্স 1. You get it from telemetry: the data that a system emits about its behavior Source 1সোর্স 1. OpenTelemetry supports four signals: traces, metrics, logs, and baggage Source 2সোর্স 2. This page uses the first three:

For an AI agent, one request is one agent run. The trace of the run shows each model call and each tool call as its own span, in order and with its duration. A transcript of an agent run is the complete record of the run: its outputs, tool calls, reasoning, and intermediate results Source 10সোর্স 10. A trace is the structured, searchable form of that record.

OpenTelemetry has semantic conventions for generative AI: standard names for the spans, metrics, and events of model calls and agents Source 3সোর্স 3. Their status is Development, not Stable Source 3সোর্স 3. In Development, breaking changes can occur Source 8সোর্স 8, so names can still change.

সহজ English

Observability means you can understand a system from the outside Source 1সোর্স 1. You get it from telemetry. Telemetry is the data that a system sends out about what it does Source 1সোর্স 1. OpenTelemetry supports four kinds of data (signals): traces, metrics, logs, and baggage Source 2সোর্স 2. This page uses the first three:

For an AI agent, one request is one agent run. The trace of the run shows each model call and each tool call as its own span. You see them in order, and you see how long each one took. A transcript of an agent run is the full record of the run. It has the outputs, the tool calls, the reasoning, and the results in between Source 10সোর্স 10. A trace keeps that record in a form that you can search.

OpenTelemetry has standard names for the data of model calls and agents Source 3সোর্স 3. These names are still in Development, not Stable Source 3সোর্স 3. In Development, changes that break things can happen Source 8সোর্স 8. So the names can still change.

বাংলা ব্যাখ্যা

Observability মানে বাইরে থেকে একটা সিস্টেমকে বুঝতে পারা Source 1সোর্স 1। এটা আসে telemetry থেকে। Telemetry হলো সেই ডেটা, যা একটা সিস্টেম তার কাজের ব্যাপারে বাইরে পাঠায় Source 1সোর্স 1। OpenTelemetry চারটা সিগন্যাল (signal) সাপোর্ট করে: trace, metric, log, আর baggage Source 2সোর্স 2। এই পেজে প্রথম তিনটা নিয়ে কথা হবে:

  • একটা trace আপনার অ্যাপের ভেতর দিয়ে একটা রিকোয়েস্টের পুরো পথ দেখায় Source 2সোর্স 2। Trace তৈরি হয় অনেকগুলো span দিয়ে। একটা span হলো কাজের একটা একক Source 1সোর্স 1।
  • একটা metric হলো অ্যাপ চলার সময় মাপা একটা সংখ্যা, যেমন সময় বা গণনা Source 2সোর্স 2।
  • একটা log হলো একটা ঘটনা নিয়ে সময়সহ একটা মেসেজ Source 1সোর্স 1।

একটা AI agent-এর জন্য একটা রিকোয়েস্ট মানে একটা agent run। এই run-এর trace প্রতিটা model call আর প্রতিটা tool call-কে আলাদা span হিসেবে দেখায়। আপনি এগুলো ক্রম অনুযায়ী দেখতে পান, আর কোনটায় কত সময় লেগেছে তাও দেখেন। একটা agent run-এর transcript হলো সেই run-এর পুরো রেকর্ড: আউটপুট, tool call, reasoning, আর মাঝের ফলাফল Source 10সোর্স 10। Trace সেই রেকর্ডকে এমনভাবে রাখে, যাতে আপনি খুঁজে দেখতে পারেন।

OpenTelemetry-তে model call আর agent-এর ডেটার জন্য স্ট্যান্ডার্ড নাম আছে Source 3সোর্স 3। এই নামগুলো এখনো Development অবস্থায়, Stable না Source 3সোর্স 3। Development অবস্থায় ভেঙে দেওয়ার মতো পরিবর্তন (breaking change) হতে পারে Source 8সোর্স 8। তাই নামগুলো এখনো বদলাতে পারে।

How it works

1. The agent run becomes a tree of spans. The OpenTelemetry GenAI conventions name the operations. invoke_agent is one agent invocation, chat is one chat model call, and execute_tool is one tool call Source 5সোর্স 5. The agent span is named invoke_agent {gen_ai.agent.name} Source 4সোর্স 4, and a tool span is named execute_tool {gen_ai.tool.name} Source 11সোর্স 11:

invoke_agent test-fixer                one agent run (root span)
├── chat <model>                       step 1: the model plans
├── execute_tool read_file             step 2: a tool call
├── chat <model>                       step 3: the model reads the result
└── execute_tool run_tests             step 4: a tool call, error.type if it fails

2. Each span carries attributes. An agent span can record gen_ai.usage.input_tokens and gen_ai.usage.output_tokens Source 4সোর্স 4. If the operation ends in an error, the span gets error.type Source 4সোর্স 4. A tool span must have gen_ai.tool.name Source 11সোর্স 11.

3. Metrics sum up many runs. The conventions define gen_ai.invoke_agent.duration (the end-to-end time of one agent run), gen_ai.invoke_agent.tool_calls (the tool calls in one run), and gen_ai.execute_tool.duration (the time of one tool call) Source 6সোর্স 6 Source 11সোর্স 11.

4. Feedback becomes an event. The gen_ai.evaluation.result event records the result of an evaluation of a model output, with a score or a label such as pass or fail Source 7সোর্স 7.

5. A backend shows it all. You send the data to a tracing or metrics backend, and you query it there.

Cost is not a standard GenAI metric. The GenAI metrics list has no cost metric Source 6সোর্স 6. Some tools add their own. Claude Code is one example. It exports metrics, events, and, as an option, traces through OpenTelemetry Source 9সোর্স 9. You turn it on with CLAUDE_CODE_ENABLE_TELEMETRY=1 Source 9সোর্স 9. Its metrics include claude_code.token.usage and claude_code.cost.usage (in USD) Source 9সোর্স 9. Each api_request event has cost_usd, an estimated cost Source 9সোর্স 9. All events of one user prompt share one prompt.id Source 9সোর্স 9. Tracing is beta and off by default. It also needs CLAUDE_CODE_ENHANCED_TELEMETRY_BETA=1 and OTEL_TRACES_EXPORTER Source 9সোর্স 9. Each prompt then starts a claude_code.interaction root span, with API calls and tool calls as its children Source 9সোর্স 9.

সহজ English

1. The agent run becomes a tree of spans. OpenTelemetry gives each kind of step a name. invoke_agent is one run of an agent. chat is one call to a chat model. execute_tool is one tool call Source 5সোর্স 5. The agent span is named invoke_agent plus the agent name Source 4সোর্স 4. A tool span is named execute_tool plus the tool name Source 11সোর্স 11. In the tree, the agent run is at the top. Steps 1 and 3 are model calls. Steps 2 and 4 are tool calls.

2. Each span carries details. An agent span can record how many tokens went in and how many came out Source 4সোর্স 4. If the step ends in an error, the span gets error.type Source 4সোর্স 4. A tool span must have the name of the tool Source 11সোর্স 11.

3. Metrics sum up many runs. There are standard metrics for the full time of one agent run, the number of tool calls in one run, and the time of one tool call Source 6সোর্স 6 Source 11সোর্স 11.

4. Feedback becomes an event. The gen_ai.evaluation.result event records how an output was graded. It has a score or a label such as pass or fail Source 7সোর্স 7.

5. A backend shows it all. You send the data to a tool that stores traces or metrics. You search it there.

Cost is not a standard metric. The standard list of GenAI metrics has no cost metric Source 6সোর্স 6. Some tools add their own. Claude Code is one example. It sends metrics, events, and, if you want, traces through OpenTelemetry Source 9সোর্স 9. You turn it on with CLAUDE_CODE_ENABLE_TELEMETRY=1 Source 9সোর্স 9. It counts tokens (claude_code.token.usage) and cost in USD (claude_code.cost.usage) Source 9সোর্স 9. Each api_request event has cost_usd. This is an estimate Source 9সোর্স 9. All events of one prompt share one prompt.id Source 9সোর্স 9. Tracing is beta and off by default. It also needs CLAUDE_CODE_ENHANCED_TELEMETRY_BETA=1 and OTEL_TRACES_EXPORTER Source 9সোর্স 9. Then each prompt starts a top span, claude_code.interaction. The API calls and tool calls sit under it Source 9সোর্স 9.

বাংলা ব্যাখ্যা

১. Agent run একটা span-এর ট্রি হয়ে যায়। OpenTelemetry প্রতিটা ধাপের একটা নাম দেয়। invoke_agent মানে agent-এর একটা run। chat মানে একটা chat model-কে একবার কল করা। execute_tool মানে একটা tool call Source 5সোর্স 5। Agent span-এর নাম হয় invoke_agent আর তার পরে agent-এর নাম Source 4সোর্স 4। Tool span-এর নাম হয় execute_tool আর তার পরে tool-এর নাম Source 11সোর্স 11। ট্রি-র মাথায় থাকে agent run। ধাপ ১ আর ৩ হলো model call। ধাপ ২ আর ৪ হলো tool call।

২. প্রতিটা span-এ তথ্য থাকে। একটা agent span-এ লেখা থাকতে পারে কত token ঢুকেছে আর কত token বের হয়েছে Source 4সোর্স 4। কোনো ধাপ error-এ শেষ হলে span-এ error.type বসে Source 4সোর্স 4। একটা tool span-এ tool-এর নাম থাকতেই হবে Source 11সোর্স 11।

৩. Metric অনেকগুলো run-এর হিসাব দেয়। একটা agent run-এর পুরো সময়, একটা run-এ কয়টা tool call হলো, আর একটা tool call-এর সময়ের জন্য স্ট্যান্ডার্ড metric আছে Source 6সোর্স 6 Source 11সোর্স 11।

৪. Feedback একটা event হয়ে যায়। gen_ai.evaluation.result event রেকর্ড করে একটা আউটপুটকে কীভাবে মূল্যায়ন করা হলো। এতে একটা score বা pass বা fail-এর মতো একটা label থাকে Source 7সোর্স 7।

৫. একটা backend সব দেখায়। আপনি ডেটা এমন একটা টুলে পাঠান, যেটা trace বা metric জমা রাখে। সেখানে আপনি খুঁজে দেখেন।

Cost স্ট্যান্ডার্ড metric না। GenAI metric-এর স্ট্যান্ডার্ড তালিকায় cost-এর কোনো metric নেই Source 6সোর্স 6। কিছু টুল নিজেরা এটা যোগ করে। Claude Code তার একটা উদাহরণ। এটা OpenTelemetry দিয়ে metric, event, আর চাইলে trace পাঠায় Source 9সোর্স 9। আপনি এটা চালু করেন CLAUDE_CODE_ENABLE_TELEMETRY=1 দিয়ে Source 9সোর্স 9। এটা token গোনে (claude_code.token.usage) আর USD-তে cost গোনে (claude_code.cost.usage) Source 9সোর্স 9। প্রতিটা api_request event-এ cost_usd থাকে। এটা একটা আনুমানিক হিসাব Source 9সোর্স 9। একটা prompt-এর সব event-এর prompt.id একই Source 9সোর্স 9। Tracing এখনো beta, আর ডিফল্টভাবে বন্ধ। এর জন্য CLAUDE_CODE_ENHANCED_TELEMETRY_BETA=1 আর OTEL_TRACES_EXPORTER-ও লাগে Source 9সোর্স 9। তখন প্রতিটা prompt একটা উপরের span, claude_code.interaction, শুরু করে। API call আর tool call তার নিচে থাকে Source 9সোর্স 9।

Trade-offs

The most useful data for debugging is also the most dangerous to store. Model instructions, user messages, and model outputs are sensitive Source 5সোর্স 5. The input messages of an agent span are likely to contain user and personal data Source 4সোর্স 4. So the conventions say: do not capture them by default, and give users an option to opt in Source 5সোর্স 5. Tool call arguments and tool results are also opt-in Source 5সোর্স 5. For production, the conventions recommend storing the content outside the telemetry and recording only a reference, when sensitive data needs secure handling Source 5সোর্স 5.

Claude Code follows the same idea. Prompt text is redacted by default (OTEL_LOG_USER_PROMPTS) Source 9সোর্স 9. Tool details are off by default (OTEL_LOG_TOOL_DETAILS), and the docs warn that arguments can still contain sensitive values Source 9সোর্স 9.

The cost of this choice: a trace without content shows which step failed, but not always why. Decide per environment. A test environment with fake data can record more than production can.

সহজ English

The data that helps you most when you debug is also the most risky to keep. The instructions to the model, the messages of users, and the answers of the model are sensitive Source 5সোর্স 5. The input messages of an agent run will likely contain user data and personal data Source 4সোর্স 4. So the standard says: do not record them by default, and let users turn it on if they want Source 5সোর্স 5. The inputs and results of tool calls are also off until you turn them on Source 5সোর্স 5. In production, when sensitive data needs safe handling, the standard says to keep the content in a separate store and put only a link to it in the telemetry Source 5সোর্স 5.

Claude Code does the same. It hides the text of prompts by default (OTEL_LOG_USER_PROMPTS) Source 9সোর্স 9. Tool details are off by default (OTEL_LOG_TOOL_DETAILS). The docs warn that tool inputs can still contain sensitive values Source 9সোর্স 9.

The price: a trace without content shows which step failed, but not always why. Choose for each environment. A test environment with fake data can record more than production can.

বাংলা ব্যাখ্যা

Debug করার সময় যে ডেটা সবচেয়ে কাজে লাগে, সেটা জমা রাখাই সবচেয়ে ঝুঁকির। Model-এর instruction, ইউজারের মেসেজ, আর model-এর আউটপুট সংবেদনশীল (sensitive) Source 5সোর্স 5। একটা agent span-এর input message-এ সম্ভবত ইউজারের ডেটা আর ব্যক্তিগত ডেটা (PII) থাকবে Source 4সোর্স 4। তাই স্ট্যান্ডার্ড বলে: ডিফল্টভাবে এগুলো রেকর্ড করবেন না, আর ইউজার চাইলে চালু করার একটা অপশন দিন Source 5সোর্স 5। Tool call-এর input আর ফলাফলও আপনি চালু না করা পর্যন্ত বন্ধ থাকে Source 5সোর্স 5। Production-এ sensitive ডেটা নিরাপদে রাখতে হলে স্ট্যান্ডার্ড বলে, কনটেন্ট আলাদা জায়গায় রাখুন আর telemetry-তে শুধু তার একটা রেফারেন্স রাখুন Source 5সোর্স 5।

Claude Code-ও একই কাজ করে। ডিফল্টভাবে এটা prompt-এর লেখা লুকিয়ে রাখে (OTEL_LOG_USER_PROMPTS) Source 9সোর্স 9। Tool-এর বিস্তারিত ডিফল্টভাবে বন্ধ (OTEL_LOG_TOOL_DETAILS)। Docs সতর্ক করে যে tool-এর input-এ তবুও sensitive মান থাকতে পারে Source 9সোর্স 9।

এর দাম হলো: কনটেন্ট ছাড়া একটা trace দেখায় কোন ধাপ fail করেছে, কিন্তু সবসময় কেন তা দেখায় না। প্রতিটা এনভায়রনমেন্টের জন্য আলাদা করে ঠিক করুন। ভুয়া ডেটার একটা টেস্ট এনভায়রনমেন্ট production-এর চেয়ে বেশি রেকর্ড করতে পারে।

A real-life example

This is an invented example. A team runs a test-automation agent in CI. Its job: when a UI test fails, read the test, fix the locator, and run the test again. One night the agent reports "fixed", but the test still fails the next morning.

The final answer says nothing useful. The trace of the run does:

invoke_agent test-fixer                     41 s
├── chat <model>                             3 s
├── execute_tool read_file                 0.1 s
├── chat <model>                             4 s
├── execute_tool edit_file                 0.1 s
└── execute_tool run_tests                  30 s   error.type=timeout

The tester sees three facts at once. The edit happened. The test run ended in an error, not a pass, because the tool span has error.type Source 11সোর্স 11. And no chat span follows the failed run_tests span, so the agent wrote its "fixed" report without reading the test result. The bug is in the agent loop, not in the locator.

The team then does two things. They add a check to the agent: no "fixed" report without a passing test run. And they turn this run into an eval case, because user-reported failures that become test cases keep an eval suite close to real use Source 10সোর্স 10.

সহজ English

This is an invented example. A team runs a test-automation agent in CI. Its job is this: when a UI test fails, read the test, fix the locator, and run the test again. One night the agent says "fixed". But the next morning the test still fails.

The final answer does not help. The trace of the run does. It shows five steps under the agent run: a model call, a file read, a model call, a file edit, and a test run. The test run took 30 seconds and has error.type=timeout.

The tester sees three facts at once. The edit happened. The test run ended in an error, not a pass, because the tool span has error.type Source 11সোর্স 11. And no model call comes after the failed test run. So the agent said "fixed" without reading the test result. The bug is in the agent loop, not in the locator.

The team then does two things. They add a rule to the agent: no "fixed" report without a test run that passes. And they turn this run into an eval case. When failures that users report become test cases, the eval suite stays close to real use Source 10সোর্স 10.

বাংলা ব্যাখ্যা

এটা একটা বানানো উদাহরণ। একটা টিম CI-তে একটা test-automation agent চালায়। এর কাজ হলো: কোনো UI টেস্ট fail করলে টেস্টটা পড়া, locator ঠিক করা, আর টেস্টটা আবার চালানো। এক রাতে agent জানায় "fixed"। কিন্তু পরের সকালেও টেস্টটা fail করে।

শেষ উত্তরটা কোনো কাজে আসে না। Run-এর trace কাজে আসে। এটা agent run-এর নিচে পাঁচটা ধাপ দেখায়: একটা model call, একটা ফাইল পড়া, একটা model call, একটা ফাইল এডিট, আর একটা টেস্ট রান। টেস্ট রানে ৩০ সেকেন্ড লেগেছে, আর এতে error.type=timeout আছে।

টেস্টার একসাথে তিনটা জিনিস দেখেন। এডিট হয়েছে। টেস্ট রান pass না করে error-এ শেষ হয়েছে, কারণ tool span-এ error.type আছে Source 11সোর্স 11। আর fail করা টেস্ট রানের পরে কোনো model call নেই। মানে agent টেস্টের ফলাফল না পড়েই "fixed" বলেছে। Bug-টা agent-এর loop-এ, locator-এ না।

তারপর টিম দুটো কাজ করে। তারা agent-এ একটা নিয়ম যোগ করে: টেস্ট pass না করলে "fixed" রিপোর্ট নয়। আর তারা এই run-টাকে একটা eval case বানায়। ইউজারের জানানো fail-গুলো test case হলে eval suite আসল ব্যবহারের কাছাকাছি থাকে Source 10সোর্স 10।

Common mistakes

  • Only the final answer is logged. Then you cannot see which step failed. A transcript needs the tool calls and intermediate results too Source 10সোর্স 10.
  • Some tool calls are not traced. Automatic instrumentation does not cover every tool. The conventions ask developers to instrument by hand the tool calls that it misses Source 11সোর্স 11. A missing span looks like a step that never happened.
  • Prompts and tool inputs are logged in production with no review. They are sensitive and can hold personal data Source 5সোর্স 5 Source 4সোর্স 4. Also, Claude Code puts user.email (from your sign-in) in its telemetry attributes Source 9সোর্স 9. Check what your backend stores and who can read it.
  • The cost number is treated as the bill. In Claude Code, cost_usd is an estimate Source 9সোর্স 9. Use the provider's billing for money; use telemetry to spot trends.
  • The GenAI names are treated as stable. They are in Development Source 3সোর্স 3, and breaking changes can occur Source 8সোর্স 8. Pin the version you depend on, and check dashboards after an upgrade.
  • Traces are collected but never read. Anthropic's advice for evals is to read the transcripts; you cannot know if graders work otherwise Source 10সোর্স 10.

সহজ English

  • Only the final answer is logged. Then you cannot see which step failed. A transcript needs the tool calls and the results in between too Source 10সোর্স 10.
  • Some tool calls are not traced. Automatic tools do not cover every tool call. The standard asks developers to add the missing ones by hand Source 11সোর্স 11. A missing span looks like a step that never happened.
  • Prompts and tool inputs are logged in production with no review. They are sensitive and can hold personal data Source 5সোর্স 5 Source 4সোর্স 4. Also, when you are signed in, Claude Code puts user.email in its telemetry Source 9সোর্স 9. Check what your backend keeps and who can read it.
  • The cost number is treated as the bill. In Claude Code, cost_usd is an estimate Source 9সোর্স 9. Use the bill of the provider for money. Use telemetry to see trends.
  • The standard names are treated as fixed. They are in Development Source 3সোর্স 3, and changes that break things can happen Source 8সোর্স 8. Pin the version you use. Check your dashboards after an upgrade.
  • Traces are collected but nobody reads them. Anthropic's advice for evals is to read the transcripts. Otherwise you cannot know if the graders work Source 10সোর্স 10.

বাংলা ব্যাখ্যা

  • শুধু শেষ উত্তর log করা হয়। তখন কোন ধাপ fail করেছে তা দেখা যায় না। একটা transcript-এ tool call আর মাঝের ফলাফলও লাগে Source 10সোর্স 10।
  • কিছু tool call trace করা হয় না। অটোমেটিক instrumentation সব tool call ধরে না। স্ট্যান্ডার্ড বলে, যেগুলো বাদ পড়ে সেগুলো ডেভেলপার নিজে হাতে যোগ করবেন Source 11সোর্স 11। একটা span না থাকলে মনে হয় ধাপটা কখনো হয়ইনি।
  • কোনো রিভিউ ছাড়াই production-এ prompt আর tool input log করা হয়। এগুলো sensitive, আর এতে ব্যক্তিগত ডেটা থাকতে পারে Source 5সোর্স 5 Source 4সোর্স 4। তাছাড়া sign in করা থাকলে Claude Code তার telemetry-তে user.email রাখে Source 9সোর্স 9। আপনার backend কী জমা রাখে আর কে তা পড়তে পারে, দেখে নিন।
  • Cost-এর সংখ্যাকে বিল ধরে নেওয়া হয়। Claude Code-এ cost_usd একটা আনুমানিক হিসাব Source 9সোর্স 9। টাকার হিসাবের জন্য provider-এর বিল দেখুন। Telemetry দিয়ে ট্রেন্ড দেখুন।
  • স্ট্যান্ডার্ড নামগুলোকে স্থায়ী ধরে নেওয়া হয়। এগুলো Development অবস্থায় আছে Source 3সোর্স 3, আর breaking change হতে পারে Source 8সোর্স 8। আপনি যে ভার্সন ব্যবহার করেন সেটা পিন করুন। আপগ্রেডের পরে dashboard চেক করুন।
  • Trace জমা হয়, কিন্তু কেউ পড়ে না। Eval নিয়ে Anthropic-এর পরামর্শ হলো transcript পড়া। না পড়লে grader ঠিকমতো কাজ করছে কিনা আপনি জানতে পারবেন না Source 10সোর্স 10।

What a tester can check

Tutorial advice

This list is the tutorial's own advice, not a quote from a source.

  • Debug from the trace. When an agent test fails, open the trace of that run first. Find the first span with an error, and the first step where the agent went the wrong way.
  • Every tool call has a span. Run a scenario that uses each tool one time. Count the tool spans and compare with the tools that ran.
  • Errors are marked. Force a tool to fail (a timeout, a bad file path). Check that the span shows the error and that the run does not report success.
  • No secrets in telemetry. Put a fake API key, a fake password, and a fake email in a prompt and in a tool input. Search the backend for each value. Repeat with the content-logging options on and off.
  • Token and cost numbers add up. Compare the token counts in the telemetry with the usage that the model provider reports for the same runs.
  • One run, one trace. Check that all model calls and tool calls of one run, also the ones of a subagent, are in the same trace.
  • Failures feed the evals. Take each failed production trace, remove the personal data, and add it to the eval suite as a test case with the expected result.

সহজ English

Tutorial advice

This list is the tutorial's own advice, not a quote from a source.

  • Debug from the trace. When an agent test fails, open the trace of that run first. Find the first step with an error. Find the first step where the agent went the wrong way.
  • Every tool call has a span. Run a test that uses each tool one time. Count the tool spans. Compare them with the tools that ran.
  • Errors are marked. Make a tool fail on purpose, for example with a timeout or a bad file path. Check that the span shows the error. Check that the run does not say it passed.
  • No secrets in telemetry. Put a fake API key, a fake password, and a fake email in a prompt and in a tool input. Search the backend for each one. Do it again with content logging on and off.
  • Token and cost numbers add up. Compare the token counts in the telemetry with the usage that the model provider shows for the same runs.
  • One run, one trace. Check that all model calls and tool calls of one run are in the same trace. This includes the calls of a subagent.
  • Failures feed the evals. Take each failed trace from production. Remove the personal data. Add it to the eval suite as a test case with the expected result.

বাংলা ব্যাখ্যা

Tutorial advice

এই তালিকা টিউটোরিয়ালের নিজের পরামর্শ, কোনো সোর্সের উদ্ধৃতি না।

  • Trace দেখে debug করুন। একটা agent টেস্ট fail করলে আগে সেই run-এর trace খুলুন। Error আছে এমন প্রথম ধাপটা খুঁজুন। Agent প্রথম কোন ধাপে ভুল পথে গেছে, সেটা খুঁজুন।
  • প্রতিটা tool call-এর একটা span আছে। এমন একটা টেস্ট চালান, যেটা প্রতিটা tool একবার করে ব্যবহার করে। Tool span গুনুন। যেসব tool চলেছে তার সাথে মিলিয়ে দেখুন।
  • Error চিহ্নিত হয়। ইচ্ছা করে একটা tool fail করান, যেমন timeout বা ভুল ফাইল path দিয়ে। দেখুন span-এ error দেখাচ্ছে কিনা। দেখুন run নিজেকে pass বলছে না।
  • Telemetry-তে কোনো secret নেই। একটা prompt আর একটা tool input-এ একটা ভুয়া API key, ভুয়া password, আর ভুয়া email দিন। Backend-এ প্রতিটা খুঁজুন। কনটেন্ট logging চালু আর বন্ধ করে আবার করুন।
  • Token আর cost-এর হিসাব মেলে। একই run-গুলোর জন্য telemetry-র token সংখ্যা model provider-এর দেখানো usage-এর সাথে মিলিয়ে দেখুন।
  • এক run, এক trace। দেখুন একটা run-এর সব model call আর tool call একই trace-এ আছে কিনা। Subagent-এর call-ও এর মধ্যে পড়ে।
  • Fail-গুলো eval-এ যায়। Production-এর প্রতিটা fail করা trace নিন। ব্যক্তিগত ডেটা সরিয়ে ফেলুন। প্রত্যাশিত ফলাফলসহ test case হিসেবে eval suite-এ যোগ করুন।

Key words

TermMeaning
ObservabilityThe ability to understand a system from the outside, from the data it emits
TelemetryThe data that a system emits about its behavior
TraceThe path of one request, for example one agent run, as a tree of spans
SpanOne unit of work in a trace, for example one model call or one tool call
MetricA measurement taken at run time, such as a duration, a count, or a token total
Log / eventA timestamped record of one thing that happened
invoke_agent / execute_toolThe OpenTelemetry GenAI operation names for one agent run and one tool call
error.typeThe span attribute that names the class of error when a step fails
Opt-in contentPrompts, outputs, and tool inputs that telemetry records only if you turn it on
TranscriptThe full record of one agent run: outputs, tool calls, reasoning, and intermediate results
Eval caseA test for an AI system; a failed production trace can become one

Reels on this topicএই টপিকের রিলস

Short videos from other creators, picked for this topic. They are not part of this page's fact-checked text. Nothing loads from YouTube until you press Play.অন্য ক্রিয়েটরদের বানানো ছোট ভিডিও, এই টপিকের জন্য বাছাই করা। এগুলো এই পেজের ফ্যাক্ট-চেক করা লেখার অংশ নয়। চালান বাটন চাপার আগে YouTube থেকে কিছুই লোড হয় না।

  1. [1]
    Observability primer

    OpenTelemetry · accessed 2026-10-28দেখা হয়েছে: 2026-10-28

  2. [2]
    Signals

    OpenTelemetry · accessed 2026-10-28দেখা হয়েছে: 2026-10-28

  3. [3]
    Semantic conventions for generative AI systems

    OpenTelemetry (GitHub) · accessed 2026-10-28দেখা হয়েছে: 2026-10-28

  4. [4]
    Semantic Conventions for GenAI agent and framework spans

    OpenTelemetry (GitHub) · accessed 2026-10-28দেখা হয়েছে: 2026-10-28

  5. [5]
    Semantic conventions for generative client AI spans

    OpenTelemetry (GitHub) · accessed 2026-10-28দেখা হয়েছে: 2026-10-28

  6. [6]
    Semantic conventions for generative AI metrics

    OpenTelemetry (GitHub) · accessed 2026-10-28দেখা হয়েছে: 2026-10-28

  7. [7]
    Semantic conventions for Generative AI events

    OpenTelemetry (GitHub) · accessed 2026-10-28দেখা হয়েছে: 2026-10-28

  8. [8]
    Versioning and stability for OpenTelemetry clients

    OpenTelemetry · accessed 2026-10-28দেখা হয়েছে: 2026-10-28

  9. [9]
    Monitoring

    Claude Code Docs (Anthropic) · accessed 2026-10-28দেখা হয়েছে: 2026-10-28

  10. [10]
    Demystifying evals for AI agents

    Anthropic Engineering · accessed 2026-10-28দেখা হয়েছে: 2026-10-28

  11. [11]
    Semantic conventions for GenAI tool execution

    OpenTelemetry (GitHub) · accessed 2026-11-27দেখা হয়েছে: 2026-11-27