Skip to content

Conversation

@victorm-lc
Copy link
Contributor

Overview

Adding context on how to dynamically route traces to different LangSmith workspaces at runtime. This includes documentation for generic cross-workspace tracing in applications and overriding the default workspace for LangSmith deployments.

Type of change

Type: Update existing documentation

Related issues/PRs

  • GitHub issue: N/A
  • Feature PR: N/A

Checklist

  • I have read the contributing guidelines
  • I have tested my changes locally using docs dev
  • All code examples have been tested and work correctly
  • I have used root relative paths for internal links
  • I have updated navigation in src/docs.json if needed

(Internal team members only / optional): Create a preview deployment as necessary using the Create Preview Branch workflow

Additional notes

This PR adds a new section to src/langsmith/log-traces-to-project.mdx titled "Set the destination workspace dynamically" which covers two main use cases:

  1. Generic cross-workspace tracing: For applications that need to dynamically route traces to different workspaces based on runtime logic (e.g., customer ID, tenant, environment)
  2. Override default workspace for LangSmith deployments: For deployed agents where the default workspace needs to be overridden using graph lifespan context managers

Both Python and TypeScript code examples are provided for each use case, demonstrating the use of tracing_context/withTracing and workspace-specific LangSmith clients.

This documentation is particularly useful for multi-tenant applications that need to isolate traces by customer, environment, or team at the workspace level.

@github-actions github-actions bot added the langsmith For docs changes to LangSmith label Nov 18, 2025
@github-actions
Copy link
Contributor

Mintlify preview ID generated: preview-vicadd-1763428047-befe6c7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

langsmith For docs changes to LangSmith

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants