Instrument LangGraph Platform thread-controller execution
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 28/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- observability, testing
調査の方向性
runs.wait と runs.stream の既存のインストルメンテーションから始め、次にコントローラーのエントリポイントである client.threads.stream(...), thread.run.start(options), thread.input.respond(...)、および client.threads.joinStream(...) を調査します。要求された real-SDK のエンドツーエンドケースを最初のテスト対象として使用します。完了の条件は、サポート対象の API と span のライフタイムが文書化され、すべての受け入れシナリオに合格し、反復、同時実行、ラップ、自動、無効の各モードでアプリケーションの動作が維持されることです。
索引モデルが issue の本文から書いたものです。
説明
Follow-up to https://github.com/braintrustdata/braintrust-sdk-javascript/issues/2199.
Thread-controller execution was explicitly deferred from #2199. The current implementation intentionally instruments only runs.wait and runs.stream, where execution and result consumption belong to one call.
Scope
Add instrumentation for the controller returned by client.threads.stream(...), starting with thread.run.start(options). Evaluate continuation and reattachment APIs, including thread.input.respond(...) and client.threads.joinStream(...), and explicitly document which are supported.
Controller construction does not execute an agent. A run.start() acknowledgement can arrive before execution completes, so tracing must distinguish controller setup, submission, and the run's actual lifecycle.
Implementation considerations
- In the inspected SDK versions (1.9.25 and 1.10.2), a controller's
outputpromise is cached across runs. Do not let a previous run's settled promise prematurely finish a later run's span. - Prefer public lifecycle observations and normal typed-channel instrumentation. Avoid opening extra subscriptions or consuming streams solely for tracing when existing events suffice.
- Define correlation when a controller observes an execution started elsewhere, as well as behavior across reconnection and repeated runs.
- Keep remote model/tool internals distinct from client-side execution observations; do not invent spans for unobserved work.
Acceptance criteria
- Provide automatic and explicit instrumentation with shared extraction logic and stable task-span names.
- Capture each supported run's input, final state, errors, available usage, and streaming timing; use allowlisted metadata.
- End spans correctly on completion, failure, interruption, and controller closure. Preserve cancellation, promise/controller identity, and private-field receivers.
- Ensure repeated runs, teardown/re-enabling, and wrapper-plus-hook usage do not duplicate spans, mix contexts, leak listeners, or change application behavior.
- Add real-SDK e2e tests for multiple runs on one controller, independent concurrent controllers, acknowledgement before completion, failures, interruptions, closure, and supported continuation/reattachment behavior.
- Cover pinned and separately named latest SDK aliases, ESM/CommonJS, and wrapped/automatic/combined/disabled modes. Assert paired span-tree snapshots, update the CI summary, and verify three consecutive replay runs.
- Document the supported controller APIs and span lifetimes.
- 主要言語
- TypeScript
- スター
- 27
- フォーク
- 13
- 平均マージ
- 2日 20時間
- マージ済み PR(30日)
- 66
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
braintrustdata/braintrust-sdk-javascript のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 65/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 56/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 68/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 58/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
braintrustdata/braintrust-sdk-javascript の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
bcgov/bc-wallet-mobile#4761 · コメント 1 件 ·
-
external-issue to-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
area-deployment area-integrations triage:bot-seen
難易度 2/5 半日 初心者へのやさしさ 86/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
refactor
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100