test(observability): classify post-auth datastore spans by identity (#51554)

Co-authored-by: mateo <277851410+mateo-berri@users.noreply.github.com>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
devin-ai-integration[bot] 2026-11-13 05:11:21 +00:00 • committed by GitHub
parent d30b2b9b26
commit 89632ca1be
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -346,8 +346,11 @@ def _db_systems(spans: tuple[Span, ...]) -> set[str]:
def _post_auth_datastore_spans(spans: tuple[Span, ...]) -> tuple[Span, ...]:
auth_ids: Final = frozenset(span["span_id"] for span in spans if span["name"].startswith("auth "))
return tuple(span for span in spans if _db_systems((span,)) and span["parent_span_id"] not in auth_ids)
return tuple(
span
for span in spans
if _db_systems((span,)) and span["attributes"].get("litellm.team.id") is not None
)
def _names(spans: tuple[Span, ...]) -> list[str]: