Skip to content

Commit b65b117

Browse files
authored
fix: Add missing instrumentation to MSI installer (#1569)
* fix: Add missing CosmosDb instrumentation to MSI installer. * test: Enable MSI configuration validation
1 parent fe52a44 commit b65b117

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

build/ArtifactBuilder/Artifacts/MsiInstaller.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ protected override void InternalBuild()
3838
return;
3939
}
4040

41-
//ValidateWxsDefinitionFileForInstaller();
41+
ValidateWxsDefinitionFileForInstaller();
4242

4343
var fileSearchPattern = $@"NewRelicAgent_{Platform}_*.msi";
4444
var msiPath = Directory.GetFiles(MsiDirectory, fileSearchPattern).FirstOrDefault();
@@ -162,7 +162,7 @@ private void ValidateWixFileExtensionDefinitions(WixFragmentComponentGroup group
162162
throw new PackagingException($"Product.wxs file {file.Id} did not have KeyPath set to yes, but was {file.KeyPath}.");
163163
}
164164

165-
var expectedSourcePath = isCore ? $@"$(var.SolutionDir)newrelichome_$(var.Platform)_coreclr\extensions\{file.Name}" : $@"$(var.SolutionDir)newrelichome_$(var.Platform)\extensions\{file.Name}";
165+
var expectedSourcePath = isCore ? $@"$(var.HomeFolderPath)_coreclr\extensions\{file.Name}" : $@"$(var.HomeFolderPath)\extensions\{file.Name}";
166166
if (file.Source != expectedSourcePath)
167167
{
168168
throw new PackagingException($"Product.wxs file {file.Id} did not have the expected source path of {expectedSourcePath}, but was {file.Source}");

src/Agent/MsiInstaller/Installer/Product.wxs

+12
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,9 @@ SPDX-License-Identifier: Apache-2.0
439439
<Component Id="CouchbaseWrapperComponent" Guid="{21A0A03D-4799-4D8B-B6DB-553DD66C7020}">
440440
<File Id="CouchbaseWrapperFile" Name="NewRelic.Providers.Wrapper.Couchbase.dll" KeyPath="yes" Source="$(var.HomeFolderPath)\extensions\NewRelic.Providers.Wrapper.Couchbase.dll"/>
441441
</Component>
442+
<Component Id="CosmosDbWrapperComponent" Guid="{C72D656C-B55D-4690-9BD7-9343096D4553}">
443+
<File Id="CosmosDbWrapperFile" Name="NewRelic.Providers.Wrapper.CosmosDb.dll" KeyPath="yes" Source="$(var.HomeFolderPath)\extensions\NewRelic.Providers.Wrapper.CosmosDb.dll"/>
444+
</Component>
442445

443446
<Component Id="OwinWrapperComponent" Guid="{FC044DC6-52D8-42C6-A9FE-CB9425EF5811}">
444447
<File Id="OwinWrapperFile" Name="NewRelic.Providers.Wrapper.Owin.dll" KeyPath="yes" Source="$(var.HomeFolderPath)\extensions\NewRelic.Providers.Wrapper.Owin.dll"/>
@@ -496,6 +499,9 @@ SPDX-License-Identifier: Apache-2.0
496499
<Component Id="CoreRabbitMqWrapperComponent" Guid="{758394DD-AB71-4E58-8E18-BF1135F8B2C2}">
497500
<File Id="CoreRabbitMqWrapperFile" Name="NewRelic.Providers.Wrapper.RabbitMq.dll" KeyPath="yes" Source="$(var.HomeFolderPath)_coreclr\extensions\NewRelic.Providers.Wrapper.RabbitMq.dll"/>
498501
</Component>
502+
<Component Id="CoreCosmosDbWrapperComponent" Guid="{3855755F-2A69-43EC-AE31-8D778E4B41E2}">
503+
<File Id="CoreCosmosDbWrapperFile" Name="NewRelic.Providers.Wrapper.CosmosDb.dll" KeyPath="yes" Source="$(var.HomeFolderPath)_coreclr\extensions\NewRelic.Providers.Wrapper.CosmosDb.dll"/>
504+
</Component>
499505
<Component Id="CoreLog4NetLoggingWrapperComponent" Guid="{882392E9-9403-41EC-9321-9C6E53781744}">
500506
<File Id="CoreLog4NetLoggingWrapperFile" Name="NewRelic.Providers.Wrapper.Log4NetLogging.dll" KeyPath="yes" Source="$(var.HomeFolderPath)_coreclr\extensions\NewRelic.Providers.Wrapper.Log4NetLogging.dll"/>
501507
</Component>
@@ -592,6 +598,9 @@ SPDX-License-Identifier: Apache-2.0
592598
<Component Id="CouchbaseInstrumentationComponent" Guid="{03FA7D3A-3368-45B1-92B8-19DA97A659B8}">
593599
<File Id="CouchbaseInstrumentationFile" Name="NewRelic.Providers.Wrapper.Couchbase.Instrumentation.xml" KeyPath="yes" Source="$(var.HomeFolderPath)\extensions\NewRelic.Providers.Wrapper.Couchbase.Instrumentation.xml"/>
594600
</Component>
601+
<Component Id="CosmosDbInstrumentationComponent" Guid="{56DEAF3E-5F51-4C47-82E5-1C2D0FF4E7DD}">
602+
<File Id="CosmosDbInstrumentationFile" Name="NewRelic.Providers.Wrapper.CosmosDb.Instrumentation.xml" KeyPath="yes" Source="$(var.HomeFolderPath)\extensions\NewRelic.Providers.Wrapper.CosmosDb.Instrumentation.xml"/>
603+
</Component>
595604
<Component Id="MiscInstrumentationComponent" Guid="{EE12546C-A328-49A7-84BE-B9A556ADA0A8}">
596605
<File Id="MiscInstrumentationFile" Name="NewRelic.Providers.Wrapper.Misc.Instrumentation.xml" KeyPath="yes" Source="$(var.HomeFolderPath)\extensions\NewRelic.Providers.Wrapper.Misc.Instrumentation.xml"/>
597606
</Component>
@@ -634,6 +643,9 @@ SPDX-License-Identifier: Apache-2.0
634643
<Component Id="CoreRabbitMqInstrumentationComponent" Guid="{1CDC18CC-992A-4386-BC4D-DE87A85D9568}">
635644
<File Id="CoreRabbitMqInstrumentationFile" Name="NewRelic.Providers.Wrapper.RabbitMq.Instrumentation.xml" KeyPath="yes" Source="$(var.HomeFolderPath)_coreclr\extensions\NewRelic.Providers.Wrapper.RabbitMq.Instrumentation.xml"/>
636645
</Component>
646+
<Component Id="CoreCosmosDbInstrumentationComponent" Guid="{1B6D4139-9217-4A03-94D0-D6E3AFFE0A8E}">
647+
<File Id="CoreCosmosDbInstrumentationFile" Name="NewRelic.Providers.Wrapper.CosmosDb.Instrumentation.xml" KeyPath="yes" Source="$(var.HomeFolderPath)_coreclr\extensions\NewRelic.Providers.Wrapper.CosmosDb.Instrumentation.xml"/>
648+
</Component>
637649
<Component Id="CoreLog4NetLoggingInstrumentationComponent" Guid="{A40554DF-870C-477C-8910-1113A221820C}">
638650
<File Id="CoreLog4NetLoggingInstrumentationFile" Name="NewRelic.Providers.Wrapper.Log4NetLogging.Instrumentation.xml" KeyPath="yes" Source="$(var.HomeFolderPath)_coreclr\extensions\NewRelic.Providers.Wrapper.Log4NetLogging.Instrumentation.xml"/>
639651
</Component>

0 commit comments

Comments
 (0)