title: ASP.NET Sentry Configuration
body: <p>I have an ASP.NET MVC (4.6.1) website that we are trying to set up monitoring on with the Sentry service. </p>
  
  <p>According to the setup documentation, it just says to initialize Sentry as early as possible, but the structure of their example gives me cause to doubt that there isnt more to it. In my Gloabl.asax.cs file, I am calling a Custom model class that includes the Sentry Initialization. Here is a copy of the class:</p>
  
  <pre><code>public class SentryModel
      {
          public static void Configure()
          {
              var environment = ConfigurationManager.AppSettings["Environment"];
  
              //escape the method if we are in a development environment
              if (environment.Equals("development", StringComparison.CurrentCultureIgnoreCase))
                  return;
  
              Assembly web = Assembly.GetExecutingAssembly();
              AssemblyName webName = web.GetName();
              string myVersion = webName.Version.ToString();
              string dsn_data = ConfigurationManager.ConnectionStrings["Sentry"].ConnectionString;
  
              using (SentrySdk.Init(o =&gt;
              {
                  o.Dsn = new Dsn(dsn_data);
                  o.MaxBreadcrumbs = 50;
                  o.Debug = true;
                  o.Environment = environment;
                  o.Release = myVersion;
                  o.AttachStacktrace = true;
              }))
              {
                  // app code here
              }
          }
      }
  </code></pre>
  
  <p>My concern here is that we should really have something where the "//app code here" goes, but there is no guidance on what that is specifically. We obviously want sentry to monitor all error and events that happen within the app service. I have seen a few examples where an exception was explicitly sent to Sentry but nothing about the proper way to initialize the service and handle passive capturing. </p>
  
  <p>Thanks</p>