From 3485673c57c52d44817f32cf5008ca6847364eac Mon Sep 17 00:00:00 2001 From: Roger Yang <80478925+RogerHYang@users.noreply.github.com> Date: Tue, 29 Oct 2024 14:11:56 -0700 Subject: [PATCH] fix(sessions): for each session record first user by earliest span start time (#5227) --- src/phoenix/db/insertion/span.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/phoenix/db/insertion/span.py b/src/phoenix/db/insertion/span.py index a5fcba714fb..7aa575d1042 100644 --- a/src/phoenix/db/insertion/span.py +++ b/src/phoenix/db/insertion/span.py @@ -54,8 +54,8 @@ async def insert_span( project_session.project_id = project_rowid if span.start_time < project_session.start_time: project_session.start_time = span.start_time - if session_user and project_session.session_user != session_user: - project_session.session_user = session_user + if session_user and project_session.session_user != session_user: + project_session.session_user = session_user else: project_session = models.ProjectSession( project_id=project_rowid,