Skip to content

docs(langsmith): document per-project extended retention and the allowed retention periods for self-hosted - #7510

Merged
Emil F (emil-lc) merged 16 commits into
mainfrom
raph/per-project-retention-docs
Nov 27, 2026
Merged

Emil F (emil-lc) merged 16 commits into
mainfrom
raph/per-project-retention-docs

Conversation

@raph-af

@raph-af Raphael (raph-af) commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Documents the self-hosted retention list (config.ttl.longlivedAllowedDays, helm#1297) and opt-in per-project extended retention, disabled by default from v0.18 (helm#1316). Enable it with config.ttl.perProjectRetention.enabled: true. Merge after both Helm PRs.

@github-actions github-actions Bot added langsmith For docs changes to LangSmith internal labels Nov 7, 2026
@raph-af
Raphael (raph-af) marked this pull request as ready for review November 7, 2026 01:40
@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Thanks for opening a docs PR, Raphael (@raph-af)! When it's ready for review, please add the relevant reviewers:

  • @fjmorris or @seanangio (LangSmith)

@github-actions github-actions Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI docs review retired; comments removed.

@github-actions github-actions Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI docs review retired; comments removed.

Emil F (emil-lc) and others added 2 commits November 9, 2026 12:53
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

@github-actions github-actions Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI docs review retired; comments removed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Raphael (@raph-af) I added one commit changing a header given the content had changed. Otherwise no concerns. If helpful, here are some questions that may (or may not) warrant your attention. Feel free to ignore. Claude may be overreaching:

  1. SmithDB vs. ClickHouse: The Helm values describe longlivedAllowedDays as "for SmithDB-only installs," and the per-project sync job (PROJECT_TTL_SMITHDB_SYNC_ENABLED) only takes effect with SmithDB enabled. Are longlivedAllowedDays and per-project retention supported on self-hosted installs that still use ClickHouse? If they need SmithDB, the docs should say so.

  2. Base projects and upgraded traces: data-purging-compliance.mdx:106 says upgraded traces in a Base project use the workspace period. A comment in cap.go says project days apply "including runs upgraded inside a short-lived project." The UI clears the project's days when the tier changes, but can the API store longlived_ttl_days on a Base project? If it can, that line needs "unless the project has its own period."

  3. Plan tier: Workspace-level retention on self-hosted requires an Enterprise plan (self-host-ttl.mdx:9). Does per-project retention need it too?

  4. config.ttl.enabled: helm#1316's tests show per-project retention stays off unless config.ttl.enabled: true is also set. Should the page state that requirement and show perProjectRetention in the YAML example at self-host-ttl.mdx:40–48?

  5. Permissions: Changing a project's days checks projects:increase-trace-tier / projects:decrease-trace-tier, and resetting to the workspace default can need either one. Should the docs mention this?

  6. Turning the flag off: If an admin disables perProjectRetention after projects have saved days, those projects fall back to the workspace period. Should the docs say so?

  7. New traces only: The design doc says retention changes apply only to new traces. Is that right for per-project changes, and should the new section say so?

@emil-lc

Emil F (emil-lc) commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Raphael (Raphael (@raph-af)) I added one commit changing a header given the content had changed. Otherwise no concerns. If helpful, here are some questions that may (or may not) warrant your attention. Feel free to ignore. Claude may be overreaching:

  1. SmithDB vs. ClickHouse: The Helm values describe longlivedAllowedDays as "for SmithDB-only installs," and the per-project sync job (PROJECT_TTL_SMITHDB_SYNC_ENABLED) only takes effect with SmithDB enabled. Are longlivedAllowedDays and per-project retention supported on self-hosted installs that still use ClickHouse? If they need SmithDB, the docs should say so.

The per-project-retention capability is not SmithDB-specific - it also works on Clickhouse. When SmithDB is being used, the PROJECT_TTL_SMITHDB_SYNC_ENABLED needs to be tunred on; it's a no-op on ClickHouse-only. There is a high-level Helm flag to toggle both items together.

  1. Base projects and upgraded traces: data-purging-compliance.mdx:106 says upgraded traces in a Base project use the workspace period. A comment in cap.go says project days apply "including runs upgraded inside a short-lived project." The UI clears the project's days when the tier changes, but can the API store longlived_ttl_days on a Base project? If it can, that line needs "unless the project has its own period."

That's correct - Base projects can have their own expiration, but that's not currently exposed in the UI in the first iteration for simplicity.

  1. Plan tier: Workspace-level retention on self-hosted requires an Enterprise plan (self-host-ttl.mdx:9). Does per-project retention need it too?

Not at the moment, though this does make thigs a bit inconsistent.

  1. config.ttl.enabled: helm#1316's tests show per-project retention stays off unless config.ttl.enabled: true is also set. Should the page state that requirement and show perProjectRetention in the YAML example at self-host-ttl.mdx:40–48?

Yes - good point, worth an update

  1. Permissions: Changing a project's days checks projects:increase-trace-tier / projects:decrease-trace-tier, and resetting to the workspace default can need either one. Should the docs mention this?

Yes, worth a sentence.

  1. Turning the flag off: If an admin disables perProjectRetention after projects have saved days, those projects fall back to the workspace period. Should the docs say so?

Yes, worth a sentence

  1. New traces only: The design doc says retention changes apply only to new traces. Is that right for per-project changes, and should the new section say so?

Yes, worth a sentence

Sean Angiolillo (seanangio) added a commit that referenced this pull request Nov 17, 2026
…7723)

