Skip to content

feat(traces): tag data-fair requests with x-client: agents#43

Draft
BatLeDev wants to merge 1 commit into
mainfrom
feat-x-client
Draft

feat(traces): tag data-fair requests with x-client: agents#43
BatLeDev wants to merge 1 commit into
mainfrom
feat-x-client

Conversation

@BatLeDev

Copy link
Copy Markdown
Member

Tag the agents service's outgoing data-fair requests with an x-client: agents header so data-fair echoes it back and the metrics daemon attributes them to the AI agent surface (rather than folding them into "Autre").

The evaluator's data-exploration tools are the only place this codebase calls the data-fair API directly — chat tool calls run client-side in the host frame and carry data-fair's own referer — so the header is set on the single shared default ofetch instance, with a unit test covering it.

Why: mirror the consumer side added in metrics' feat-x-client branch, where data-fair allowlists mcp/agents as service clients and re-emits the header for metrics.

The evaluator's data-exploration tools are the only place this codebase
calls the data-fair API directly (server-side tool calls run client-side
in the host frame, so they carry data-fair's own referer instead).

Send an x-client: agents header on the default ofetch instance so
data-fair echoes it back on the response (it allowlists mcp/agents as
service clients) and the metrics daemon attributes these requests to the
AI agent surface rather than folding them into "Autre".

Mirrors the consumer side added in metrics' feat-x-client branch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant