Download the bash script
curl -sSfL https://install.middleware.io/apm/dotnet/v1.0.0-rc.1/scripts/mw-dotnet-auto-install.sh -O
Install core files
sh ./mw-dotnet-auto-install.sh rm -rf mw-dotnet-auto-install.sh
Enable execution for the instrumentation script
chmod +x $HOME/.mw-dotnet-auto/instrument.sh
Download Latest Middleware.dll.
Add Following code in .csproj file
<ItemGroup> <Reference Include="Middleware"> <HintPath>path\to\Middleware.dll</HintPath> </Reference> </ItemGroup>
MW_API_KEY={MW_API_KEY} \ . $HOME/.mw-dotnet-auto/instrument.sh && \ OTEL_SERVICE_NAME="{APM-SERVICE-NAME}" \ OTEL_RESOURCE_ATTRIBUTES=project.name="{APM-PROJECT-NAME}" \ dotnet path/to/YourApplication.dll
Was this page helpful?