Repository navigation
Conversation
vinibrsl
marked this pull request as draft
November 26, 2026 17:14
Controllers set the plausible.tool trace attribute, so requests that failed authorization had no tool. The router now sets a :tool assign on POST /api/v2/query and GET /api/v1/sites. AuthorizePublicAPI adds it to the trace before the access checks. The request log will read the same assign.
The request log now stores the :tool assign that the router sets: query_stats for POST /api/v2/query and list_sites for GET /api/v1/sites. Other routes store an empty string. Needs the tool column from #6932 deployed first.
vinibrsl
force-pushed
the
record-api-request-site-id
branch
from
November 26, 2026 17:16
7e9adb5 to
3a66de3
Compare
vinibrsl
force-pushed
the
record-api-request-tool
branch
5 times, most recently
from
November 26, 2026 19:50
abac820 to
e687e86
Compare
vinibrsl
force-pushed
the
record-api-request-tool
branch
3 times, most recently
from
November 26, 2026 20:07
c7ea372 to
f9ed199
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
The API request log does not record which tool a request used. This PR records the tool of REST requests. A REST endpoint and an MCP tool that do the same thing share one name, so
POST /api/v2/queryisquery_statsandGET /api/v1/sitesislist_sites.:toolassign on these two routes.AuthorizePublicAPIadds it to the trace before the access checks, so a request that fails authorization still hasplausible.tool. The controllers no longer set it.POST /api/docs/queryno longer traces a tool.:tool, or''when the request did not use a tool.MCP requests are not recorded yet. That comes in a later PR.
Depends on #6931.
Tests
Changelog
Documentation
Dark mode