Skip to content

Commit

Permalink
Merge branch 'main' into feature/netstandard-odbc-instrumentation
Browse files Browse the repository at this point in the history
  • Loading branch information
nr-ahemsath authored Jan 24, 2025
2 parents 4367887 + 9cce18c commit 2ad2d4a
Show file tree
Hide file tree
Showing 43 changed files with 1,636 additions and 331 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/post_deploy_agent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,10 @@ jobs:
RELEASE_TAG="${AGENT_VERSION}.0_dotnet"
RELEASE_NOTES="Automated release for [.NET Agent ${AGENT_VERSION}](https://github.com/newrelic/newrelic-dotnet-agent/releases/tag/${AGENT_VERSION})"
gh auth login --with-token <<< $GH_RELEASE_TOKEN
echo "newrelic/newrelic-lambda-layers - Releasing ${RELEASE_TITLE} with tag ${RELEASE_TAG}"
gh release create "${RELEASE_TAG}" --title=${RELEASE_TITLE} --repo=newrelic/newrelic-lambda-layers --notes=${RELEASE_NOTES}
echo "newrelic/newrelic-agent-init-container - Releasing ${RELEASE_TITLE} with tag ${RELEASE_TAG}"
gh release create "${RELEASE_TAG}" --title=${RELEASE_TITLE} --repo=newrelic/newrelic-agent-init-container --notes=${RELEASE_NOTES}
echo "newrelic/newrelic-lambda-layers - Releasing \"${RELEASE_TITLE}\" with tag ${RELEASE_TAG}"
gh release create "${RELEASE_TAG}" --title="${RELEASE_TITLE}" --repo=newrelic/newrelic-lambda-layers --notes="${RELEASE_NOTES}"
echo "newrelic/newrelic-agent-init-container - Releasing \"${RELEASE_TITLE}\" with tag ${RELEASE_TAG}"
gh release create "${RELEASE_TAG}" --title="${RELEASE_TITLE}" --repo=newrelic/newrelic-agent-init-container --notes="${RELEASE_NOTES}"
env:
GH_RELEASE_TOKEN: ${{ secrets.DOTNET_AGENT_GH_TOKEN }}
AGENT_VERSION: "v${{ inputs.agent_version }}"
80 changes: 74 additions & 6 deletions .github/workflows/run_linux_container_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ permissions:

jobs:

run-linux-container-tests:
name: Run Linux Container Integration Tests
run-amd64-linux-container-tests:
name: Run amd64 Linux Container Integration Tests
runs-on: ubuntu-latest

env:
Expand All @@ -46,9 +46,69 @@ jobs:
with:
egress-policy: audit

- name: Docker Setup QEMU
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0

- name: Download Agent Home Folders (Call)
if: ${{ inputs.external_call }}
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: homefolders
path: src/Agent

- name: Download Agent Home Folders (Dispatch)
if: ${{ !inputs.external_call }}
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ inputs.run_id }}
name: homefolders
path: ${{ github.workspace }}/src/Agent
repository: ${{ github.repository }}

- name: Set up secrets
env:
INTEGRATION_TEST_SECRETS: ${{ secrets.TEST_SECRETS }}
run: |
echo $INTEGRATION_TEST_SECRETS | dotnet user-secrets set --project ${{ env.integration_tests_shared_project }}
- name: Install .NET 9
uses: actions/setup-dotnet@6bd8b7f7774af54e05809fcc5431931b3eb1ddee # v4.0.1
with:
dotnet-version: '9.0.x'

- name: Build & Run amd64 Linux Container Integration Tests
env:
BUILD_ARCH: amd64
run: dotnet test ./tests/Agent/IntegrationTests/ContainerIntegrationTests/ContainerIntegrationTests.csproj --framework net9.0 --filter Architecture=amd64 --logger "console;verbosity=detailed" --logger "trx;verbosity=detailed" --results-directory ${{ env.test_results_path }}

- name: Archive test results
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: ContainerTestResults
path: ${{ env.test_results_path }} # Directory containing files to upload


run-arm64-linux-container-tests:
name: Run arm64 Linux Container Integration Tests
runs-on: ubuntu-24.04-arm

