Skip to content

Latest commit

 

History

History
40 lines (18 loc) · 1.38 KB

Add-ResourceConfiguration.md

File metadata and controls

40 lines (18 loc) · 1.38 KB

Add-ResourceConfiguration

Adds a Resource Configuration to a Tracer. A resource represents the entity producing telemetry as resource attributes.

Parameters

Parameter Set 1

  • [String] ServiceName An identifier usually base off of the name of the Service or Application generating the traces.. Mandatory
  • [Hashtable] Attribute A key-value pair. Used across telemetry signals - e.g. in Traces to attach data to an Activity (Span). Mandatory
  • [TracerProviderBuilderBase] TracerProvider A TracerProviderBuilderBase object. Mandatory, ValueFromPipeline

Parameter Set 2

  • [String] ServiceName An identifier usually base off of the name of the Service or Application generating the traces.. Mandatory
  • [Hashtable] Attribute A key-value pair. Used across telemetry signals - e.g. in Traces to attach data to an Activity (Span). Mandatory
  • [MeterProviderBuilderBase] MeterBuilder Instance of MeterProviderBuilderBase. Mandatory, ValueFromPipeline

Examples

Example 1

New-TracerProviderBuilder | Add-HttpClientInstrumentation | Add-ResourceConfiguration -ServiceName $ExecutionContext.Host.Name -Attribute @{"host.name" = $(hostname)} | Add-ExporterConsole | Start-Tracer

Links