Editar

Compartilhar via


Set-AzIotHubDistributedTracing

Update the distributed tracing options for a device.

Syntax

Set-AzIotHubDistributedTracing
   [-ResourceGroupName] <String>
   [-IotHubName] <String>
   [-DeviceId] <String>
   [-SamplingMode] <PSDistributedTracingSamplingMode>
   [-SamplingRate <Int32>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzIotHubDistributedTracing
   [-InputObject] <PSIotHub>
   [-DeviceId] <String>
   [-SamplingMode] <PSDistributedTracingSamplingMode>
   [-SamplingRate <Int32>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzIotHubDistributedTracing
   [-ResourceId] <String>
   [-DeviceId] <String>
   [-SamplingMode] <PSDistributedTracingSamplingMode>
   [-SamplingRate <Int32>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Update the distributed tracing options for a device.

Examples

Example 1

Set-AzIotHubDistributedTracing -ResourceGroupName "myresourcegroup" -IotHubName "myiothub" -DeviceId "myDevice1" -SamplingMode Enabled -SamplingRate 22

DeviceId      : mydevice1
Sampling Mode : Enabled
Sampling Rate : 22%
IsSynced      : False

Update the distributed tracing options for a device.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DeviceId

Target Device Id.

Type:String
Position:1
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-InputObject

IotHub object

Type:PSIotHub
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-IotHubName

Name of the Iot Hub

Type:String
Position:1
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

Name of the Resource Group

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ResourceId

IotHub Resource Id

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-SamplingMode

Turns sampling for distributed tracing enable and disable.

Type:PSDistributedTracingSamplingMode
Aliases:Mode
Accepted values:Disabled, Enabled
Position:2
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-SamplingRate

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

Type:Int32
Aliases:Rate
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

PSIotHub

String

Outputs

PSDeviceTracing