[Grazie] Do not report detected language since suggested languages are pretty enough.
authorVladislav.Tankov <vladislav.tankov@jetbrains.com>
Wed, 12 Aug 2020 15:53:11 +0000 (18:53 +0300)
committerintellij-monorepo-bot <intellij-monorepo-bot-no-reply@jetbrains.com>
Wed, 12 Aug 2020 17:07:11 +0000 (17:07 +0000)
GitOrigin-RevId: 72b7133ee4a63c7fd8810f85b254a23c9917b989

plugins/grazie/src/main/kotlin/com/intellij/grazie/detection/LangDetector.kt
plugins/grazie/src/main/kotlin/com/intellij/grazie/ide/fus/GrazieFUSCounter.kt

index f05e69a0123050f383d740a27cab68233956dc6d..56ad86a1a783415e90adb74916ef80f710c356f8 100644 (file)
@@ -28,8 +28,6 @@ object LangDetector : GrazieStateLifecycle {
 
     if (detected.preferred == Language.UNKNOWN) return null
 
-    GrazieFUSCounter.languageDetected(detected.preferred)
-
     return detected.preferred
   }
 
index 4b3aba120a6e06b362e84269659e33615f80db7d..78827414960f1ca44eec616681c5142215bbd590 100644 (file)
@@ -7,10 +7,6 @@ import com.intellij.internal.statistic.eventLog.FeatureUsageData
 import com.intellij.internal.statistic.service.fus.collectors.FUCounterUsageLogger
 
 internal object GrazieFUSCounter {
-  fun languageDetected(lang: Language) = log("language.detected") {
-    addData("language", lang.iso.toString())
-  }
-
   fun languagesSuggested(languages: Collection<Language>, isEnabled: Boolean) {
     for (language in languages) {
       log("language.suggested") {
@@ -25,11 +21,6 @@ internal object GrazieFUSCounter {
     addData("fixes", typo.fixes.size)
   }
 
-  fun quickfixApplied(ruleId: String, cancelled: Boolean) = log("quickfix.applied") {
-    addData("id", ruleId)
-    addData("cancelled", cancelled)
-  }
-
   private fun log(eventId: String, body: FeatureUsageData.() -> Unit) {
     FUCounterUsageLogger.getInstance().logEvent("grazie.count", eventId, FeatureUsageData().apply(body))
   }