Skip to content

Guide users to v2 data APIs#2971

Merged
maxdeichmann merged 21 commits into
mainfrom
codex/v2-data-api-docs
May 20, 2026
Merged

Guide users to v2 data APIs#2971
maxdeichmann merged 21 commits into
mainfrom
codex/v2-data-api-docs

Conversation

@maxdeichmann

@maxdeichmann maxdeichmann commented May 19, 2026

Copy link
Copy Markdown
Member

Summary

  • Fold the v2 upgrade path into the resource-specific docs instead of keeping a standalone migration page.
  • Make Observations API v2 and Metrics API v2 the default adoption path across the API & Data Platform overview, Public API, SDK query docs, Observations API docs, Metrics API docs, and the 524 FAQ.
  • Keep older trace, observation, and metrics read APIs available in the docs, but describe them as not recommended for new extraction workflows because they are less performant at scale.

Why

Users should be guided toward the more performant v2 APIs for new data extraction workflows while existing older API integrations remain available. First-time users now land directly on Observations API v2 for row-level data or Metrics API v2 for aggregates. Existing SDK/API users get upgrade notes in the pages where they already look for the relevant resource.

Validation

  • git diff --check passed.
  • pnpm dlx prettier@3.8.3 --experimental-cli --check ... passed for the touched docs files.
  • PR CI passed: format, check_h1, build-and-check-links, check-sitemap-links, Vercel, CodeQL, bundle analysis, and all-checks-pass.

@vercel

vercel Bot commented May 19, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
langfuse-docs Ready Ready Preview, Comment May 19, 2026 9:28pm

Request Review

@maxdeichmann maxdeichmann changed the title [codex] Guide users to v2 data APIs Guide users to v2 data APIs May 19, 2026
@dosubot dosubot Bot added the documentation Improvements or additions to documentation label May 19, 2026
@github-actions

Copy link
Copy Markdown

@claude review

Comment thread content/docs/api-and-data-platform/features/observations-api.mdx Outdated
Comment thread content/docs/metrics/features/metrics-api.mdx
Comment thread content/docs/api-and-data-platform/features/observations-api.mdx Outdated
Comment thread content/docs/api-and-data-platform/features/query-via-sdk.mdx
Comment thread content/docs/metrics/features/metrics-api.mdx
Comment thread content/docs/api-and-data-platform/features/observations-api.mdx
Comment thread content/docs/metrics/features/metrics-api.mdx
Comment thread content/docs/api-and-data-platform/overview.mdx
Comment thread content/docs/metrics/features/metrics-api.mdx
Comment thread content/docs/api-and-data-platform/features/public-api.mdx Outdated
Comment thread content/faq/all/api-524-http-errors.mdx
@maxdeichmann maxdeichmann added this pull request to the merge queue May 19, 2026
@dosubot dosubot Bot added the auto-merge This PR is set to be merged label May 19, 2026

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Substantive prior review feedback has been addressed across all six files; only a trivial duplicate-code-block nit remains.

Extended reasoning...

Overview

Docs-only PR steering users from v1 trace/observation/metrics read APIs to the v2 data APIs across six files: observations-api.mdx, metrics-api.mdx, public-api.mdx, query-via-sdk.mdx, the API & Data Platform overview, and the 524 FAQ. No code, no schema, no auth changes.

Security risks

None. This is documentation content — no runtime behavior, no secrets, no auth surfaces.

Level of scrutiny

Lower than usual for a doc-only PR, but I applied close scrutiny here because the new headline migration table is copy-pasteable URL guidance — incorrect parameter names would lead to silent data truncation in production billing/dashboard workflows. That motivated my prior review rounds.

Other factors

The author has substantively addressed every major prior concern across multiple commits:

  • The upgrade table now uses fromStartTime/toStartTime for v2 observations (was the headline 🔴 bug).
  • The v1→v2 metrics migration bullets now explicitly flag that userId/sessionId are filter-only on v2 (🔴), that rowLimit defaults to 100 (🟡), and that observation-view metrics have different semantics than trace-view ones (🔴).
  • Cross-cutting pages (public-api.mdx, overview.mdx) now disclose the Cloud-only restriction (🔴).
  • The SDK callout in query-via-sdk.mdx is back to type="warning" and explicitly notes the v2 aliases were removed in Python SDK v4 / JS/TS SDK v5 (🟡).
  • The Python SDK link in public-api.mdx is reverted to /docs/sdk/python/sdk-v3 (🟡).
  • The trace-level field gap is now called out in the observations-api upgrade section pointing users to Metrics API v2 with view: observations (🟡).
  • Both v2 pages now say data 'can be delayed by up to 10 minutes' (🟡).

The only outstanding finding is a cosmetic nit (duplicate GET /api/public/v2/metrics code block in metrics-api.mdx), which is non-blocking and can be cleaned up in a follow-up. CI is green and the Vercel deployment is ready. Approving.

Comment thread content/docs/metrics/features/metrics-api.mdx
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks May 19, 2026
@dosubot dosubot Bot removed the auto-merge This PR is set to be merged label May 19, 2026
@maxdeichmann maxdeichmann enabled auto-merge May 20, 2026 08:48
@maxdeichmann maxdeichmann added this pull request to the merge queue May 20, 2026
@dosubot dosubot Bot added the auto-merge This PR is set to be merged label May 20, 2026
Merged via the queue into main with commit e83a1fe May 20, 2026
18 checks passed
@maxdeichmann maxdeichmann deleted the codex/v2-data-api-docs branch May 20, 2026 08:52
@dosubot dosubot Bot removed the auto-merge This PR is set to be merged label May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant