Instrument an LLM Agent with OpenTelemetry · TripleCloud Blog
The article provides a hands‑on guide for tracing large language model (LLM) agents using OpenTelemetry, extending the same observability techniques used for traditional services. It covers zero‑code auto‑instrumentation, manual creation of agent and tool spans, token usage tracking, optional prompt capture, and grouping multi‑turn conversations into single traces. The approach is vendor‑agnostic, allowing the collected data to remain under the user’s control.
- ▪OpenTelemetry’s GenAI semantic conventions define standard span names and attributes such as model, token count, and finish reason for consistent LLM telemetry.
- ▪The guide demonstrates both automatic instrumentation without code changes and manual span creation for finer‑grained control.
- ▪It shows how to capture token usage, cost, and optionally the prompt and response content within traces.
- ▪Multi‑turn conversations can be grouped across traces to provide a holistic view of an agent’s workflow.
- ▪The solution works with various LLM providers and tracing back‑ends like Jaeger, Grafana Tempo, Datadog, and SigNoz without locking users into a specific vendor.
Hacker News (AI / LLM) files mainly under ai. We currently carry 2,966 of its stories.
Story provenance
Source · retrieval · rights · ranking — open for full record
inspect →
Story provenance
Attribution is not the same as permission. This drawer separates discovery metadata, excerpts, WeSearch-generated summaries, reuse status, and whether the publisher receives the visit. Nothing here claims a legal grant the publisher has not made.
Record
| Original publisher | Hacker News (AI / LLM) |
| Canonical URL | https://blog.triplecloud.tech/posts/instrument-llm-agent-opentelemetry |
| Publication time | Thu, 30 Jul 2026 20:10:53 +0000 |
| Retrieval time | 2026-07-30T20:17:35.545Z |
| Last seen | 2026-07-30T20:17:35.545Z |
| Headline source | Publisher (no WeSearch rewrite) |
| Excerpt source | publisher body |
| Excerpt method | First ~120 words (~800 chars) of extracted publisher body, fair-use limited. |
| Summary | WeSearch · cerebras-chat (WeSearch summarizer) |
| Summary source text | contentText |
| Citation coverage | Summary is a WeSearch-generated derivative; primary citation is the original publisher URL. |
| Cluster | uiSB28rzP61k · 1 stories |
| Cluster logic | Grouped by semantic title/content similarity across sources within a rolling window. Same-publisher template collisions are excluded from coverage comparison. |
| Ranking reason | Story pages are not engagement-ranked. Hub feeds use recency, with optional source-diversified chronological ordering (cap consecutive stories per source). No personalized ranking. |
| Publisher visit | Yes — open original |
| Substitutes article? | No — link-out required for full text |
Rights status (four layers)
WeSearch handling by dimension
| Indexing | May the item be indexed (stored, ranked, made findable)? | Allowed |
| Snippet | May a short excerpt of the publisher's text be shown? | Allowed |
| AI summary | May WeSearch generate its own short summary of the article? | Limited |
| Retrieval / RAG | May the content be exposed for third-party retrieval-augmented generation? | Not asserted |
| Model training | May the content be used to train AI models? | Not asserted |
| Commercial reuse | May the content be reused commercially? | Not permitted |
Basis: Derived from the published RSS/Atom feed. Contact: [email protected]. Reviewed: 2026-07-24.
Opening excerpt (first ~120 words) tap to expand
{"@context":"https://schema.org","@graph":[{"@type":["BlogPosting","TechArticle"],"@id":"https://blog.triplecloud.tech/posts/instrument-llm-agent-opentelemetry#article","isPartOf":{"@id":"https://blog.triplecloud.tech/#blog"},"mainEntityOfPage":"https://blog.triplecloud.tech/posts/instrument-llm-agent-opentelemetry","url":"https://blog.triplecloud.tech/posts/instrument-llm-agent-opentelemetry","headline":"How to instrument an LLM agent with OpenTelemetry","description":"OpenTelemetry can trace an LLM agent the same way it traces the rest of your stack. A hands-on guide to the GenAI semantic conventions: zero-code auto-instrumentation, manual agent and tool spans, token usage and cost, opt-in prompt capture, grouping multi-turn conversations across traces, and where to send the data.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at Hacker News (AI / LLM).