Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Conversation

@nattsw
Copy link
Contributor

@nattsw nattsw commented Jan 21, 2025

This should give us a better idea on how our scanner is faring across sites.

# HELP discourse_discourse_ai_spam_detection AI spam scanning statistics
# TYPE discourse_discourse_ai_spam_detection counter
discourse_discourse_ai_spam_detection{db="default",type="scanned"} 16
discourse_discourse_ai_spam_detection{db="default",type="is_spam"} 7
discourse_discourse_ai_spam_detection{db="default",type="false_positive"} 1
discourse_discourse_ai_spam_detection{db="default",type="false_negative"} 2

Note: I considered using DiscoursePluginRegistry.register_global_collector but due to the implementation, it seems to only work well with Gauge-type collectors that emit the value directly in collect.

@nattsw nattsw requested a review from romanrizzi January 21, 2025 08:23
Copy link
Member

@romanrizzi romanrizzi left a comment

Choose a reason for hiding this comment

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

Looks good to me! Suggested a change to fix CI

@nattsw nattsw merged commit fe44d78 into main Jan 27, 2025
6 checks passed
@nattsw nattsw deleted the ai-spam-metric branch January 27, 2025 03:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants