Skip to content

ref(feedback): add a tag for whether spam detection was applied #97452

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

aliu39
Copy link
Member

@aliu39 aliu39 commented Aug 8, 2025

Named it has_spam_filter so it'll appear under has_linked_error - another tag we attach.
Relates to REPLAY-602: [User Feedback] Unhelpful feedback and profanity should be detected as spam

@aliu39 aliu39 requested a review from a team as a code owner August 8, 2025 00:11
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Aug 8, 2025
Copy link

linear bot commented Aug 8, 2025

Copy link

codecov bot commented Aug 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #97452   +/-   ##
=======================================
  Coverage   80.58%   80.58%           
=======================================
  Files        8557     8557           
  Lines      376461   376462    +1     
  Branches    24468    24468           
=======================================
+ Hits       303369   303382   +13     
+ Misses      72722    72710   -12     
  Partials      370      370           

Comment on lines +383 to +384
event_fixed["tags"]["has_spam_filter"] = "true" if is_message_spam is not None else "false"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be clear, the is_mesage_spam value is currently also added to evidenceData on line ~70 in this same file:

if is_message_spam is True:
evidence_data["is_spam"] = is_message_spam # Used by alerts post process.
evidence_display.append(
IssueEvidence(name="is_spam", value=str(is_message_spam), important=False)
)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tbh, i think we could do better if we unconditionally recorded whether spam detection was even executed. Projects have a setting where that can be disabled, so for each feedback we could say "spam detected: disabled" OR "spam detection: enabled, is_spam: Nope"

and put the pair into context, instead of tags

@@ -380,6 +380,8 @@ def create_feedback_issue(
if event_fixed.get("release"):
event_fixed["tags"]["release"] = event_fixed["release"]

event_fixed["tags"]["has_spam_filter"] = "true" if is_message_spam is not None else "false"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please prefix sentry tags with sentry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants