File: faq.md

package info (click to toggle)
azure-cli 2.83.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,346,000 kB
  • sloc: python: 1,930,197; sh: 1,344; makefile: 407; cs: 145; javascript: 74; sql: 37; xml: 21
file content (30 lines) | stat: -rw-r--r-- 1,488 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# FAQ

## What's the relationship of CLI telemetry and ARM telemetry?

- CLI telemetry is client telemetry. It logs OS, platform, command, parameter, result and other client info.
- ARM telemetry is server telemetry. It tracks all HTTP requests and responses through ARM endpoint from different clients, including CLI, PowerShell, SDK...
- They share the same `clientRequestId` which you can leverage to join `HttpIncomingRequests` (ARM telemetry table) with `RawEventsAzCli` (CLI telemetry table)


## How can I filter CLI requests from ARM telemetry?

```
HttpIncomingRequests
| where TIMESTAMP > ago(1h)
| where userAgent contains 'AzureCLI/2.'
| take 10
```

## How can I collect customized properties into CLI telemetry?

You can utilize `add_extension_event` [function](https://github.com/Azure/azure-cli/blob/dev/src/azure-cli-core/azure/cli/core/telemetry.py#L418-L420) to collect properties for your extension.

When customers run command, in additional to general CLI record whose `EventName` is `azurecli/command`, there will be another record whose `EventName` is `azurecli/extension` recorded in CLI telemetry.

And you can join the general `azurecli/command` record with `azurecli/extension` record on `CorrelationId` field.


## How can customer disable telemetry collection?

We have an switch for customer to disable/enable telemetry collection. Try `az config set core.collect_telemetry=true` for enabling and `az config set core.collect_telemetry=false` for disabling.