Frames tool calls leave no tool name in traces or the audit log

オープン
#119 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
1〜2日
初心者へのやさしさ
55/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
go

調査の方向性

Start with internal/frames/framesmcp/server.go and the tracing setup in internal/telemetry/telemetry.go; compare the call flow with connector audit recording in internal/connectors/broker/record.go. Add tracing for the Frames tool call and preserve trace context in the Frames leg; the issue leaves the audit policy question open. Done when traces identify the tool and show the Frames call timing, with an audit decision documented.

索引モデルが issue の本文から書いたものです。

説明

On the powershift demo cluster I proved that Home chat answers from a Frame, and the only part I couldn't show from the platform side was which Frames tool ran. Tempo has one span per call, POST /frames/mcp from service javo, status 200, and nothing under it. The gateway log has agent_token.issued with service: frames and nothing after. To show get_frame ran I had to fall back to the agent's own screen.

Connector calls don't have this gap. The broker writes a connector.call audit row per call with the tool, mode, outcome and policy decision (internal/connectors/broker/record.go:43, auditRow at :89). Frames calls go through framesmcp and write nothing on success.

What I see on main (e493830):

  • The only span is the server span from otelhttp.NewHandler(h, "javo", ...) (internal/telemetry/telemetry.go:65), named for the route, so every Frames call looks the same.
  • forward reads the tool name from req.Params.Name (internal/frames/framesmcp/server.go:102) but doesn't put it anywhere.
  • The Frames leg runs on context.WithTimeout(context.Background(), ...) (server.go:124). The comment explains why the request's values are dropped. A side effect is that the trace context goes with them, and the transport isn't instrumented anyway, so the call to Frames has no span of its own and Frames' latency can't be told apart from ours.

We should:

  1. Add the tool name to the span, as an attribute on the server span or on a child span around session.CallTool, which is the better fit since it also gives the Frames leg its own timing.
  2. Carry the span context into leg without the other request values, e.g. trace.ContextWithSpanContext(context.Background(), trace.SpanContextFromContext(ctx)).

We need to work out whether Frames reads should also get an audit row the way connector reads do. They're read-only and the Frames token is the person's own, so maybe not, but today there's no record of which Frames an agent read on whose behalf.

主要言語
Go
スター
5
フォーク
0
平均マージ
21時間 13分
マージ済み PR(30日)
53

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

nebari-dev/tapas のほかの issue

nebari-dev/tapas の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。