File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 3232
3333TELEMETRY_URL = 'https://api.agentstack.sh/telemetry'
3434
35- def collect_machine_telemetry ():
35+ def collect_machine_telemetry (command : str ):
3636 if get_telemetry_opt_out ():
3737 return
3838
@@ -43,10 +43,14 @@ def collect_machine_telemetry():
4343 'os_version' : platform .version (),
4444 'cpu_count' : psutil .cpu_count (logical = True ),
4545 'memory' : psutil .virtual_memory ().total ,
46- 'framework' : get_framework (),
4746 'agentstack_version' : get_version ()
4847 }
4948
49+ if command is not "init" :
50+ telemetry_data ['framework' ] = get_framework ()
51+ else :
52+ telemetry_data ['framework' ] = "n/a"
53+
5054 # Attempt to get general location based on public IP
5155 try :
5256 response = requests .get ('https://ipinfo.io/json' )
@@ -64,9 +68,9 @@ def collect_machine_telemetry():
6468 return telemetry_data
6569
6670
67- def track_cli_command (command ):
71+ def track_cli_command (command : str ):
6872 try :
69- data = collect_machine_telemetry ()
73+ data = collect_machine_telemetry (command )
7074 requests .post (TELEMETRY_URL , json = {"command" : command , ** data })
7175 except :
7276 pass
You can’t perform that action at this time.
0 commit comments