Share via


az iot hub distributed-tracing

Note

This reference is part of the azure-iot extension for the Azure CLI (version 2.59.0 or higher). The extension will automatically install the first time you run an az iot hub distributed-tracing command. Learn more about extensions.

This command group is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Manage distributed settings per-device.

Commands

Name Description Type Status
az iot hub distributed-tracing show

Get the distributed tracing settings for a device.

Extension Preview
az iot hub distributed-tracing update

Update the distributed tracing options for a device.

Extension Preview

az iot hub distributed-tracing show

Preview

Command group 'iot hub distributed-tracing' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Get the distributed tracing settings for a device.

az iot hub distributed-tracing show --device-id
                                    --hub-name
                                    [--auth-type {key, login}]
                                    [--resource-group]

Examples

Get the distributed tracing settings for a device

az iot hub distributed-tracing show -d {device_id} -n {iothub_name}

Required Parameters

--device-id -d

Target Device Id.

--hub-name -n

IoT Hub name or hostname. Required if --login is not provided.

Property Value
Parameter group: IoT Hub Identifier Arguments

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--auth-type

Indicates whether the operation should auto-derive a policy key or use the current Azure AD session. If the authentication type is login and the resource hostname is provided, resource lookup will be skipped unless needed.You can configure the default using az configure --defaults iothub-data-auth-type={auth-type-value}.

Property Value
Parameter group: Access Control Arguments
Default value: key
Accepted values: key, login
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az iot hub distributed-tracing update

Preview

Command group 'iot hub distributed-tracing' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Update the distributed tracing options for a device.

az iot hub distributed-tracing update --device-id
                                      --hub-name
                                      --sampling-mode --sm {off, on}
                                      --sampling-rate --sr
                                      [--auth-type {key, login}]
                                      [--resource-group]

Examples

Update the distributed tracing options for a device

az iot hub distributed-tracing update -d {device_id} --sm on --sr 50 -n {iothub_name}

Required Parameters

--device-id -d

Target Device Id.

--hub-name -n

IoT Hub name or hostname. Required if --login is not provided.

Property Value
Parameter group: IoT Hub Identifier Arguments
--sampling-mode --sm

Turns sampling for distributed tracing on and off. 1 is On and, 2 is Off.

Property Value
Accepted values: off, on
--sampling-rate --sr

Controls the amount of messages sampled for adding trace context. This value isa percentage. Only values from 0 to 100 (inclusive) are permitted.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--auth-type

Indicates whether the operation should auto-derive a policy key or use the current Azure AD session. If the authentication type is login and the resource hostname is provided, resource lookup will be skipped unless needed.You can configure the default using az configure --defaults iothub-data-auth-type={auth-type-value}.

Property Value
Parameter group: Access Control Arguments
Default value: key
Accepted values: key, login
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False