Repository navigation
fix(mcp): Accept equivalent trigger logic in create_alert_rule - #2851
Draft
sentry-junior[bot] wants to merge 1 commit into
Draft
sentry-junior[bot] wants to merge 1 commit into
sentry-junior[bot] wants to merge 1 commit into
Conversation
Sentry creates Alert trigger groups only with logicType 'any-short'. The schema still offered all, any, any-short, and none, and since #2260 dropped the prose rule, agents pick 'any' or 'all' and the tool rejects them. 'any' and a one-condition 'all' match the same events, so they are now saved as 'any-short', which is also the default. Several conditions with 'all' or 'none' still fail, with a message that points filter conditions at actionFilters. Also for new Alerts: - Numeric action targetType values (the legacy ActionTarget enum) are sent as the string names the workflow API validates. - The triggers description says only workflow_trigger conditions belong there; frequency, priority, and attribute conditions go in actionFilters. Sentry rejects them in triggers since getsentry/sentry#129225. - The environment description says the name must already exist. Co-Authored-By: David Cramer <23610+dcramer@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
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.
create_alert_rulerejected trigger logic that Sentry treats as equivalent, and its schema didn't say which conditions belong in triggers. Those two causes make up about 40% of its failed calls.Trigger logic. Sentry only creates trigger groups with
any-short(BaseDataConditionGroupValidator._validate_logic_typein getsentry/sentry). The schema offeredall | any | any-short | none, then rejected everything exceptany-short. The prose rule that steered agents away from the other values was removed in #2260. New Alerts now default toany-short, andanyor a single-conditionallis saved asany-short, because both match the same events. Several conditions withall, or any conditions withnone, are still rejected. The error now says to put conditions that must all match in anactionFiltersgroup.Conditions in the wrong group. Since getsentry/sentry#129225, Sentry rejects action-filter conditions such as
event_frequency_countintriggers. Thetriggersdescription now says to useworkflow_triggertypes and to put frequency, priority, and attribute conditions inactionFilters.targetType. The workflow API takes string target types. New actions now map the legacy numericActionTargetvalues (0–4, as a number or a numeric string) tospecific,user,team,sentry_app, andissue_owners.get_alert_optionsalready lists that mapping in itsinputGuide.Environment. The
environmentdescription now says the name must already exist in the org. Agents often guessproduction.update_alert_ruleuses the same text.Nothing breaks: input that passed before still passes.
update_alert_rulekeeps the fulllogicTypeenum, because Sentry still accepts grandfatheredalltriggers on update.Webhook actions, which users asked for in feedback, are a separate feature and aren't part of this change.
via @dcramer.
--
View Session [Sentry]