mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-13 08:52:02 +00:00
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:
parent
d30b2b9b26
commit
89632ca1be
1 changed files with 5 additions and 2 deletions
|
|
@ -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]:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue