eddie8balltoliver / 850INEST

Just trying to find some relax...
Apache License 2.0
1 stars 0 forks source link

Setup Airbrake for your .NET application #2

Open eddie8balltoliver opened 2 years ago

eddie8balltoliver commented 2 years ago

Installation

Installation is available by the package repository NuGet. There are a variety of packages, each for different types of .NET apps:

Adding via Package Manager

For .NET 4.5.2 applications and above install the Sharpbrake.Client package available on NuGet via your Package Manager Console:

PM> Install-Package Sharpbrake.Client

Configuration

Before using the library and its notifiers, you must to configure them. In most cases, it is sufficient to configure only one, default, notifier.

(You can find your project ID and API key in your project's settings)

var airbrake = new AirbrakeNotifier(new AirbrakeConfig
  {
    ProjectId = "<Your project ID>",
    ProjectKey = "<Your project API KEY>"
  });

There are multiple ways to set your PROJECT_ID and PROJECT_KEY:

Full documentation

For a rundown of advanced configuration options and the notifier API provided for .NET/C# apps, please visit our GitHub.