## Summary

Resolves DOC-1938.

Since September 14, 2026, LangSmith Cloud limits extended trace
retention to 180 days. BYOC is exempt: extended traces default to 400
days, and AWS and Azure data planes can change that default. The docs
said "180 days" in about a dozen places without saying it applies only
to Cloud, and no BYOC page mentioned retention at all. Field teams were
answering customer compliance questions with the wrong limit.

## What changed

**One place for the retention numbers**
- `usage-and-billing.mdx`: Added a **Retention periods** table with base
retention, the default extended retention, and the extended durations
you can choose, for Cloud, BYOC, and self-hosted. Split the data
retention section into clearer subsections and rewrote the billing-model
explanation in second person.
- `billing.mdx`, `data-purging-compliance.mdx`, `view-usage.mdx`,
`observability-studio.mdx`, `engine-security.mdx`: Removed the "180 days
(as of September 14, 2026)" figures and linked to the table instead.
- `observability-concepts.mdx`: Corrected "LangSmith (SaaS) retains
trace data for 180 days from ingestion." Base traces are kept for 14
days. Each trace is kept for the retention period of its tier.
- `byoc-faq.mdx`: Added "How long does BYOC keep traces?"

**BYOC data plane retention settings**
- `usage-and-billing.mdx`: The BYOC values in the table are labeled as
data plane defaults, the same way the self-hosted values are labeled as
Helm chart defaults. A note under the table says AWS and Azure data
planes can change both defaults, and GCP data planes keep 14 and 400
days.
- `byoc-onboarding-aws.mdx`: Added a **Change data plane settings**
section covering the TTL settings in the UI and the API. It matches the
sections of the same name on the Azure and GCP onboarding pages. No AWS
page documented this setting before.
- `byoc-faq.mdx`: The retention answer gives both defaults and says AWS
and Azure can change them.

**Duplicated content removed**
- `administration-overview.mdx`: Removed the copied Data retention, Rate
limits, and Usage limits sections (about 240 lines). They were
word-for-word copies of `usage-and-billing.mdx`, and `docs.json` already
redirects those anchors there. Updated the stale link in
`evaluator-spend.mdx`.

**Usage limits**
- `usage-and-billing.mdx`: Documented project and user usage limits
(**Settings** > **Usage configuration** > **Project & user limits**),
including how they work in agent-based workspaces. Added a section on
how limits are enforced: monthly reset, ingestion stops at the limit,
approximate enforcement, and caching.
- `billing.mdx`: Simplified the spend limit section and removed the
outdated `p2usagelimitsempty-v2.png` screenshot.

## Verification

Checked against langchainplus `origin/main`:
- The SaaS cap applies only when `IsSaaSDeployment()` is true. BYOC
tenants are never capped and get `MaxLonglivedTTLDays` (400)
(`smith-go/ttl_settings/handler.go`, `cap.go`).
- BYOC durations match `DefaultLonglivedTTLAllowedDays` = 30, 60, 90,
120, 150, 180, 240, 300, 365, 400.
- The self-hosted defaults of 14 and 400 days match the Helm chart
defaults in `self-host-ttl.mdx`.
- Data plane TTL settings apply to every cloud except GCP.
`applyTTLSettings` in `smith-go/data_planes/manifest.go` rejects `ttl`
only for GCP, `crud.go` fixes GCP at 14 and 400 days, and the settings
form shows the TTL fields when the cloud is not GCP
(`DataPlaneSettingsModal.tsx`).
- On AWS, the data plane's `ttlShortDays` and `ttlLongDays` set the
app's `ttl_period_seconds`, the same setting the self-hosted Helm chart
controls (`langsmith-aws-eks-langsmith-composition.tpl`). The S3
lifecycle rules always include the built-in durations from 14 to 400
days, so a workspace's chosen extended duration does not conflict with
the data plane values (`langsmith-aws-blob-composition.tpl`).
- The "Usage configuration" page and "Project & user limits" tab exist
in `smith-frontend`.

## Needs SME review

- **Production SaaS cap.** The docs say 180 days for Cloud. In
langchainplus, `LONGLIVED_TTL_CAP_DAYS=180` appears only in dev and
staging config, and the production value is set outside the repo.
`LONGLIVED_TTL_CAP_ORG_OVERRIDES` also allows a different cap for a
single org. Confirm 180 is right for production, and say whether the
docs should mention contract-specific limits.
- **BYOC data plane TTL.** Please confirm that the AWS data plane TTL
settings described in `byoc-onboarding-aws.mdx` are meant for customers
to change, and not only for LangChain operators. The new section leaves
out the **Enable TTL retention** toggle because I could not confirm what
turning it off does.
- **Azure settings form.** `byoc-onboarding-azure.mdx` says the settings
form in the UI supports AWS maintenance windows only. The source shows
the TTL fields for every cloud except GCP, so that line may be out of
date. This PR does not change it.

## Related

- #7510 (open) edits the same lines in `data-purging-compliance.mdx`.
Whichever PR merges second needs a rebase. When #7510 rebases, it should
say that per-project extended retention is not supported on BYOC data
planes (`cap.py` rejects it).

Prepared with Claude Code.
…ntion-docs

# Conflicts:
#	src/langsmith/data-purging-compliance.mdx
…ntion-docs

# Conflicts:
#	src/langsmith/data-purging-compliance.mdx
Resolve the conflict with #7801 in data-purging-compliance.mdx by keeping the
project-level retention subsection before the new "Disable extended trace
retention" section, and note that the workspace restriction also overrides
project-level extended periods.
@github-actions

Copy link
Copy Markdown
Contributor

Mintlify preview branch generated: preview-raph-per-project-retenti-0057b7c4

Site preview: https://langchain-5e9cc07a-preview-raph-per-project-retenti-0057b7c4.mintlify.site

Important

Preview links may take a few minutes to start working while the deployment finishes.

Changed documentation pages (preview deep links):

@emil-lc

Copy link
Copy Markdown
Contributor

5. Plan tier: Workspace-level retention on self-hosted requires an Enterprise plan (self-host-ttl.mdx:9). Does per-project retention need it too?

Not at the moment, though this does make thigs a bit inconsistent.

This was fixed in the meantime.

@emil-lc
Emil F (emil-lc) merged commit 4ad6c89 into main Nov 27, 2026
28 checks passed
@emil-lc
Emil F (emil-lc) deleted the raph/per-project-retention-docs branch November 27, 2026 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal langsmith For docs changes to LangSmith

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants