# Śledzenie wywołań modeli i agentów (tracing)

EN: **LLM and agent tracing** · id `llmtracing` · aliases: LLM tracing, agent tracing, LLM observability, OpenTelemetry GenAI, spans, ślady wykonania

Path: [AI Atlas](https://aiatlasgraph.com/llms.txt) › [Ewaluacja i interpretowalność](https://aiatlasgraph.com/t/evaluation.md) › [Monitoring produkcyjny](https://aiatlasgraph.com/t/monitoring.md) › Śledzenie wywołań modeli i agentów (tracing)

## Description

- PL: Instrumentacja aplikacji LLM, która zapisuje wywołania modeli, narzędzi i agentów jako drzewo spanów z atrybutami.
- EN: Instrumenting LLM applications to record model, tool and agent calls as a tree of spans with attributes.

## In one sentence

- PL: Zapis krok po kroku, co system z modelem robił: jakie pytania wysłał, jakich narzędzi użył, ile to trwało i kosztowało.
- EN: A step-by-step record of what a model-based system did: what it asked, which tools it used, how long it took and what it cost.

## Problem it solves

- PL: Gdy agent zrobi coś dziwnego w środku długiego zadania, bez zapisu nie da się ustalić, który krok zawiódł.
- EN: When an agent does something odd midway through a long task, without a record you cannot tell which step failed.

## What it does

- PL: Jak czarna skrzynka w samolocie: każdy krok zapisuje się jako zagnieżdżony odcinek z czasem, wejściem i wynikiem, więc można odtworzyć cały lot.
- EN: Like a flight recorder: each step is logged as a nested segment with timing, input and output, so the whole flight can be replayed.

## Everyday example

- PL: Klient skarży się na złą odpowiedź; otwierasz zapis jego rozmowy i widzisz, że wyszukiwanie zwróciło pusty wynik, a asystent zgadł dalej.
- EN: A customer complains about a bad answer; you open the record of their chat and see the search returned nothing and the assistant guessed.

## This concerns you if you…

- PL: szukasz przyczyny błędów agenta w długich zadaniach
- PL: chcesz wiedzieć, ile kosztuje i trwa każdy krok
- EN: you hunt for the cause of agent errors in long tasks
- EN: you want to know each step's cost and duration

## Keywords

OpenTelemetry · GenAI semantic conventions · spans · invoke_agent · execute_tool · token usage · LLM observability

## How it works

- PL: Każda operacja (wywołanie modelu, narzędzia, agenta, wyszukiwania) staje się spanem z czasem trwania i atrybutami, np. nazwą operacji, modelem i liczbą tokenów; spany łączą się w drzewo jednego śladu. Konwencje semantyczne OpenTelemetry dla GenAI ujednolicają te nazwy; treść wiadomości zapisuje się tylko po włączeniu (opt-in).
- EN: Each operation (model call, tool, agent, retrieval) becomes a span with duration and attributes such as operation name, model and token counts; spans nest into a single trace tree. OpenTelemetry GenAI semantic conventions standardise these names; message content is recorded only when opted in.

## Limits

- PL: Konwencje dla GenAI są wciąż w fazie rozwojowej i się zmieniają. Zapisywanie treści rozmów grozi wyciekiem danych osobowych i zwiększa koszty przechowywania. Sam ślad niczego nie ocenia: trzeba go jeszcze przejrzeć lub ocenić.
- EN: GenAI conventions are still in development and keep changing. Recording conversation content risks leaking personal data and raises storage costs. A trace grades nothing by itself: it still has to be reviewed or scored.

## Key terms

- PL: **span**: Jeden zapisany krok z początkiem, końcem i opisem.
- PL: **trace**: Drzewo spanów opisujące jedno pełne zadanie lub żądanie.
- PL: **konwencje semantyczne**: Wspólne nazwy atrybutów, dzięki którym narzędzia rozumieją te same dane.
- EN: **span**: One recorded step with a start, end and description.
- EN: **trace**: A tree of spans describing one full task or request.
- EN: **semantic conventions**: Shared attribute names so tools understand the same data.

## Know first

- [Uprząż agenta (Agent harness)](https://aiatlasgraph.com/t/agentharness.md)
- [Narzędzia i integracje (Tool use and integration)](https://aiatlasgraph.com/t/tools.md)

## Related topics

Untyped, symmetric "see also" links.

- [Przegląd i próbkowanie śladów (Trace review and sampling)](https://aiatlasgraph.com/t/tracereview.md)

## Sources

- [OpenTelemetry Semantic Conventions for GenAI spans (gen-ai-spans.md)](<https://github.com/open-telemetry/semantic-conventions-genai/blob/main/docs/gen-ai/gen-ai-spans.md>) `otel-genai-spans` · by OpenTelemetry (projekt CNCF), grupa GenAI SIG

---

AI Atlas revision 122 (2026-10-30) · HTML: https://aiatlasgraph.com/t/llmtracing · index: https://aiatlasgraph.com/llms.txt · everything: https://aiatlasgraph.com/llms-full.txt · updated 2026-10-30
