Skip to content

Latest commit

 

History

History
53 lines (25 loc) · 1.12 KB

Add-TracerSource.md

File metadata and controls

53 lines (25 loc) · 1.12 KB

Add-TracerSource

Adds and ActivitySource to a TracerProviderBuilder

Parameters

Parameter Set 1

  • [String[]] Name Name of the Activity. Mandatory
  • [TracerProviderBuilderBase] TracerProviderBuilder A TracerProviderBuilderBase object. Mandatory, ValueFromPipeline

Parameter Set 2

  • [ActivitySource] ActivitySource An ActivitySource object. Mandatory
  • [TracerProviderBuilderBase] TracerProviderBuilder A TracerProviderBuilderBase object. Mandatory, ValueFromPipeline

Examples

Example 1

Add a source by Name.

New-TracerProviderBuilder | Add-TracerSource -Name "MyActivity"

Example 2

Create an Activity Soruce object.

$source = New-ActivitySource -Name "MyActivity"
New-TracerProviderBuilder | Add-TracerSource -AcvititySource $source

Links