env:
test_results_path: tests\TestResults
integration_tests_shared_project: ${{ github.workspace }}/tests/Agent/IntegrationTests/Shared
NR_DOTNET_TEST_SAVE_WORKING_DIRECTORY: 1
# Make this variable true to enable extra data-gathering and logging to help troubleshoot test failures, at the cost of additional time and resources
enhanced_logging: false


steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
with:
egress-policy: audit

- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
Expand Down Expand Up @@ -82,5 +142,13 @@ jobs:
with:
dotnet-version: '9.0.x'

- name: Build & Run Linux Container Integration Tests
run: dotnet test ./tests/Agent/IntegrationTests/ContainerIntegrationTests/ContainerIntegrationTests.csproj --framework net9.0
- name: Build & Run arm64 Linux Container Integration Tests
env:
BUILD_ARCH: arm64
run: dotnet test ./tests/Agent/IntegrationTests/ContainerIntegrationTests/ContainerIntegrationTests.csproj --framework net9.0 --filter Architecture=arm64 --logger "console;verbosidty=detailed" --logger "trx;verbosity=detailed" --results-directory ${{ env.test_results_path }}

- name: Archive test results
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: ContainerTestResults
path: ${{ env.test_results_path }} # Directory containing files to upload
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@
"ignoreTFMs": "net481",
"ignoreReason": "net481 doesn't support v9.x"
},
{
"packageName": "opensearch.client"
},
{
"packageName": "oracle.manageddataaccess"
},
Expand Down
10 changes: 9 additions & 1 deletion FullAgent.sln
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Home", "src\Agent\NewRelic\
{D9428449-3E4B-4723-A8AA-1191315C7AAD} = {D9428449-3E4B-4723-A8AA-1191315C7AAD}
{E10BF2F9-D5CA-4330-8169-ED30D861697E} = {E10BF2F9-D5CA-4330-8169-ED30D861697E}
{EA98ED03-D1B4-4283-8412-98985B06AFDA} = {EA98ED03-D1B4-4283-8412-98985B06AFDA}
{EC27FFD7-FAE4-4882-95C4-D3FA60F738BD} = {EC27FFD7-FAE4-4882-95C4-D3FA60F738BD}
{EC34F023-223D-432F-9401-9C3ED1B75DE4} = {EC34F023-223D-432F-9401-9C3ED1B75DE4}
{EFFD9051-E3AC-4266-9AF6-7ECC74C032BD} = {EFFD9051-E3AC-4266-9AF6-7ECC74C032BD}
{F889CE37-934F-48F2-A105-6C19CE292D37} = {F889CE37-934F-48F2-A105-6C19CE292D37}
Expand Down Expand Up @@ -222,6 +223,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PublicApiChangeTests", "tes
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Memcached", "src\Agent\NewRelic\Agent\Extensions\Providers\Wrapper\Memcached\Memcached.csproj", "{5D74E5C5-9BA3-423B-86F7-14C2D1A14661}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSearch", "src\Agent\NewRelic\Agent\Extensions\Providers\Wrapper\OpenSearch\OpenSearch.csproj", "{EC27FFD7-FAE4-4882-95C4-D3FA60F738BD}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -468,6 +471,10 @@ Global
{5D74E5C5-9BA3-423B-86F7-14C2D1A14661}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5D74E5C5-9BA3-423B-86F7-14C2D1A14661}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5D74E5C5-9BA3-423B-86F7-14C2D1A14661}.Release|Any CPU.Build.0 = Release|Any CPU
{EC27FFD7-FAE4-4882-95C4-D3FA60F738BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EC27FFD7-FAE4-4882-95C4-D3FA60F738BD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EC27FFD7-FAE4-4882-95C4-D3FA60F738BD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EC27FFD7-FAE4-4882-95C4-D3FA60F738BD}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -539,10 +546,11 @@ Global
{338AD83A-ED68-438A-8FB1-E93A3AE87EA8} = {5E86E10A-C38F-48CB-ADE9-67B22BB2F50A}
{A8F6EFEA-1C31-4461-A7B4-25C30D954EE2} = {E5B988C0-5D19-407E-8210-71FFB90C579A}
{5D74E5C5-9BA3-423B-86F7-14C2D1A14661} = {5E86E10A-C38F-48CB-ADE9-67B22BB2F50A}
{EC27FFD7-FAE4-4882-95C4-D3FA60F738BD} = {5E86E10A-C38F-48CB-ADE9-67B22BB2F50A}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EnterpriseLibraryConfigurationToolBinariesPath = packages\Unity.2.1.505.2\lib\NET35
SolutionGuid = {D8B98070-6B8E-403C-A07F-A3F2E4A3A3D0}
EnterpriseLibraryConfigurationToolBinariesPath = packages\Unity.2.1.505.2\lib\NET35
EndGlobalSection
GlobalSection(TestCaseManagementSettings) = postSolution
CategoryFile = FullAgent.vsmdi
Expand Down
2 changes: 2 additions & 0 deletions build/ArtifactBuilder/CoreAgentComponents.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ protected override void CreateAgentComponents()
$@"{SourceHomeBuilderPath}\extensions\NewRelic.Providers.Wrapper.AwsSdk.dll",
$@"{SourceHomeBuilderPath}\extensions\NewRelic.Providers.Wrapper.AzureFunction.dll",
$@"{SourceHomeBuilderPath}\extensions\NewRelic.Providers.Wrapper.Memcached.dll",
$@"{SourceHomeBuilderPath}\extensions\NewRelic.Providers.Wrapper.OpenSearch.dll",
};

