Traces | Metrics | App Logs | Custom Logs | Profiling |
---|---|---|---|---|
✅ | ✅ | ✖️ | ✅ | ✅ |
Prerequisites
1
Infra Agent
Infrastructure Agent (Infra Agent). To install the Infra Agent, see our installation guide.
2
.NET Version
.NET version 6+
. Check your .NET version with the following command.Shell
Install
Step 1: Install .NET
APM Package
Step 1a: Run the following command in your terminal
Shell
Step 1b: Install core files
Shell
Step 1c: Enable execution for the instrumentation script
Shell
Step 2: Setup Middleware .NET Project
Download the latest Middleware.dll and add the following code in the.csproj
file.
XML
Step 3: Container Variables
Applications running in a container require an additional environment variable. If your application is not running in a container, move to Step 4.
Kubernetes
Add the following environment variable to your container:Shell
The default namespace for running the Middleware agent is
mw-service.mw-agent-ns.svc.cluster.local
. Docker
Add the following environment variables to your container:dockerfile
The
DOCKER_BRIDGE_GATEWAY_ADDRESS
is the IP address of the gateway between the Docker host and bridge network. This is 172.17.0.1
by default.
Learn more about Docker bridge networking here This only applies to .NET projects using the ASP framework.
dockerfile
Step 4: Enable Custom Logs [Optional]
Step 4a: Add the following functions:
C#
Step 4b: Add packages to YourApp.csproj
file
XML
Step 4c: Enable Logs in your project.cs
file
C#
Step 5: Build and Run .NET Application
Execute the following command to build and run your .NET application:Shell
Continuous Profiling
Continuous profiling captures real-time performance insights from your application to enable rapid identification of resource allocation, bottlenecks, and more. Navigate to the Continuous Profiling section to learn more about using Continuous Profiling with the .NET APM. Need assistance or want to learn more about Middleware? Contact us at support[at]middleware.io.