diff --git a/.github/workflows/scripts/win-test-services.ps1 b/.github/workflows/scripts/win-test-services.ps1
index 7e1f1c5e0e..c7b7ed42b6 100644
--- a/.github/workflows/scripts/win-test-services.ps1
+++ b/.github/workflows/scripts/win-test-services.ps1
@@ -4,9 +4,7 @@ param (
[string]$realm = "test",
[string]$memory = "512",
[string]$with_fluentd = "true",
- [string]$with_msi_uninstall_comments = "",
- [string]$api_url = "https://api.${realm}.signalfx.com",
- [string]$ingest_url = "https://ingest.${realm}.signalfx.com"
+ [string]$with_msi_uninstall_comments = ""
)
$ErrorActionPreference = 'Stop'
@@ -38,24 +36,22 @@ function service_running([string]$name) {
return ((Get-CimInstance -ClassName win32_service -Filter "Name = '$name'" | Select Name, State).State -Eq "Running")
}
-$expected_svc_env_vars = @{
+$api_url = "https://api.${realm}.signalfx.com"
+$ingest_url = "https://ingest.${realm}.signalfx.com"
+
+check_collector_svc_environment @{
"SPLUNK_CONFIG" = "${env:PROGRAMDATA}\Splunk\OpenTelemetry Collector\${mode}_config.yaml";
"SPLUNK_ACCESS_TOKEN" = "$access_token";
"SPLUNK_REALM" = "$realm";
- "SPLUNK_API_URL" = "$api_url";
+ "SPLUNK_API_URL" = "$api_url";
"SPLUNK_INGEST_URL" = "$ingest_url";
"SPLUNK_TRACE_URL" = "${ingest_url}/v2/trace";
"SPLUNK_HEC_URL" = "${ingest_url}/v1/log";
"SPLUNK_HEC_TOKEN" = "$access_token";
"SPLUNK_BUNDLE_DIR" = "${env:PROGRAMFILES}\Splunk\OpenTelemetry Collector\agent-bundle";
+ "SPLUNK_MEMORY_TOTAL_MIB" = "$memory";
}
-if (![string]::IsNullOrWhitespace($memory)) {
- $expected_svc_env_vars["SPLUNK_MEMORY_TOTAL_MIB"] = "$memory"
-}
-
-check_collector_svc_environment $expected_svc_env_vars
-
if ((service_running -name "splunk-otel-collector")) {
write-host "splunk-otel-collector service is running."
} else {
diff --git a/.github/workflows/win-package-test.yml b/.github/workflows/win-package-test.yml
index a64227a267..54aac5ef2e 100644
--- a/.github/workflows/win-package-test.yml
+++ b/.github/workflows/win-package-test.yml
@@ -91,39 +91,10 @@ jobs:
name: agent-bundle-windows
path: ./dist/agent-bundle_windows_amd64.zip
- msi-custom-actions:
- runs-on: windows-2022
- steps:
- - name: Check out the codebase.
- uses: actions/checkout@v4
-
- - name: Build Custom Actions
- working-directory: internal/buildscripts/packaging/msi/SplunkCustomActions
- run: |
- dotnet publish ./SplunkCustomActions.csproj -c Release -o ./bin/Release
-
- - name: Package Custom Actions
- run: |
- $WixPath = "${Env:ProgramFiles(x86)}\WiX Toolset v3.14"
- $sfxcaDll = "${WixPath}\SDK\x64\sfxca.dll"
- $Env:PATH = "${WixPath}\SDK;" + $Env:PATH
- $customActionDir = "${PWD}\internal\buildscripts\packaging\msi\SplunkCustomActions"
- $customActionBinDir = "${customActionDir}\bin\Release"
- MakeSfxCA.exe "${PWD}\dist\SplunkCustomActions.CA.dll" `
- "${sfxcaDll}" `
- "${customActionBinDir}\SplunkCustomActions.dll" `
- "${customActionBinDir}\Microsoft.Deployment.WindowsInstaller.dll" `
- "${customActionDir}\CustomAction.config"
-
- - uses: actions/upload-artifact@v4
- with:
- name: msi-custom-actions
- path: ./dist/SplunkCustomActions.CA.dll
-
msi-build:
# Use 20.04.5 until https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/16450 is resolved
runs-on: ubuntu-20.04
- needs: [cross-compile, agent-bundle-windows, msi-custom-actions]
+ needs: [cross-compile, agent-bundle-windows]
steps:
- name: Check out the codebase.
uses: actions/checkout@v4
@@ -142,18 +113,11 @@ jobs:
go-version: ${{ env.GO_VERSION }}
cache-dependency-path: '**/go.sum'
- - name: Downloading agent-bundle-windows
- uses: actions/download-artifact@v4
+ - uses: actions/download-artifact@v4
with:
name: agent-bundle-windows
path: ./dist
- - name: Downloading msi-custom-actions
- uses: actions/download-artifact@v4
- with:
- name: msi-custom-actions
- path: ./internal/buildscripts/packaging/msi/SplunkCustomActions/bin/Release
-
- name: Build MSI
run: |
mkdir -p dist
@@ -222,24 +186,7 @@ jobs:
strategy:
matrix:
OS: [ "windows-2022" ]
- install-properties:
-
- - install: "SPLUNK_ACCESS_TOKEN=fakeToken"
- expected: "-mode agent -access_token fakeToken -realm us0 -memory $null -with_fluentd false"
-
- - install: "SPLUNK_SETUP_COLLECTOR_MODE=gateway SPLUNK_ACCESS_TOKEN=testing123"
- expected: "-mode gateway -access_token testing123 -realm us0 -memory $null -with_fluentd false"
-
- - install: "SPLUNK_REALM=myrealm SPLUNK_ACCESS_TOKEN=testing"
- expected: "-mode agent -access_token testing -realm myrealm -memory $null -with_fluentd false"
-
- - install: "SPLUNK_INGEST_URL=https://fake.ingest.url SPLUNK_ACCESS_TOKEN=testing"
- expected: "-mode agent -realm us0 -access_token testing -ingest_url \"https://fake.ingest.url\" -memory $null -with_fluentd false"
-
steps:
- - name: Check out the codebase.
- uses: actions/checkout@v4
-
- name: Downloading msi build
uses: actions/download-artifact@v4
with:
@@ -252,7 +199,7 @@ jobs:
$msi_path = Resolve-Path .\dist\splunk-otel-collector*.msi
Test-Path $msi_path
Write-Host "Installing $msi_path ..."
- $process = Start-Process -Wait -PassThru msiexec "/i `"$msi_path`" /qn /l*v msi-install.log ${{ matrix.install-properties.install }}"
+ $process = Start-Process -Wait -PassThru msiexec "/i `"$msi_path`" /qn /l*v msi-install.log"
if ($process.ExitCode -ne 0) {
throw "MSI installation failed with exit code $($process.ExitCode)"
}
@@ -261,15 +208,21 @@ jobs:
if: ${{ failure() }}
run: Get-Content msi-install.log
+ - name: Set environment variables required to start the collector service
+ run: |
+ $ErrorActionPreference = 'Stop'
+ [Environment]::SetEnvironmentVariable("SPLUNK_ACCESS_TOKEN", "123456e", "Machine")
+ [Environment]::SetEnvironmentVariable("SPLUNK_API_URL", "https://non.existent.for.tests", "Machine")
+ [Environment]::SetEnvironmentVariable("SPLUNK_HEC_TOKEN", "098765e", "Machine")
+ [Environment]::SetEnvironmentVariable("SPLUNK_HEC_URL", "https://non.existent.for.tests/v1/log", "Machine")
+ [Environment]::SetEnvironmentVariable("SPLUNK_INGEST_URL", "https://non.existent.for.tests", "Machine")
+ [Environment]::SetEnvironmentVariable("SPLUNK_TRACE_URL", "https://non.existent.for.tests/v2/trace", "Machine")
+ [Environment]::SetEnvironmentVariable("SPLUNK_BUNDLE_DIR", "%ProgramFiles%\Splunk\OpenTelemetry", "Machine")
+
- name: Start the collector service
run:
Start-Service splunk-otel-collector
- - name: Check registry expectations
- run: |
- $ErrorActionPreference = 'Stop'
- & ${{ github.workspace }}\.github\workflows\scripts\win-test-services.ps1 ${{ matrix.install-properties.expected }}
-
- name: Stop the collector service
run:
Stop-Service splunk-otel-collector
diff --git a/.gitignore b/.gitignore
index ebcadc8777..9ebd465be2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -24,10 +24,6 @@ coverage_all.txt
coverage_old.txt
coverage.html
-# Exclude folders used to build MSI locally
-/build/
-/work/
-
# Wix
*.wixobj
*.wixpdb
diff --git a/internal/buildscripts/packaging/msi/SplunkCustomActions/.gitignore b/internal/buildscripts/packaging/msi/SplunkCustomActions/.gitignore
deleted file mode 100644
index d880825bdb..0000000000
--- a/internal/buildscripts/packaging/msi/SplunkCustomActions/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-# Ignore the .NET build outputs
-bin/
-obj/
diff --git a/internal/buildscripts/packaging/msi/SplunkCustomActions/CustomAction.config b/internal/buildscripts/packaging/msi/SplunkCustomActions/CustomAction.config
deleted file mode 100644
index f6a34e4866..0000000000
--- a/internal/buildscripts/packaging/msi/SplunkCustomActions/CustomAction.config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/internal/buildscripts/packaging/msi/SplunkCustomActions/CustomActions.cs b/internal/buildscripts/packaging/msi/SplunkCustomActions/CustomActions.cs
deleted file mode 100644
index 38eb4dc5f8..0000000000
--- a/internal/buildscripts/packaging/msi/SplunkCustomActions/CustomActions.cs
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright Splunk, Inc.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-using Microsoft.Deployment.WindowsInstaller;
-
-public class CustomActions
-{
- ///
- /// Custom action to check if the launch conditions are met.
- ///
- /// Carries information about the current installation session.
- /// An action result that indicates success or failure of the check.
- [CustomAction]
- public static ActionResult CheckLaunchConditions(Session session)
- {
- // Check if it is uninstall, if so, skip any check.
- var removeValue = session["REMOVE"];
- session.Log("Info: REMOVE=" + removeValue);
- if (removeValue == "ALL")
- {
- return ActionResult.Success;
- }
-
- // If SPLUNK_SETUP_COLLECTOR_MODE is not one of the expected values, fail the check.
- var collectorMode = session["SPLUNK_SETUP_COLLECTOR_MODE"] ?? string.Empty;
- session.Log("Info: SPLUNK_SETUP_COLLECTOR_MODE=" + collectorMode);
- if (collectorMode != "agent" && collectorMode != "gateway")
- {
- LogAndShowError(session, "SPLUNK_SETUP_COLLECTOR_MODE must be either 'agent' or 'gateway'.");
- return ActionResult.Failure;
- }
-
- return ActionResult.Success;
- }
-
- ///
- /// Helper to log and show error messages if the installation fails.
- /// When running in silent mode no dialog is shown.
- ///
- /// Carries information about the current installation session.
- /// The error message to log and show.
- private static void LogAndShowError(Session session, string message)
- {
- session.Log("Error: " + message);
- if (session["UILevel"] != InstallUIOptions.Silent.ToString()) // 2 is the value for INSTALLUILEVEL_NONE
- {
- session.Message(InstallMessage.Error, new Record { FormatString = message });
- }
- }
-}
diff --git a/internal/buildscripts/packaging/msi/SplunkCustomActions/SplunkCustomActions.csproj b/internal/buildscripts/packaging/msi/SplunkCustomActions/SplunkCustomActions.csproj
deleted file mode 100644
index 4d080eb471..0000000000
--- a/internal/buildscripts/packaging/msi/SplunkCustomActions/SplunkCustomActions.csproj
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
- enable
- enable
- Library
- SplunkCustomActions
- net462
- Latest
- $(HOME)/.nuget/packages/wix/3.14.0/tools/sdk
- $(MSBuildProgramFiles32)\Wix Toolset v3.14\SDK
-
-
-
-
-
-
-
-
-
-
-
-
-
- $(WindowsInstallerAssembliesDll)/Microsoft.Deployment.WindowsInstaller.dll
-
-
-
-
diff --git a/internal/buildscripts/packaging/msi/SplunkCustomActions/SplunkCustomActions.sln b/internal/buildscripts/packaging/msi/SplunkCustomActions/SplunkCustomActions.sln
deleted file mode 100644
index 2d9ee27e08..0000000000
--- a/internal/buildscripts/packaging/msi/SplunkCustomActions/SplunkCustomActions.sln
+++ /dev/null
@@ -1,24 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 17
-VisualStudioVersion = 17.5.002.0
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SplunkCustomActions", "SplunkCustomActions.csproj", "{CA568D0A-57DC-45B5-ADC7-EBBC06B6F580}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {CA568D0A-57DC-45B5-ADC7-EBBC06B6F580}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {CA568D0A-57DC-45B5-ADC7-EBBC06B6F580}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {CA568D0A-57DC-45B5-ADC7-EBBC06B6F580}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {CA568D0A-57DC-45B5-ADC7-EBBC06B6F580}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {EFE0FC55-9724-4F64-ABE7-2EF6A3E186BD}
- EndGlobalSection
-EndGlobal
diff --git a/internal/buildscripts/packaging/msi/make.ps1 b/internal/buildscripts/packaging/msi/make.ps1
index 8ce8216d58..c2d23ccded 100644
--- a/internal/buildscripts/packaging/msi/make.ps1
+++ b/internal/buildscripts/packaging/msi/make.ps1
@@ -35,7 +35,7 @@ function Install-Tools {
$ProgressPreference = $OriginalPref
choco install wixtoolset -y
- setx /m PATH "%PATH%;C:\Program Files (x86)\WiX Toolset v3.14\bin"
+ setx /m PATH "%PATH%;C:\Program Files (x86)\WiX Toolset v3.11\bin"
refreshenv
}
diff --git a/internal/buildscripts/packaging/msi/msi-builder/build.sh b/internal/buildscripts/packaging/msi/msi-builder/build.sh
index ff5318f9f1..72b33f902e 100755
--- a/internal/buildscripts/packaging/msi/msi-builder/build.sh
+++ b/internal/buildscripts/packaging/msi/msi-builder/build.sh
@@ -16,20 +16,15 @@
set -euo pipefail
-# This script builds the Splunk OpenTelemetry MSI from the project available at ${PROJECT_DIR}.
-PROJECT_DIR=${PROJECT_DIR:-/project}
-WORK_DIR=${WORK_DIR:-/work}
-
-MSI_SRC_DIR="${PROJECT_DIR}/internal/buildscripts/packaging/msi"
-WXS_PATH="${MSI_SRC_DIR}/splunk-otel-collector.wxs"
-OTELCOL="${PROJECT_DIR}/bin/otelcol_windows_amd64.exe"
-AGENT_CONFIG="${PROJECT_DIR}/cmd/otelcol/config/collector/agent_config.yaml"
-GATEWAY_CONFIG="${PROJECT_DIR}/cmd/otelcol/config/collector/gateway_config.yaml"
-FLUENTD_CONFIG="${PROJECT_DIR}/internal/buildscripts/packaging/fpm/etc/otel/collector/fluentd/fluent.conf"
-FLUENTD_CONFD="${MSI_SRC_DIR}/fluentd/conf.d"
-SUPPORT_BUNDLE_SCRIPT="${MSI_SRC_DIR}/splunk-support-bundle.ps1"
-SPLUNK_ICON="${MSI_SRC_DIR}/splunk.ico"
-OUTPUT_DIR="${PROJECT_DIR}/dist"
+WXS_PATH="/project/internal/buildscripts/packaging/msi/splunk-otel-collector.wxs"
+OTELCOL="/project/bin/otelcol_windows_amd64.exe"
+AGENT_CONFIG="/project/cmd/otelcol/config/collector/agent_config.yaml"
+GATEWAY_CONFIG="/project/cmd/otelcol/config/collector/gateway_config.yaml"
+FLUENTD_CONFIG="/project/internal/buildscripts/packaging/fpm/etc/otel/collector/fluentd/fluent.conf"
+FLUENTD_CONFD="/project/internal/buildscripts/packaging/msi/fluentd/conf.d"
+SUPPORT_BUNDLE_SCRIPT="/project/internal/buildscripts/packaging/msi/splunk-support-bundle.ps1"
+SPLUNK_ICON="/project/internal/buildscripts/packaging/msi/splunk.ico"
+OUTPUT_DIR="/project/dist"
JMX_METRIC_GATHERER_RELEASE="1.29.0"
usage() {
@@ -37,29 +32,29 @@ usage() {
usage: ${BASH_SOURCE[0]} [OPTIONS] VERSION
Description:
- Build the Splunk OpenTelemetry MSI from the project available at ${PROJECT_DIR}.
+ Build the Splunk OpenTelemetry MSI from the project available at /project.
By default, the MSI is saved as '${OUTPUT_DIR}/splunk-otel-collector-VERSION-amd64.msi'.
OPTIONS:
- --otelcol PATH Absolute path to the otelcol exe.
+ --otelcol PATH: Absolute path to the otelcol exe.
Defaults to '$OTELCOL'.
- --agent-config PATH Absolute path to the agent config.
+ --agent-config PATH: Absolute path to the agent config.
Defaults to '$AGENT_CONFIG'.
- --gateway-config PATH Absolute path to the gateway config.
+ --gateway-config PATH: Absolute path to the gateway config.
Defaults to '$GATEWAY_CONFIG'.
- --fluentd PATH Absolute path to the fluentd config.
+ --fluentd PATH: Absolute path to the fluentd config.
Defaults to '$FLUENTD_CONFIG'.
- --fluentd-confd PATH Absolute path to the conf.d.
+ --fluentd-confd PATH: Absolute path to the conf.d.
Defaults to '$FLUENTD_CONFD'.
- --support-bundle PATH Absolute path to the support bundle script.
+ --support-bundle PATH: Absolute path to the support bundle script.
Defaults to '$SUPPORT_BUNDLE_SCRIPT'.
- --jmx-metric-gatherer VERSION The released version of the JMX Metric Gatherer JAR to include (will be downloaded).
+ --jmx-metric-gatherer VERSION: The released version of the JMX Metric Gatherer JAR to include (will be downloaded).
Defaults to '$JMX_METRIC_GATHERER_RELEASE'.
- --splunk-icon PATH Absolute path to the splunk.ico.
+ --splunk-icon PATH: Absolute path to the splunk.ico.
Defaults to '$SPLUNK_ICON'.
- --output DIR Directory to save the MSI.
+ --output DIR: Directory to save the MSI.
Defaults to '$OUTPUT_DIR'.
- --skip-build-dir-removal Skip removing the build directory before building the MSI.
+
EOH
}
@@ -74,7 +69,6 @@ parse_args_and_build() {
local splunk_icon="$SPLUNK_ICON"
local output="$OUTPUT_DIR"
local version=
- local skip_build_dir_removal=
while [ -n "${1-}" ]; do
case $1 in
@@ -114,9 +108,6 @@ parse_args_and_build() {
output="$2"
shift 1
;;
- --skip-build-dir-removal)
- skip_build_dir_removal=1
- ;;
-*)
echo "Unknown option '$1'"
echo
@@ -142,14 +133,12 @@ parse_args_and_build() {
fi
set -x
- build_dir="${WORK_DIR}/build"
+ build_dir="/work/build"
files_dir="${build_dir}/msi"
msi_name="splunk-otel-collector-${version}-amd64.msi"
- if [ -z "$skip_build_dir_removal" && -d "$build_dir" ]; then
+ if [ -d "$build_dir" ]; then
rm -rf "$build_dir"
- else
- echo "Skipping build directory removal"
fi
mkdir -p "${files_dir}/fluentd/conf.d"
@@ -159,22 +148,17 @@ parse_args_and_build() {
cp "$fluentd_config" "${files_dir}/fluentd/td-agent.conf"
cp "${fluentd_confd}"/*.conf "${files_dir}/fluentd/conf.d/"
- if [ -z "$skip_build_dir_removal" ]; then
- unzip -d "$files_dir" "${OUTPUT_DIR}/agent-bundle_windows_amd64.zip"
- rm -f "${OUTPUT_DIR}/agent-bundle_windows_amd64.zip"
- else
- echo "Skipping unzipping agent bundle"
- fi
+ unzip -d "$files_dir" "${OUTPUT_DIR}/agent-bundle_windows_amd64.zip"
+ rm -f "${OUTPUT_DIR}/agent-bundle_windows_amd64.zip"
+ download_jmx_metric_gatherer "$jmx_metric_gatherer_release" "$build_dir"
jmx_metrics_jar="${build_dir}/opentelemetry-java-contrib-jmx-metrics.jar"
- if [ -f "${jmx_metrics_jar}" ]; then
- echo "JMX Metric Gatherer already downloaded"
- else
- download_jmx_metric_gatherer "$jmx_metric_gatherer_release" "$build_dir"
- fi
- cd ${WORK_DIR}
+ # kludge to satisfy relative path in splunk-otel-collector.wxs
+ mkdir -p /work/internal/buildscripts/packaging/msi
+ cp "${splunk_icon}" "/work/internal/buildscripts/packaging/msi/splunk.ico"
+ cd /work
configFilesWsx="${build_dir}/configfiles.wsx"
heat dir "$files_dir" -srd -sreg -gg -template fragment -cg ConfigFiles -dr INSTALLDIR -out "${configFilesWsx//\//\\}"
diff --git a/internal/buildscripts/packaging/msi/splunk-otel-collector.wxs b/internal/buildscripts/packaging/msi/splunk-otel-collector.wxs
index 7046aa95b4..e42b1ebe6b 100644
--- a/internal/buildscripts/packaging/msi/splunk-otel-collector.wxs
+++ b/internal/buildscripts/packaging/msi/splunk-otel-collector.wxs
@@ -1,56 +1,14 @@
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- NOT SPLUNK_HEC_TOKEN
- NOT SPLUNK_CONFIG
- NOT SPLUNK_API_URL
- NOT SPLUNK_INGEST_URL
-
- NOT SPLUNK_HEC_URL
- NOT SPLUNK_TRACE_URL
- NOT SPLUNK_BUNDLE_DIR
-
-
@@ -82,15 +40,7 @@
- SPLUNK_ACCESS_TOKEN=[SPLUNK_ACCESS_TOKEN]
- SPLUNK_HEC_TOKEN=[SPLUNK_HEC_TOKEN]
- SPLUNK_CONFIG=[SPLUNK_CONFIG]
- SPLUNK_API_URL=[SPLUNK_API_URL]
- SPLUNK_INGEST_URL=[SPLUNK_INGEST_URL]
- SPLUNK_HEC_URL=[SPLUNK_HEC_URL]
- SPLUNK_TRACE_URL=[SPLUNK_TRACE_URL]
- SPLUNK_BUNDLE_DIR=[SPLUNK_BUNDLE_DIR]
- SPLUNK_REALM=[SPLUNK_REALM]
+ SPLUNK_CONFIG=[CommonAppDataFolder]Splunk\OpenTelemetry Collector\agent_config.yaml
@@ -123,10 +73,9 @@
-
+
NOT CONFIG_FILE_EXISTS AND NOT Installed
-
diff --git a/internal/signalfx-agent/bundle/scripts/windows/make.ps1 b/internal/signalfx-agent/bundle/scripts/windows/make.ps1
index c438eb10eb..26f7843efa 100644
--- a/internal/signalfx-agent/bundle/scripts/windows/make.ps1
+++ b/internal/signalfx-agent/bundle/scripts/windows/make.ps1
@@ -84,18 +84,9 @@ function bundle (
zip_file -src "$buildDir\$BUNDLE_DIR" -dest "$outputDir\$BUNDLE_NAME"
}
-try {
- $OriginalPref = $ProgressPreference
- $ProgressPreference = "SilentlyContinue"
- if ($REMAINING.length -gt 0) {
- $sb = [scriptblock]::create("$Target $REMAINING")
- Invoke-Command -ScriptBlock $sb
- } else {
- &$Target
- }
-}
-finally {
- Set-PSDebug -Trace 0
- $ProgressPreference = $OriginalPref
+if ($REMAINING.length -gt 0) {
+ $sb = [scriptblock]::create("$Target $REMAINING")
+ Invoke-Command -ScriptBlock $sb
+} else {
+ &$Target
}
-