Description
Bug Report
Symptom
Describe the bug
After installing the OpenTelemetry .NET Instrumentation module on a functioning Windows EC2 instance using the PowerShell module from the latest GitHub release, and restarting IIS (iisreset), our previously working ASP.NET application throws a MethodNotFoundException when handling an API request.
Method not found: 'Void DSI.POS.Application.TicketManagement.TicketCommands.ScheduleTicketCommand..ctor(...)'
The API call completes successfully before installing the OpenTelemetry module. The error only appears after installing the module and restarting IIS.
Expected behavior
The API call should continue to work as it did before instrumentation was installed, without runtime errors like MethodNotFoundException.
Screenshots
N/A
Runtime environment (please complete the following information):
- OpenTelemetry Automatic Instrumentation version: v1.11.0
- OS: Windows Server 2025
- .NET version: 4.8
Additional context
The method that fails is a constructor in a custom domain library.
This error suggests a mismatch in method signatures or potential conflicts introduced by instrumentation.
The method exists and works prior to installing OpenTelemetry.
Reproduce
Steps to reproduce the behavior:
- Launch a Windows Server 2025 EC2 instance and deploy a working ASP.NET Web API application.
- Verify that the API endpoint works by making a successful request.
- Run the following PowerShell to install the OpenTelemetry module:
$ErrorActionPreference = 'Stop'
$ConfirmPreference = 'None'
$headers = @{ 'User-Agent' = 'PackerScript' }
$latestRelease = Invoke-RestMethod -Uri 'https://api.github.com/repos/open-telemetry/opentelemetry-dotnet-instrumentation/releases/latest' -Headers $headers
$asset = $latestRelease.assets | Where-Object { $_.name -like '*.psm1' }
if (-not $asset) { throw "Could not find a suitable OpenTelemetry module in the latest release." }
$module_url = $asset.browser_download_url
$download_path = Join-Path $env:temp $asset.name
Invoke-WebRequest -Uri $module_url -OutFile $download_path -UseBasicParsing
Import-Module $download_path
Install-OpenTelemetryCore
- Run iisreset
- Call the same API endpoint again
- Observe that the application now throws a MethodNotFoundException