diff --git a/.github/workflows/build-centos-native-container.yml b/.github/workflows/build-centos-native-container.yml index 90b6d4ef3a..56e1c5533e 100644 --- a/.github/workflows/build-centos-native-container.yml +++ b/.github/workflows/build-centos-native-container.yml @@ -16,7 +16,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # tag: v4.1.7 + uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # tag: v4.2.0 with: fetch-depth: 0 # fetching all, needed to correctly calculate version diff --git a/.github/workflows/build-container.yml b/.github/workflows/build-container.yml index d0669817eb..98febbabe0 100644 --- a/.github/workflows/build-container.yml +++ b/.github/workflows/build-container.yml @@ -26,7 +26,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # tag: v4.1.7 + uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # tag: v4.2.0 with: fetch-depth: 0 # fetching all, needed to correctly calculate version diff --git a/.github/workflows/build-nuget-packages.yml b/.github/workflows/build-nuget-packages.yml index 2eecde3e0a..c9c80b0cb9 100644 --- a/.github/workflows/build-nuget-packages.yml +++ b/.github/workflows/build-nuget-packages.yml @@ -23,7 +23,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # tag: v4.1.7 + uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # tag: v4.2.0 with: fetch-depth: 0 # fetching all, needed to correctly calculate version diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0cef086f8d..de3f3b3d90 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,7 +29,7 @@ jobs: run: cat /etc/os-release - name: Checkout - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # tag: v4.1.7 + uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # tag: v4.2.0 with: fetch-depth: 0 # fetching all, needed to correctly calculate version diff --git a/.github/workflows/build_and_push_image.yml b/.github/workflows/build_and_push_image.yml index b2bd62337e..a3a47ce73d 100644 --- a/.github/workflows/build_and_push_image.yml +++ b/.github/workflows/build_and_push_image.yml @@ -16,7 +16,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # tag: v4.1.7 + uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # tag: v4.2.0 - name: Log in to the Container registry uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # tag: v3.3.0 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7105ab9218..07d213fe66 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -53,7 +53,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # tag: v4.1.7 + uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # tag: v4.2.0 with: fetch-depth: 0 # fetching all, needed to correctly calculate version @@ -123,7 +123,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # tag: v4.1.7 + uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # tag: v4.2.0 with: fetch-depth: 0 # fetching all, needed to correctly calculate version @@ -163,7 +163,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # tag: v4.1.7 + uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # tag: v4.2.0 with: fetch-depth: 0 # fetching all, needed to correctly calculate version @@ -232,7 +232,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # tag: v4.1.7 + uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # tag: v4.2.0 with: fetch-depth: 0 # fetching all, needed to correctly calculate version @@ -263,7 +263,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # tag: v4.1.7 + uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # tag: v4.2.0 with: fetch-depth: 0 # fetching all, needed to correctly calculate version diff --git a/.github/workflows/demo.yml b/.github/workflows/demo.yml index 49992f179e..737bdfc031 100644 --- a/.github/workflows/demo.yml +++ b/.github/workflows/demo.yml @@ -17,7 +17,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # tag: v4.1.7 + uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # tag: v4.2.0 - name: Test demo run: make test diff --git a/.github/workflows/dotnet-format.yml b/.github/workflows/dotnet-format.yml index bf059335b5..9fb5bec316 100644 --- a/.github/workflows/dotnet-format.yml +++ b/.github/workflows/dotnet-format.yml @@ -20,7 +20,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # tag: v4.1.7 + uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # tag: v4.2.0 - name: Setup .NET 8 uses: actions/setup-dotnet@6bd8b7f7774af54e05809fcc5431931b3eb1ddee # tag: v4.0.1 diff --git a/.github/workflows/format-native.yml b/.github/workflows/format-native.yml index d6274b957f..92ff484aaf 100644 --- a/.github/workflows/format-native.yml +++ b/.github/workflows/format-native.yml @@ -17,7 +17,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # tag: v4.1.7 + uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # tag: v4.2.0 - name: Install Clang tools shell: bash @@ -32,7 +32,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # tag: v4.1.7 + uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # tag: v4.2.0 - name: Setup Go uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # tag: v5.0.2 diff --git a/.github/workflows/release-publish.yml b/.github/workflows/release-publish.yml index cadaec41a9..b646dc50c4 100644 --- a/.github/workflows/release-publish.yml +++ b/.github/workflows/release-publish.yml @@ -114,7 +114,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # tag: v4.1.7 + uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # tag: v4.2.0 - name: Test the Shell scripts from README.md in Docker container run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0d47612884..db934f48bd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,7 +34,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # tag: v4.1.7 + uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # tag: v4.2.0 - name: Download artifacts uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # tag: v4.1.8 diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml index 4121cbc2b2..0dc3db305c 100644 --- a/.github/workflows/shellcheck.yml +++ b/.github/workflows/shellcheck.yml @@ -11,7 +11,7 @@ jobs: shellcheck: runs-on: ubuntu-latest steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # tag: v4.1.7 + - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # tag: v4.2.0 - name: Install shellcheck run: sudo apt update && sudo apt install --assume-yes shellcheck diff --git a/.github/workflows/validate-documentation.yml b/.github/workflows/validate-documentation.yml index db482fa14e..2a0a66e987 100644 --- a/.github/workflows/validate-documentation.yml +++ b/.github/workflows/validate-documentation.yml @@ -22,7 +22,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # tag: v4.1.7 + uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # tag: v4.2.0 - name: Run markdown links chceks if: ${{ !contains(github.event.pull_request.labels.*.name, 'release PR') }} diff --git a/.github/workflows/verify-test.yml b/.github/workflows/verify-test.yml index 61f0b7200d..612738d9df 100644 --- a/.github/workflows/verify-test.yml +++ b/.github/workflows/verify-test.yml @@ -30,7 +30,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # tag: v4.1.7 + uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # tag: v4.2.0 - name: Setup ARM64 Environment Variables if: ${{ matrix.machine == 'otel-linux-arm64' }} diff --git a/src/OpenTelemetry.AutoInstrumentation.Loader/Loader.NetFramework.cs b/src/OpenTelemetry.AutoInstrumentation.Loader/Loader.NetFramework.cs index 5016955aa2..85b57fc019 100644 --- a/src/OpenTelemetry.AutoInstrumentation.Loader/Loader.NetFramework.cs +++ b/src/OpenTelemetry.AutoInstrumentation.Loader/Loader.NetFramework.cs @@ -33,7 +33,30 @@ private static string ResolveManagedProfilerDirectory() return null; } - Logger.Debug("Requester [{0}] requested [{1}]", args?.RequestingAssembly?.FullName ?? "", args?.Name ?? ""); + Logger.Debug("Requester [{0}] requested [{1}]", args.RequestingAssembly?.FullName ?? "", args.Name ?? ""); + + // All MongoDB* are signed and does not follow https://learn.microsoft.com/en-us/dotnet/standard/library-guidance/versioning#assembly-version + // There is no possibility to automatically redirect from 2.28.0 to 2.29.0. + // Loading assembly and ignoring this version. + if (assemblyName.StartsWith("MongoDB", StringComparison.OrdinalIgnoreCase) && + (string.Equals(assemblyName, "MongoDB.Driver.Core", StringComparison.OrdinalIgnoreCase) || + string.Equals(assemblyName, "MongoDB.Bson", StringComparison.OrdinalIgnoreCase) || + string.Equals(assemblyName, "MongoDB.Libmongocrypt", StringComparison.OrdinalIgnoreCase))) + { + try + { + var mongoAssembly = Assembly.Load(assemblyName); + Logger.Debug("Assembly.Load(\"{0}\") succeeded={1}", assemblyName, mongoAssembly != null); + return mongoAssembly; + } + catch (Exception ex) + { + Logger.Debug(ex, "Assembly.Load(\"{0}\") Exception: {1}", assemblyName, ex.Message); + } + + return null; + } + var path = Path.Combine(ManagedProfilerDirectory, $"{assemblyName}.dll"); if (File.Exists(path)) {