Skip to content

Commit 70989e3

Browse files
committed
limit telemetry
1 parent 9b4a7ae commit 70989e3

File tree

1 file changed

+41
-3
lines changed

1 file changed

+41
-3
lines changed

src/telemetry.ts

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@ const samplingConfigs: EventSamplingConfig[] = [
2020
eventName: "build",
2121
samplingFactor: 0.004,
2222
},
23+
{
24+
eventName: "build_error",
25+
samplingFactor: 0.1,
26+
},
27+
{
28+
eventName: "test_controller_resolve_error",
29+
samplingFactor: 0.01,
30+
},
2331
{
2432
eventName: "dialyzer",
2533
samplingFactor: 0.04,
@@ -28,7 +36,7 @@ const samplingConfigs: EventSamplingConfig[] = [
2836
eventName: "lsp_request",
2937
propertyKey: "elixir_ls.lsp_command",
3038
propertyValue: "textDocument_foldingRange",
31-
samplingFactor: 0.001,
39+
samplingFactor: 0.0002,
3240
},
3341
{
3442
eventName: "lsp_request",
@@ -40,7 +48,7 @@ const samplingConfigs: EventSamplingConfig[] = [
4048
eventName: "lsp_request",
4149
propertyKey: "elixir_ls.lsp_command",
4250
propertyValue: "textDocument_codeAction",
43-
samplingFactor: 0.002,
51+
samplingFactor: 0.0002,
4452
},
4553
{
4654
eventName: "lsp_request",
@@ -52,7 +60,13 @@ const samplingConfigs: EventSamplingConfig[] = [
5260
eventName: "lsp_request",
5361
propertyKey: "elixir_ls.lsp_command",
5462
propertyValue: "textDocument_documentSymbol",
55-
samplingFactor: 0.002,
63+
samplingFactor: 0.0005,
64+
},
65+
{
66+
eventName: "lsp_request",
67+
propertyKey: "elixir_ls.lsp_command",
68+
propertyValue: "workspace_symbol",
69+
samplingFactor: 0.02,
5670
},
5771
{
5872
eventName: "lsp_request",
@@ -96,6 +110,30 @@ const samplingConfigs: EventSamplingConfig[] = [
96110
propertyValue: "initialize",
97111
samplingFactor: 0.03,
98112
},
113+
{
114+
eventName: "dap_request",
115+
propertyKey: "elixir_ls.dap_command",
116+
propertyValue: "threads",
117+
samplingFactor: 0.05,
118+
},
119+
{
120+
eventName: "dap_request",
121+
propertyKey: "elixir_ls.dap_command",
122+
propertyValue: "initialize",
123+
samplingFactor: 0.2,
124+
},
125+
{
126+
eventName: "dap_request",
127+
propertyKey: "elixir_ls.dap_command",
128+
propertyValue: "launch",
129+
samplingFactor: 0.2,
130+
},
131+
{
132+
eventName: "dap_request",
133+
propertyKey: "elixir_ls.dap_command",
134+
propertyValue: "disconnect",
135+
samplingFactor: 0.2,
136+
},
99137
];
100138

101139
function shouldSampleEvent(

0 commit comments

Comments
 (0)