Skip to content

feat(telemetry): add local trace docs#705

Open
lizradway wants to merge 1 commit intostrands-agents:mainfrom
lizradway:lizradway/ts-pr620-docs
Open

feat(telemetry): add local trace docs#705
lizradway wants to merge 1 commit intostrands-agents:mainfrom
lizradway:lizradway/ts-pr620-docs

Conversation

@lizradway
Copy link
Member

Description

Adds TypeScript documentation for the AgentTrace local execution traces feature introduced in strands-agents/sdk-typescript#620.

Changes:

  • Added a new "Local Execution Traces" section to metrics.mdx with Python and TypeScript tabs, documenting the AgentTrace class, its structure (name, duration, children, metadata, message), and how to access traces via result.traces
  • Added a local_traces code snippet to metrics.ts showing how to iterate over traces, access child traces, and read tool metadata
  • Updated the TypeScript quickstart to replace the "(coming soon)" observability placeholder with links to the metrics and local traces documentation

Related Issues

strands-agents/sdk-typescript#620
strands-agents/sdk-typescript#610

Type of Change

  • New content

Checklist

  • I have read the CONTRIBUTING document
  • My changes follow the project's documentation style
  • I have tested the documentation locally using npm run dev
  • Links in the documentation are valid and working

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 24, 2026

Documentation Preview Ready

Your documentation preview has been successfully deployed!

Preview URL: https://d3ehv1nix5p99z.cloudfront.net/pr-cms-705/docs/user-guide/quickstart/overview/

Updated at: 2026-03-25T15:28:47.448Z

@github-actions
Copy link
Contributor

Documentation Preview Failed

The documentation deployment encountered an error. Please check the deployment logs for more details.

@github-actions
Copy link
Contributor

Review: Approve ✅

Assessment: Approve

This PR adds clear, well-structured documentation for the TypeScript AgentTrace local execution traces feature introduced in sdk-typescript#620.

Review Summary

What's Good:

  • Proper use of Python/TypeScript tabs following project conventions
  • Correctly documents the difference in duration units (Python: seconds, TypeScript: milliseconds)
  • Snippet markers are properly formatted and the code follows project patterns (function scoping)
  • Quickstart update replaces placeholder text with actual documentation links
  • Accurate description of AgentTrace properties and access patterns

Minor Observation:

  • The TypeScript code example is simpler than the Python equivalent (just JSON.stringify(result.traces)). A slightly expanded example showing iteration through traces could help users understand the hierarchical structure, but this is purely optional.

Documentation looks accurate and ready to merge once CI passes. Nice work on the cross-language coverage! 👍

@lizradway lizradway force-pushed the lizradway/ts-pr620-docs branch from 60405d9 to 6c5b1bd Compare March 25, 2026 15:24
@lizradway lizradway marked this pull request as ready for review March 25, 2026 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant