Getting Started - n3wt0n/BugGuardian GitHub Wiki

Getting Started

BugGuardian is a library written in C#, targeting NetStandard 1.1, and it supports any application using .Net Framework 4.5 and above, .Net Core, and UWP apps (Windows 10).

It automates the process of handling unhandled exceptions allowing to report them as Bug or Task work item to Team Project hosted on Azure DevOps and Azure DevOps Server or Team Foundation Server 2015+.

Bug fields

The Bug work iteam on VSTS and TFS has several fields. BugGuardian uses the followings:

Title: used for the exception type and its source

Tags: every bug opened by BugGuardian is marked with a "BugGuardian" tag

Repro steps: used for the Stack Trace(s)

System info: used to save some info about the app hosting platform (the available info depend on the type of application monitored)

Found in: used to save the MD5 has of the exception (for internal use)

Task fields

The Bug work iteam on VSTS and TFS has several fields. BugGuardian uses the followings:

Title: used for the exception type and its source

Tags: every bug opened by BugGuardian is marked with a "BugGuardian" tag

Description: used for the Stack Trace(s) and to save some info about the app hosting platform (the available info depend on the type of application monitored)

Found in: used to save the MD5 has of the exception (for internal use, not visible)

Sync vs Async

The BugGuardianManager class is the entry point of the library. It offers two different versions of the AddBug and AddTask methods, one is sync and the other is async (called AddBugAsync and AddTaskAsync).

You can use one or the other based on your need, but note that also the sync version can impact on your app performances or blocks your UI. (As any slow synchronous call does...)

Azure DevOps vs Azure DevOps Server/TFS

If you want to target an Azure DevOps Server or a Team Foundation Server 2015+ team project, you don't have to do special things.
If you instead are targeting an Azure DevOps hosted team project, you can:

  • enable the Alternate Credentials and use that username/password combination in your configuration settings, or
  • create a Personal Access Token as shown here and use its value for both username and password

BugGuardian doesn't support TFS versions before the 2015 because the REST APIs it uses are not available in the previous versions of TFS.

IoC and Dependency Injection

While all the examples in this wiki use the "normal" approach, you can of course use your favorite IoC container and dependency injection techniques.

To do that, just use the IBugGuardianManager interface provided by the BugGuardian library.