apm-agent-dotnet icon indicating copy to clipboard operation
apm-agent-dotnet copied to clipboard

[BUG] Profiler auto-instrumentation on .NET Framework 4.7.2+ doesn't honour the `VerifyServerCert` configuration

Open stevejgordon opened this issue 11 months ago • 1 comments

Our agent targets different versions of .NET, and specific code paths apply to each target for certain functionality. One of these is the handling for ELASTIC_APM_VERIFY_SERVER_CERT, which behaves differently on older .NET Framework versions (< 4.6.2) due to limitations there.

Our profiler zip asset only ships the base net462 libraries. Therefore, when using auto-instrumentation with the profiler, some features, including the verify server certificate configuration option, are not applied, even when the instrumented application runs on .NET 4.7.2 or newer.

We need to update the build scripts and release workflows to ensure that the net472 libraries are included in the zip file and resolved by the managed loader.

stevejgordon avatar Dec 12 '24 13:12 stevejgordon

Alternatively, we could investigate making this code path a runtime check rather than a compile-time feature requiring a specific target.

stevejgordon avatar Dec 12 '24 13:12 stevejgordon