var wrapperXmls = new[]
Expand Down Expand Up @@ -88,6 +89,7 @@ protected override void CreateAgentComponents()
$@"{SourceHomeBuilderPath}\extensions\NewRelic.Providers.Wrapper.AwsSdk.Instrumentation.xml",
$@"{SourceHomeBuilderPath}\extensions\NewRelic.Providers.Wrapper.AzureFunction.Instrumentation.xml",
$@"{SourceHomeBuilderPath}\extensions\NewRelic.Providers.Wrapper.Memcached.Instrumentation.xml",
$@"{SourceHomeBuilderPath}\extensions\NewRelic.Providers.Wrapper.OpenSearch.Instrumentation.xml",
};

ExtensionXsd = $@"{SourceHomeBuilderPath}\extensions\extension.xsd";
Expand Down
2 changes: 2 additions & 0 deletions build/ArtifactBuilder/FrameworkAgentComponents.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ protected override void CreateAgentComponents()
$@"{SourceHomeBuilderPath}\extensions\NewRelic.Providers.Wrapper.AwsSdk.dll",
$@"{SourceHomeBuilderPath}\extensions\NewRelic.Providers.Wrapper.AzureFunction.dll",
$@"{SourceHomeBuilderPath}\extensions\NewRelic.Providers.Wrapper.Memcached.dll",
$@"{SourceHomeBuilderPath}\extensions\NewRelic.Providers.Wrapper.OpenSearch.dll",
};

var wrapperXmls = new[]
Expand Down Expand Up @@ -109,6 +110,7 @@ protected override void CreateAgentComponents()
$@"{SourceHomeBuilderPath}\extensions\NewRelic.Providers.Wrapper.AwsSdk.Instrumentation.xml",
$@"{SourceHomeBuilderPath}\extensions\NewRelic.Providers.Wrapper.AzureFunction.Instrumentation.xml",
$@"{SourceHomeBuilderPath}\extensions\NewRelic.Providers.Wrapper.Memcached.Instrumentation.xml",
$@"{SourceHomeBuilderPath}\extensions\NewRelic.Providers.Wrapper.OpenSearch.Instrumentation.xml",
};

ExtensionXsd = $@"{SourceHomeBuilderPath}\extensions\extension.xsd";
Expand Down
12 changes: 12 additions & 0 deletions src/Agent/MsiInstaller/Installer/Product.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,9 @@ SPDX-License-Identifier: Apache-2.0
<Component Id="MemcachedWrapperComponent" Guid="{2FF15179-BBEB-460C-A145-10F20C0CAD07}">
<File Id="MemcachednWrapperFile" Name="NewRelic.Providers.Wrapper.Memcached.dll" KeyPath="yes" Source="$(var.HomeFolderPath)\extensions\NewRelic.Providers.Wrapper.Memcached.dll" />
</Component>
<Component Id="OpenSearchWrapperComponent" Guid="{7C996233-F71E-48C2-B389-82F0E0CAB002}">
<File Id="OpenSearchWrapperFile" Name="NewRelic.Providers.Wrapper.OpenSearch.dll" KeyPath="yes" Source="$(var.HomeFolderPath)\extensions\NewRelic.Providers.Wrapper.OpenSearch.dll" />
</Component>
</ComponentGroup>

