Skip to content

Commit b4f68c1

Browse files
authored
ref(feedback): remove spam detection logs - replaced by redash (#82071)
We're logging this on every feedback, from projects with spam detection enabled (enabled by default). Table at the bottom of https://redash.getsentry.net/dashboards/301-user-feedback-spam-activity?p_interval=2%20weeks can be used in place of this
1 parent 3ee8e59 commit b4f68c1

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

src/sentry/feedback/usecases/spam_detection.py

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -34,27 +34,18 @@ def make_input_prompt(message: str):
3434

3535
@metrics.wraps("feedback.spam_detection", sample_rate=1.0)
3636
def is_spam(message: str):
37-
is_spam = False
38-
trimmed_response = ""
37+
labeled_spam = False
38+
_trimmed_response = ""
3939
response = complete_prompt(
4040
usecase=LLMUseCase.SPAM_DETECTION,
4141
message=make_input_prompt(message),
4242
temperature=0,
4343
max_output_tokens=20,
4444
)
4545
if response:
46-
is_spam, trimmed_response = trim_response(response)
47-
48-
logger.info(
49-
"Spam detection",
50-
extra={
51-
"feedback_message": message,
52-
"is_spam": is_spam,
53-
"response": response,
54-
"trimmed_response": trimmed_response,
55-
},
56-
)
57-
return is_spam
46+
labeled_spam, _trimmed_response = trim_response(response)
47+
48+
return labeled_spam
5849

5950

6051
def trim_response(text):

0 commit comments

Comments
 (0)