---
type: study
created: 2026-08-11
updated: 2026-08-11
sensitivity: standard
status: verified
tags: [langchain, langsmith, billing, retention, export, privacy]
topic: LangSmith 计费、数据留存、导出、隐私与支持操作
sources:
  - "https://docs.langchain.com/langsmith/billing"
  - "https://docs.langchain.com/langsmith/data-export"
  - "https://docs.langchain.com/langsmith/data-export-destinations"
  - "https://docs.langchain.com/langsmith/data-export-downstream"
  - "https://docs.langchain.com/langsmith/data-export-monitor"
  - "https://docs.langchain.com/langsmith/data-purging-compliance"
  - "https://docs.langchain.com/langsmith/data-storage-and-privacy"
  - "https://docs.langchain.com/langsmith/endpoint-deprecation"
  - "https://docs.langchain.com/langsmith/pricing-plans"
  - "https://docs.langchain.com/langsmith/redact-secrets"
  - "https://docs.langchain.com/langsmith/run-data-format"
  - "https://docs.langchain.com/langsmith/script-delete-traces"
  - "https://docs.langchain.com/langsmith/script-generate-clickhouse-stats"
  - "https://docs.langchain.com/langsmith/script-generate-query-stats"
  - "https://docs.langchain.com/langsmith/script-running-ch-support-queries"
  - "https://docs.langchain.com/langsmith/script-running-pg-support-queries"
  - "https://docs.langchain.com/langsmith/self-host-organization-charts"
  - "https://docs.langchain.com/langsmith/usage-and-billing"
  - "https://docs.langchain.com/langsmith/view-usage"
  - "https://docs.langchain.com/langsmith/webhooks"
last_verified: 2026-08-11
---

# 计费、留存、导出、隐私与支持操作

## 定价只记录模型，不冻结价格

`pricing-plans` 当前 307 重定向到动态 `langchain.com/pricing`，不是静态文档页。2026-08-11 页面显示：Developer $0/seat/月并含 5k base traces；Plus $39/seat/月并含 10k base traces与一个 Small Serverless；Enterprise 自定义定价；LCU $1.50、LSU $1.00。所有金额、免费额度、地区和 entitlement 在采购/容量决策前必须重新看实时页面与合同。

当前动态 Pricing FAQ 写 Sandboxes 仅 SaaS Cloud，而 Self-hosted 安装文档已提供 AWS/GCP Sandboxes enable 流程，存在文档/商业可用性边界差异。以 license entitlement、区域和客户团队书面确认为准。

## Retention 与成本

| Tier | 默认保留 | 典型用途 |
| --- | --- | --- |
| Base | 14 天 | 大量短期调试 Trace |
| Extended | 400 天 | 有反馈、评估、审计价值的 Trace |

Enterprise 可在 Workspace 自定义 Extended 周期（上限 400 天）。Retention 改动通常只作用于新 Trace，旧 Trace 保持创建时 tier。

以下动作可能把 Base 自动升级为 Extended 并增加费用：API/SDK feedback 显式要求延长、启用 retention 的 online evaluator、匹配的 automation rule。UI note、手工 annotation queue 默认不会升级。计划成本时要把 evaluator/rule 引发的升级计算进去。

Usage limit 是保护阈值，不是强一致计费事务；扩展留存、延迟入账和并发写入可能使最终数据略超。429 应按 `Retry-After` + exponential backoff/jitter，不能无界重试。

## Trace 数据格式

Run/Span 的关键字段包括 UUID、name、inputs、outputs、run_type、start/end、error、extra、parent_run_id、trace_id 与 `dotted_order`。`dotted_order` 编码 Trace 树顺序，可用于稳定重建父子顺序；不能仅按 start_time 排序。

导出、Webhook 与下游仓库都应 schema-versioned，并把新增字段视为兼容扩展。Input/output 可能是对象存储预签名 URL，而不是内联数据。

## Bulk Export

Bulk Export 把指定 Project/时间范围的 Trace 以 Parquet 写入 S3/S3-compatible destination，可供 BigQuery、Snowflake、Redshift、ClickHouse、DuckDB 使用。

- 2026-08-03 后注册客户仅 Enterprise 可用；更早客户的 Plus 过渡期到 2027-02-01。
- Job 最长 72 小时，有自动 retry、并发/速率限制和可恢复进度。
- Destination 支持 AWS S3、GCS S3 compatibility、MinIO 等；只授予目标 prefix 的 list/write 权限。
- Credential rotation 可原地更新 destination，但要在旧凭据撤销前验证新凭据写入。
- Self-hosted 可调整 export concurrency/payload，必须结合对象存储限流与数据库读负载。
- Self-hosted v0.16 的新 export 默认 compression 是 `zstandard`；下游 reader 需先验证兼容。

Recurring Export 应有水位线、重复分区幂等和 late-arrival 策略。Parquet 成功落桶不表示下游已消费，需分开监控 export、object、warehouse load。

## 隐私与脱敏

- `langgraph dev` 把本地状态写 `.langgraph_api`；除 CLI analytics、显式 tracing 或 Graph 自己调用外，数据留在机器。
- `langgraph up` 使用本地 PostgreSQL/Redis；license/usage 检查仍可能出站。
- Studio UI 从浏览器直接连接 Agent Server，本身不持久化私有会话，但浏览器、Trace 开关和 Agent 外部调用仍是数据路径。
- CLI analytics 可用 `LANGGRAPH_CLI_NO_ANALYTICS=1` 关闭；Agent tracing 可用 `LANGSMITH_TRACING=false` 或条件 tracing。

SDK anonymizer 在发送前对 JSON input/output 做正则或函数脱敏；支持 Python 0.1.81+、TS 0.1.33+。完全隐藏用 `LANGSMITH_HIDE_INPUTS/OUTPUTS`。正则脱敏需用真实嵌套、编码与分片样本测试，不能承诺捕获所有 Secret/PII。

## 删除与合规

Cloud 可按 retention 自动清理并删除指定 Trace/Example；Example hard delete 是两步流程。删除 SLA 要区分 soft delete、hard delete、备份过期与下游 Export 副本。

旧 self-host Trace 删除脚本会直接操作 ClickHouse 多个 materialized view、runs 与 feedback table。大批量删除可能引起 mutation/merge、磁盘和服务中断。执行前停写/限流、备份、精确 ID 清单与分批演练，执行后验证各视图和 Blob。

## 支持与诊断脚本

ClickHouse stats、query stats、ClickHouse/PostgreSQL support query 会生成 CSV 或运行 SQL，可能包含组织、Workspace、Query、主机与用量信息。使用 Secret Manager 注入连接串，禁止写入 shell history；输出分享前按组织政策脱敏。

在线 Self-hosted 0.9.5+ 可在 UI 看 Organization/Workspace Trace count；offline 或需要详细历史时可走 PostgreSQL support query。统计口径要标注 root trace、run/event、数据延迟和 billing period，不能混用。

## Rule Webhook

Automation Rule 匹配新 Run 后 POST `rule_id`、时间窗口、runs、feedback stats 等。安全要求：HTTPS、secret/signature、自定义 header、固定 allowlist、幂等去重、短超时异步处理。若要求 evaluator 先完成，必须配置相应执行顺序，而不是假设 Webhook 自然晚于评估。

## API Deprecation

Cloud endpoint 从公告到移除至少 6 个月；Self-hosted 至少跨一个 major。Deprecated endpoint 会返回 `Deprecation`/`Sunset` header；Cloud 临近移除可能逐步限速/注入错误以暴露遗留调用。网关与 SDK telemetry 应持续采集这些 header，不能等生产报错再迁移。

