diff --git a/internal/buildscripts/packaging/installer/install.ps1 b/internal/buildscripts/packaging/installer/install.ps1 index 638f15c1c4..350def6143 100644 --- a/internal/buildscripts/packaging/installer/install.ps1 +++ b/internal/buildscripts/packaging/installer/install.ps1 @@ -69,7 +69,8 @@ .EXAMPLE .\install.ps1 -access_token "ACCESSTOKEN" -with_fluentd $true .PARAMETER with_dotnet_instrumentation - (OPTIONAL) Whether to install and configure .NET tracing to forward .NET application traces to the local collector (default: $false) + (OPTIONAL) Whether to install and configure the Splunk Distribution of OpenTelemetry .NET to forward .NET application telemetry to the local collector (default: $false). + If the instrumentation is already installed the script will update it to the latest version - stop all instrumented applications before attempting to update the instrumentation. .EXAMPLE .\install.ps1 -access_token "ACCESSTOKEN" -with_dotnet_instrumentation $true .PARAMETER deployment_env @@ -703,7 +704,14 @@ if ($with_dotnet_instrumentation) { if (-not $currentInstallVersion) { Install-OpenTelemetryCore } else { - Update-OpenTelemetryCore + Write-Warning "Splunk Distribution of OpenTelemetry .NET is already installed. Updating to the latest version..." + try { + Update-OpenTelemetryCore + } + catch { + Write-Error "Failed to update Splunk Distribution of OpenTelemetry .NET. Stop all instrumented applications and then try again." + throw $_ + } } $installed_version = Get-OpenTelemetryInstallVersion