fix(tracing): group MLflow traces by session across workflows #14
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.
Summary
discovery,conversation,resume_after_approval,analysis,optimization) now usesession_context(get_session_id())instead ofsession_context(), so nested workflows inherit the parent conversation's session ID rather than creating a new onetrace_with_uridecorator — after each traced function completes,mlflow.update_current_trace(tags={"mlflow.trace.session": session_id})is called, ensuring tool and HA client traces are grouped with their parent sessionstart_experiment_runto optimization workflow — previouslylog_param/log_metriccalls were silently dropped because no MLflow run was activeconversation_idfrom frontend —streamChatnow passesactiveSessionIdasconversation_idin the request body, eliminating the need for server-side derivation via message hashingFiles Changed
src/graph/workflows/discovery.pysrc/graph/workflows/conversation.pysrc/graph/workflows/analysis.pysrc/graph/workflows/optimization.pystart_experiment_runsrc/tracing/mlflow.py_tag_trace_session()totrace_with_uriui/src/api/client/conversations.tsconversationIdparamui/src/pages/chat/index.tsxactiveSessionIdtostreamChattests/unit/test_tracing_context.pytests/unit/test_tracing_mlflow.pyTest plan
streamChatSSE parser tests passMade with Cursor