<ComponentGroup Id="CoreNewRelic.Agent.Extensions" Directory="CoreProgramFilesExtensionsFolder">
Expand Down Expand Up @@ -482,6 +485,9 @@ SPDX-License-Identifier: Apache-2.0
<Component Id="CoreMemcachedWrapperComponent" Guid="{1D7D04A1-24D5-4716-B7CB-EACB21D66D7D}">
<File Id="CoreMemcachedWrapperFile" Name="NewRelic.Providers.Wrapper.Memcached.dll" KeyPath="yes" Source="$(var.HomeFolderPath)_coreclr\extensions\NewRelic.Providers.Wrapper.Memcached.dll" />
</Component>
<Component Id="CoreOpenSearchWrapperComponent" Guid="{C04FA73A-3232-409E-9E82-7CD27C18845D}">
<File Id="CoreOpenSearchWrapperFile" Name="NewRelic.Providers.Wrapper.OpenSearch.dll" KeyPath="yes" Source="$(var.HomeFolderPath)_coreclr\extensions\NewRelic.Providers.Wrapper.OpenSearch.dll" />
</Component>
</ComponentGroup>

<!-- Wrapper Instrumentation Files-->
Expand Down Expand Up @@ -600,6 +606,9 @@ SPDX-License-Identifier: Apache-2.0
<Component Id="MemcachedInstrumentationComponent" Guid="{065F899F-4942-43C6-9589-538C432E3E4D}">
<File Id="MemcachedInstrumentationFile" Name="NewRelic.Providers.Wrapper.Memcached.Instrumentation.xml" KeyPath="yes" Source="$(var.HomeFolderPath)\extensions\NewRelic.Providers.Wrapper.Memcached.Instrumentation.xml" />
</Component>
<Component Id="OpenSearchInstrumentationComponent" Guid="{A4ACAB67-AC69-43C5-8FDF-DF3FF6794104}">
<File Id="OpenSearchInstrumentationFile" Name="NewRelic.Providers.Wrapper.OpenSearch.Instrumentation.xml" KeyPath="yes" Source="$(var.HomeFolderPath)\extensions\NewRelic.Providers.Wrapper.OpenSearch.Instrumentation.xml" />
</Component>
</ComponentGroup>

<ComponentGroup Id="CoreNewRelic.Agent.Extensions.Instrumentation" Directory="CoreExtensionsFolder">
Expand Down Expand Up @@ -675,6 +684,9 @@ SPDX-License-Identifier: Apache-2.0
<Component Id="CoreMemcachedInstrumentationComponent" Guid="{5A78488A-837C-4CA5-BD20-4A1ED734C085}">
<File Id="CoreMemcachedInstrumentationFile" Name="NewRelic.Providers.Wrapper.Memcached.Instrumentation.xml" KeyPath="yes" Source="$(var.HomeFolderPath)_coreclr\extensions\NewRelic.Providers.Wrapper.Memcached.Instrumentation.xml"/>
</Component>
<Component Id="CoreOpenSearchInstrumentationComponent" Guid="{E2676B80-D7E2-4DFB-BDAF-75383810B0AB}">
<File Id="CoreOpenSearchInstrumentationFile" Name="NewRelic.Providers.Wrapper.OpenSearch.Instrumentation.xml" KeyPath="yes" Source="$(var.HomeFolderPath)_coreclr\extensions\NewRelic.Providers.Wrapper.OpenSearch.Instrumentation.xml" />
</Component>
</ComponentGroup>

<!-- Extensions XSD-->
Expand Down
Loading

0 comments on commit 2ad2d4a

Please sign in to comment.