Context
When you click the "Share" button on a trace in LangSmith, it creates a public link that can be accessed by anyone who has the URL. This may be a security concern for organizations handling sensitive information like PHI (Protected Health Information) or other confidential data. You may want to disable this public sharing functionality to prevent accidental exposure of sensitive traces.
Answer
You can disable public sharing for your organization through the LangSmith settings:
Navigate to Settings in your LangSmith workspace
Select the Shared tab
Toggle Disable Public Sharing
From this same settings page, you can also:
View all traces that your organization has previously shared publicly
Unshare individual traces or all shared traces at once
Note: This setting also applies to datasets, which can also be shared publicly. Disabling public sharing will prevent both traces and datasets from being shared outside your organization.
For more information, see the LangSmith documentation on sharing traces.