Adapted statistics logging to new FUS API. Removed Context usage.

This commit is contained in:
Anton Yalyshev
2019-02-12 11:30:27 +03:00
parent 77d7b8fa1d
commit 2ccc79b536
3 changed files with 7 additions and 8 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
versions.intellijSdk=191.4738.6
versions.intellijSdk=191.5109.14
versions.androidBuildTools=r23.0.1
versions.idea.NodeJS=181.3494.12
versions.jar.asm-all=7.0
+1 -1
View File
@@ -13,7 +13,7 @@ The Kotlin plugin provides language support in IntelliJ IDEA and Android Studio.
<version>@snapshot@</version>
<vendor url="http://www.jetbrains.com">JetBrains</vendor>
<idea-version since-build="191.4738.6" until-build="192.*"/>
<idea-version since-build="191.5109.14" until-build="192.*"/>
<depends>com.intellij.modules.platform</depends>
@@ -5,19 +5,18 @@
package org.jetbrains.kotlin.idea.statistics
import com.intellij.internal.statistic.service.fus.collectors.FUCounterUsageLogger;
import com.intellij.internal.statistic.eventLog.FeatureUsageData;
import com.intellij.internal.statistic.service.fus.collectors.FUSUsageContext
import com.intellij.internal.statistic.service.fus.collectors.FUCounterUsageLogger
import com.intellij.internal.statistic.eventLog.FeatureUsageData
import org.jetbrains.kotlin.idea.KotlinPluginUtil
open class KotlinStatisticsTrigger {
companion object {
private val VERSION = KotlinPluginUtil.getPluginVersion()
private val context = FeatureUsageData().addData("plugin_version", VERSION)
public fun trigger(trigger: KotlinEventTrigger, event: String) {
val context = FeatureUsageData().addFeatureContext(FUSUsageContext.create(VERSION));
FUCounterUsageLogger.getInstance().logEvent(trigger.GROUP_ID, event, context);
fun trigger(trigger: KotlinEventTrigger, event: String) {
FUCounterUsageLogger.getInstance().logEvent(trigger.GROUP_ID, event, context)
}
}
}