Repository navigation
fix(mcp): Send only profiles dataset columns from search_profiles - #2849
Open
sentry-junior[bot] wants to merge 2 commits into
Open
sentry-junior[bot] wants to merge 2 commits into
sentry-junior[bot] wants to merge 2 commits into
Conversation
search_profiles queries the events API with dataset=profiles, which Sentry serves from the transaction profiles dataset (src/sentry/search/events/datasets/profiles.py). Its default fields included profiler.id, thread.id, precise.start_ts, and precise.finish_ts, which that dataset does not have, so every call without explicit fields failed with "400 Unknown field". The query agent's field list and a continuous-profile example taught the same fields. Drop those fields from the defaults, the agent field list, and the examples, and remove the continuous-profile link branch in the profile formatter, since this dataset never returns profiler IDs. The tool description now says it searches transaction profiles. The structured tests now mock the events API the way Sentry answers: any plain field outside the profiles dataset columns gets a 400. Co-Authored-By: David Cramer <23610+dcramer@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📊 MCP Server Token Cost ReportSummary
Per-Tool Breakdown
Note: This measures the static overhead of tool definitions sent to LLM clients with every request. Lower is better. MCP Apps viewsEach
The budget applies to raw bytes, and the view's generator fails over it. |
This branch was successfully 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.
search_profilescalls the events API withdataset=profiles. In getsentry/sentry that dataset is the transaction profiles dataset (src/sentry/search/events/datasets/profiles.py). Itsresolve_columnrejects any column that is not inCOLUMN_MAPwithUnknown field: ….The tool's default fields included
profiler.id,thread.id,precise.start_ts, andprecise.finish_ts. None of them are columns in that dataset, so every call without explicitfieldsreturned400 Unknown field. The query agent's field list and a "continuous profiles for a profiler session" example taught it to pick the same fields. These four errors are the most commonsearch_profilesfailure in production tool spans, and agent feedback reports the same 400s.Changes:
get_profile_detailsstill opens a continuous profile from a profiler ID.via @dcramer.
--
View Session [Sentry]