agrag.retrieval.tracing
Span helpers shared by the retrieval spans.
Every retrieval span that returns a list records the results the same way, so a trace answers "what came back" without a second lookup.
Functions:
- filters_json – Return the scope as JSON, an empty scope when
filtersis None. - record_chunks – Record loaded chunks as OpenTelemetry-safe attributes.
- record_results – Write the results onto
span. - result_text – Return the text a result stands for.
- retrieval_span – Open a
RETRIEVERspan that records the query and the scope.
Attributes: