File tree Expand file tree Collapse file tree 2 files changed +36
-1
lines changed
src/software/aws/toolkits/jetbrains/core/experiments Expand file tree Collapse file tree 2 files changed +36
-1
lines changed Original file line number Diff line number Diff line change 1
1
{
2
- "types" : [],
2
+ "types" : [
3
+ {
4
+ "name" : " experimentState" ,
5
+ "type" : " string" ,
6
+ "allowedValues" : [" activated" , " deactivated" ],
7
+ "description" : " The experiment action taken action taken"
8
+ },
9
+ {
10
+ "name" : " experimentId" ,
11
+ "type" : " string" ,
12
+ "description" : " The id of the experiment being activated or deactivated"
13
+ }
14
+ ],
3
15
"metrics" : [
4
16
{
5
17
"name" : " aws_openLocalTerminal" ,
9
21
"type" : " result"
10
22
}
11
23
]
24
+ },
25
+ {
26
+ "name" : " aws_experimentActivation" ,
27
+ "description" : " An experiment was activated or deactivated in the toolkit" ,
28
+ "metadata" : [
29
+ {
30
+ "type" : " experimentId"
31
+ },
32
+ {
33
+ "type" : " experimentState"
34
+ }
35
+ ]
12
36
}
13
37
]
14
38
}
Original file line number Diff line number Diff line change @@ -11,6 +11,9 @@ import com.intellij.openapi.components.service
11
11
import com.intellij.openapi.extensions.ExtensionPointName
12
12
import com.intellij.util.xmlb.annotations.Property
13
13
import software.aws.toolkits.jetbrains.AwsToolkit
14
+ import software.aws.toolkits.telemetry.AwsTelemetry
15
+ import software.aws.toolkits.telemetry.ExperimentState.Activated
16
+ import software.aws.toolkits.telemetry.ExperimentState.Deactivated
14
17
15
18
/* *
16
19
* Used to control the state of an experimental feature.
@@ -60,6 +63,14 @@ internal class ToolkitExperimentManager : PersistentStateComponent<ExperimentSta
60
63
} else {
61
64
enabledState[experiment.id] = enabled
62
65
}
66
+ AwsTelemetry .experimentActivation(
67
+ experimentId = experiment.id,
68
+ experimentState = if (enabled) {
69
+ Activated
70
+ } else {
71
+ Deactivated
72
+ }
73
+ )
63
74
}
64
75
65
76
override fun getState (): ExperimentState = ExperimentState ().apply { value.putAll(enabledState) }
You can’t perform that action at this time.
0 commit comments