Skip to content

Commit 902cda5

Browse files
authored
fix(telemetry): send json not ruby hash (#371)
fix(telemetry): remove registry options feat(telemetry): send os info
1 parent 4bc2d11 commit 902cda5

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

lib/aptible/cli/helpers/telemetry.rb

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,18 @@ def telemetry(cmd, options = {})
2323
c.ssl_config.set_default_paths
2424
end
2525

26+
opts = options.dup
27+
opts.delete(:private_registry_password)
28+
opts.delete(:private_registry_username)
29+
opts.delete(:private_registry_email)
30+
2631
value = {
2732
'email' => token_hash[0]['email'],
2833
'format' => format,
2934
'cmd' => cmd,
30-
'options' => options,
35+
'options' => opts,
3136
'version' => version_string,
37+
'os' => RUBY_PLATFORM,
3238
# https://stackoverflow.com/a/73973555
3339
'github' => ENV['GITHUB_ACTIONS'],
3440
'gitlab' => ENV['GITLAB_CI'],
@@ -45,7 +51,7 @@ def telemetry(cmd, options = {})
4551
'user_id' => user_or_org_id,
4652
'type' => 'cli_telemetry',
4753
'url' => sub,
48-
'value' => value
54+
'value' => value.to_json
4955
)
5056
rescue
5157
# since this is just for telemetry we don't want to notify

0 commit comments

Comments
 (0)