Skip to content

Commit 609a0d7

Browse files
feature: add telemetry calls for --version
1 parent f277d42 commit 609a0d7

File tree

2 files changed

+9
-19
lines changed

2 files changed

+9
-19
lines changed

.vscode/launch.json

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"configurations": [
44
{
55
"name": "Azure CLI Debug (Integrated Console)",
6-
"type": "python",
6+
"type": "debugpy",
77
"request": "launch",
88
"python": "${command:python.interpreterPath}",
99
"program": "${workspaceRoot}/src/azure-cli/azure/cli/__main__.py",
@@ -12,33 +12,24 @@
1212
"--help"
1313
],
1414
"console": "integratedTerminal",
15-
"debugOptions": [
16-
"WaitOnAbnormalExit",
17-
"WaitOnNormalExit",
18-
"RedirectOutput"
19-
],
2015
"justMyCode": false
2116
},
2217
{
2318
"name": "Azure CLI Debug (External Console)",
24-
"type": "python",
19+
"type": "debugpy",
2520
"request": "launch",
2621
"stopOnEntry": true,
2722
"python": "${command:python.interpreterPath}",
2823
"program": "${workspaceRoot}/src/azure-cli/azure/cli/__main__.py",
2924
"cwd": "${workspaceRoot}",
3025
"args": [
31-
"--help"
26+
"--version"
3227
],
3328
"console": "externalTerminal",
34-
"debugOptions": [
35-
"WaitOnAbnormalExit",
36-
"WaitOnNormalExit"
37-
]
3829
},
3930
{
4031
"name": "Azdev Scripts",
41-
"type": "python",
32+
"type": "debugpy",
4233
"request": "launch",
4334
"python": "${command:python.interpreterPath}",
4435
"program": "${workspaceRoot}/tools/automation/__main__.py",
@@ -47,11 +38,6 @@
4738
"--help"
4839
],
4940
"console": "integratedTerminal",
50-
"debugOptions": [
51-
"WaitOnAbnormalExit",
52-
"WaitOnNormalExit",
53-
"RedirectOutput"
54-
]
5541
}
5642
]
57-
}
43+
}

src/azure-cli-core/azure/cli/core/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ def get_cli_version(self):
120120

121121
def show_version(self):
122122
from azure.cli.core.util import get_az_version_string, show_updates
123+
from azure.cli.core import telemetry
124+
125+
telemetry.set_raw_command_name("--version")
126+
telemetry.set_command_details("version")
123127

124128
ver_string, updates_available_components = get_az_version_string()
125129
print(ver_string)

0 commit comments

Comments
 (0)