feat(tracing): TS SDK session/user metadata API (0.10.0)#128
Merged
davidfarah2003 merged 1 commit intomainfrom Apr 25, 2026
Merged
feat(tracing): TS SDK session/user metadata API (0.10.0)#128davidfarah2003 merged 1 commit intomainfrom
davidfarah2003 merged 1 commit intomainfrom
Conversation
Adds setSession, setUser, and updateTrace helpers so callers can group multiple traces (e.g. one trace per tool call) into a single agent run via mlflow.trace.session and mlflow.trace.user metadata. Internal injectFolderTag renamed to injectKaybaContext and now emits folder, session, and user in one updateCurrentTrace call. Lockfile rewrite drops unused openai/dotenv that didn't match the declared deps in package.json.
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.
Summary
setSession,setUser, andupdateTraceto@kayba_ai/tracingso callers can group multiple traces into a single agent run viamlflow.trace.sessionandmlflow.trace.usermetadata.injectFolderTagrenamed toinjectKaybaContext, now emits folder + session + user in oneupdateCurrentTracecall.@kayba/tracing@0.1.0with strayopenai/dotenv).0.10.0(additive, no breaking changes).Why
Each call to
kayba.trace(fn)creates a new MLflow trace. Without a session id, agents that emit one trace per tool call (e.g. traderclaw plugin) leave 50+ disconnected traces in the dashboard with no way to filter them as a single conversation. This adds the standard MLflowmlflow.trace.session/mlflow.trace.usermetadata, plus a genericupdateTraceescape hatch for per-call tags.Test plan