.NET Monitoring Quick Start Guide
Getting started with Instrumental and .NET
Here's how to get up and running with .NET application monitoring and Instrumental. Like all our agents, the .NET agent is designed to prevent exceptions from impacting your application. It's also completely non-blocking.
Installation
If you are using NuGet, add Instrumental.NET to your packages.config
:
<id="instrumental_agent" version="1.0.0" targetFramework="net45" />
Add the agent and configure it with your project token:
using Instrumental; var agent = new Agent("PROJECT_TOKEN");
Sending Metrics
Increments are simple counters. learn more
agent.Increment("myapp.logins");
Gauges represent a value at a point in time. learn more
agent.Gauge("myapp.api_results.count", 12345);
The time method measures a function call time.
Funcaction = () => { DoLongRunningAction(); return "everything is fine"; }; String actionResult = agent.Time("myapp.expensive_operation", action);
Sending Notices
Notices are project specific events.
agent.Notice("Deployed revision 038ade4 to production"); agent.Notice("event with a duration", TimeSpan.FromMinutes(15));
Using StatsD or statsite? We’ve got you covered with our StatsD backend and statsite sink