OpenTelemetry Agent - .NET Windows Command Line Apps Installation
Installation Steps
- Configure OpenTelemetry .NET Instrumentation for your App from PowerShell 5.1 or higher
NOTE: These steps are taken from OpenTelemetry .NET Windows PowerShell Instrumentation.
# Download the module
$module_url = "https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/latest/download/OpenTelemetry.DotNet.Auto.psm1"
$download_path = Join-Path $env:temp "OpenTelemetry.DotNet.Auto.psm1"
Invoke-WebRequest -Uri $module_url -OutFile $download_path -UseBasicParsing
# Import the module to use its functions
Import-Module $download_path
# Install core files
### If Online
Install-OpenTelemetryCore
### If Offline
Install-OpenTelemetryCore -LocalPath "C:\Path\To\OpenTelemetry.zip"
- Restart the application while including the Startup Parameters and Open Telemetry Instrumentation Script
- Find-and-replace $PROTOCOL with http or https based on the VF Server configuration
- Find-and-replace $VF_SERVER_ADDRESS with the URL for login to your organization’s vFunction Server
- Find-and-replace $VF_APP_ID with the Application UUID created with the Installation Instructions provided after creating the Distributed Application in the vFunction Server UI
- Find-and-Replace the $SERVICE_DISPLAY_NAME with your Service
- Find-and-Replace $RUN_APP.EXE with the name and path to the Application to be profiled
$env:OTEL_EXPORTER_OTLP_PROTOCOL='http/protobuf'
$env:OTEL_EXPORTER_OTLP_ENDPOINT='$PROTOCOL://$VF_SERVER_ADDRESS/api/unauth/otlp'
$env:OTEL_TRACES_EXPORTER='otlp'
$env:OTEL_METRICS_EXPORTER=none
$env:OTEL_LOGS_EXPORTER=none
$env:OTEL_EXPORTER_OTLP_HEADERS='$VF_APP_ID'
Register-OpenTelemetryForCurrentSession -OTelServiceName "$SERVICE_DISPLAY_NAME"
.\$RUN_APP.EXE