@@ -10,6 +10,7 @@ import ConfigStore from 'sentry/stores/configStore';
1010import { space } from 'sentry/styles/space' ;
1111import type { Organization } from 'sentry/types/organization' ;
1212import { trackAnalytics } from 'sentry/utils/analytics' ;
13+ import { useFeedbackForm } from 'sentry/utils/useFeedbackForm' ;
1314import type { Incident } from 'sentry/views/alerts/types' ;
1415
1516interface AnomalyDetectionFeedbackProps {
@@ -24,6 +25,7 @@ export default function AnomalyDetectionFeedbackBanner({
2425 selectedIncident,
2526} : AnomalyDetectionFeedbackProps ) {
2627 const [ isSubmitted , submit ] = useDismissable ( id ) ;
28+ const openFeedbackForm = useFeedbackForm ( ) ;
2729
2830 const handleClick = useCallback (
2931 ( anomalyCorrectlyIdentified : boolean ) => {
@@ -50,6 +52,15 @@ export default function AnomalyDetectionFeedbackBanner({
5052 level : 'info' ,
5153 message : 'Anomaly Detection Alerts Banner Feedback' ,
5254 } ) ;
55+ if ( ! anomalyCorrectlyIdentified && openFeedbackForm ) {
56+ openFeedbackForm ( {
57+ messagePlaceholder : t ( 'Why was this anomaly incorrect?' ) ,
58+ tags : {
59+ [ 'feedback.source' ] : 'anomaly_detection_false_positive' ,
60+ [ 'feedback.owner' ] : 'ml-ai' ,
61+ } ,
62+ } ) ;
63+ }
5364 submit ( ) ;
5465 } ,
5566 [
@@ -61,6 +72,7 @@ export default function AnomalyDetectionFeedbackBanner({
6172 selectedIncident . alertRule . thresholdType ,
6273 selectedIncident . alertRule . timeWindow ,
6374 submit ,
75+ openFeedbackForm ,
6476 ]
6577 ) ;
6678
0 commit comments