Skip to content

docs(api): tracing endpoint docstrings + concept page#4235

Merged
mmabrouk merged 6 commits into
docs/age-3734-api-reference-epicfrom
docs/age-3734-tracing-endpoints
May 13, 2026
Merged

docs(api): tracing endpoint docstrings + concept page#4235
mmabrouk merged 6 commits into
docs/age-3734-api-reference-epicfrom
docs/age-3734-tracing-endpoints

Conversation

@mmabrouk
Copy link
Copy Markdown
Member

Summary

  • Adds docs/docs/reference/api-guide/10-tracing.mdx — concept page (~1000 words) covering: spans and traces, invocation vs annotation trace types, span type taxonomy, references vs OTel links, the four ingestion paths with a decision-tree table, the async 202 contract (intentional, not a bug), the ag.* namespace and both flat / nested wire formats, the ag.unsupported fallback (product commitment to never drop telemetry), and the focus query mode.
  • Adds Field descriptions and handler docstrings across tracing/, traces/, and otlp/ routers and models.
  • Builds on the PR docs(api): reference docs for tracing ingest/query and create-simple-trace endpoints #4174 baseline (which docstring'd ingest_spans, query_spans, create_simple_trace); extends to all the other endpoints and adds the concept page.

Process notes

  • Pre-commit / gitleaks were not available in the sandbox; commit was made with --no-verify. No secrets touched. Hooks should be re-run locally before merge.
  • Agent died on API rate limit before pushing; salvaged from the worktree.

Related

Test plan

  • Endpoints exercised against eu.cloud.agenta.ai
  • Examples obfuscated; shapes match real responses
  • Reviewer: re-run pre-commit hooks locally before merge
  • Reviewer: confirm the references-vs-links framing matches product intent
  • Reviewer: confirm the four-ingestion-path decision tree

- Adds 10-tracing.mdx — concept page covering spans/traces, the
  invocation vs annotation trace types, span types, references vs
  links, the four ingestion paths with a decision tree, the async
  202 contract, the ag.* namespace (both wire formats), the
  ag.unsupported fallback, and the query focus mode.
- Adds Field descriptions across tracing/, traces/, otlp/ models
  and docstrings on every handler beyond the PR #4174 baseline.
@linear
Copy link
Copy Markdown

linear Bot commented Apr 28, 2026

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 28, 2026

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

Project Deployment Actions Updated (UTC)
agenta-documentation Error Error May 13, 2026 7:09pm

Request Review

@mmabrouk mmabrouk changed the base branch from main to docs/age-3734-api-reference-epic May 11, 2026 18:09
Resolves Support-mixin conflicts in three models files
(api/oss/src/apis/fastapi/{otlp,traces,tracing}/models.py) by keeping the
docstrings and Field(description=...) descriptions while adopting the
umbrella's Support base class on the response envelopes.

Reverts auto-generated docs/docs/reference/api/ changes per write-docs §8.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 13, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 5a31eabe-387c-434b-9502-05bc3bdc4c85

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/age-3734-tracing-endpoints

Comment @coderabbitai help to get the list of available commands and usage tips.

mmabrouk added 2 commits May 13, 2026 20:23
Apply the same conceptual frame and writing style used on the
applications, evaluators, workflows, and testsets pages.

- Intro states up front what spans and traces are, and that ag.* is
  what links traces to Agenta entities.
- Section names rephrased to match the verb-first style on the other
  pages: "Trace types" (not "Trace types: annotation vs invocation"),
  "References" (not "References and entity linking"), "Ingestion" (not
  "The four ingestion paths"), "Examples" (not "Worked examples").
- Async write contract becomes a subsection under Ingestion since it
  describes the same write path.
- ag.unsupported fallback becomes a subsection under the ag namespace
  since it documents the namespace's "keep customer telemetry"
  commitment.

Style pass per Williams: concrete subjects, active verbs, no em dashes,
no marketing words. Tighten the AGE-3735 mention to reflect it as
resolved rather than open.
Address all 11 inline comments on PR #4235.

- Rewrite the intro: lead with "Agenta's observability sits on top of
  OTel" and a one-line scope of the page. Then explain what OTel gives
  you (span + trace) and what Agenta adds on top (the ag.* subtree
  used to tag types, link to entities, and surface metrics).
- Link each ingestion endpoint to its API reference page.
- Add an `:::info` at the top of `## Ingestion` saying most callers
  use the SDK and OTel auto-instrumentation; the four endpoints are
  for custom integrations.
- Rename `### Async write contract` -> `### How ingest works`. Drop
  the "contract" framing. Explain plainly: the response is 202 with a
  count/links payload, returned before persistence. Show the response
  shape. Move the "count reflects parse-time only" caveat into a
  `:::warning` block.
- Drop the AGE-3735 mention. Internal issue references don't belong
  in customer docs.
- Connect the adapter behaviour to `ag.unsupported`: when the parser
  can't fit a field, it parks the field under `ag.unsupported.*`.
- Cut the "Two wire formats" framing. Show only the nested form that
  query responses return.
- Compress `ag.unsupported` to "what cases" and "where the data ends
  up", drop the implementation steps.
- Drop the "product commitment" sales sentence.
- Rewrite `## Querying` as two clear endpoint bullets with reference
  links. Drop the focus/spans wrapper detail.

Style pass per Williams: concrete subjects, active verbs, no em dashes.
Self-review pass against the style-editing and write-docs skills.

- Intro: drop "Agenta adds on top" so the page scope list reads cleanly
  and we don't repeat "on top of" in the same paragraph.
- Spans and traces: drop the duplicate "A trace is the set of spans..."
  sentence. The intro already defines a trace. Reframe the SpansTree
  paragraph as "When an endpoint returns a single trace, the payload
  wraps..." and use "wraps" instead of "is" for the verb.
- How ingest works: replace the abstract subject "OTel semantics require"
  with a concrete "This keeps the ingest buffer fast" that ties back to
  the previous sentence.
- Ingest adapter sentence: shorten the long subject ("The adapter that
  parses incoming spans into Agenta's attribute schema") to "Agenta's
  ingest adapter". Fix the parallel ("rather than reject" -> "instead of
  rejecting"). Use "parks" for the action.
- Set an explicit anchor on the `ag.unsupported` heading and update the
  cross-link so it does not depend on slugger behaviour.
- Querying: tighten the lead from "Two endpoints return spans, with
  different shapes:" to "Two endpoints query spans, each returning a
  different shape:".
@mmabrouk mmabrouk marked this pull request as ready for review May 13, 2026 19:08
@mmabrouk mmabrouk merged commit b23be25 into docs/age-3734-api-reference-epic May 13, 2026
14 of 15 checks passed
@dosubot dosubot Bot added size:XXL This PR changes 1000+ lines, ignoring generated files. documentation Improvements or additions to documentation labels May 13, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Railway Preview Environment

Preview URL https://gateway-production-2421.up.railway.app/w
Project agenta-oss-pr-4235
Image tag pr-4235-cb2c0a6
Status Deployed
Railway logs Open logs
Workflow logs View workflow run
Updated at 2026-05-13T19:14:45.691Z

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:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant