Skip to content

fix: retriever spans use OpenTelemetry span kind INTERNAL - #296

Merged
PabloPardoGarcia merged 2 commits into
mainfrom
fix/semconv-1.13.1-retriever-internal
Nov 17, 2026
Merged

PabloPardoGarcia merged 2 commits into
mainfrom
fix/semconv-1.13.1-retriever-internal

Conversation

@PabloPardoGarcia

Copy link
Copy Markdown
Member

Re-pins the vendored rius-semconv constants (src/rius/_semconv_generated.py) from v1.13.0 to v1.13.1 with TAG=v1.13.1 scripts/sync-semconv.sh.

v1.13.1 maps the RETRIEVER taxonomy kind to the OpenTelemetry span kind INTERNAL instead of CLIENT, following the GenAI semantic conventions, which replaced the client retrieval span with an internal one: a retriever wraps embedding, database, HTTP or rerank calls that carry CLIENT spans of their own.

The SDK chooses the span kind through otel_span_kind(), which reads the generated table, so every RETRIEVER span (@observe, start_span, start_as_current_span) follows without a code change. The tests that asserted CLIENT for retrievers now assert INTERNAL.

The recorded-span fixtures under tests/fixtures/semconv are unchanged: the only fixture changes between the two tags are backend expected rows, which the SDK tests do not read.

Checks run locally: ruff check, ruff format --check, mypy, scripts/sync-semconv.sh --check, and the full pytest suite (3134 passed, 22 skipped, 1 xfailed).

Re-pin the vendored rius-semconv constants to v1.13.1, which maps the
RETRIEVER taxonomy kind to the INTERNAL span kind instead of CLIENT, matching
the GenAI conventions' internal retrieval span. The SDK reads the kind from
the generated table, so every RETRIEVER span (@observe, start_span,
start_as_current_span) follows; the tests that asserted CLIENT now assert
INTERNAL.
@PabloPardoGarcia
PabloPardoGarcia merged commit fef9fad into main Nov 17, 2026
14 checks passed
@PabloPardoGarcia
PabloPardoGarcia deleted the fix/semconv-1.13.1-retriever-internal branch November 17, 2026 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant