Repository navigation
fix: retriever spans use OpenTelemetry span kind INTERNAL - #296
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Re-pins the vendored rius-semconv constants (
src/rius/_semconv_generated.py) from v1.13.0 to v1.13.1 withTAG=v1.13.1 scripts/sync-semconv.sh.v1.13.1 maps the
RETRIEVERtaxonomy kind to the OpenTelemetry span kindINTERNALinstead ofCLIENT, 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 carryCLIENTspans of their own.The SDK chooses the span kind through
otel_span_kind(), which reads the generated table, so everyRETRIEVERspan (@observe,start_span,start_as_current_span) follows without a code change. The tests that assertedCLIENTfor retrievers now assertINTERNAL.The recorded-span fixtures under
tests/fixtures/semconvare 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 fullpytestsuite (3134 passed, 22 skipped, 1 xfailed).