title: Trying to configure metrics.net in asp net core
body: <p>I have a asp.net core web application, and i want to use metrics.net.</p>
  
  <p>before, i configure metrics and owin like this:</p>
  
  <pre class="lang-c# prettyprint-override"><code>Metric.Config
              .WithInternalMetrics()
              .WithOwin(middleware =&gt; app.Use(middleware), config =&gt; config
                  .WithRequestMetricsConfig(c =&gt; c.WithErrorsMeter()
                                                  .WithActiveRequestCounter()
                                                  .WithPostAndPutRequestSizeHistogram()
                                                  .WithRequestTimer()
                                              , new[] {
                                                      new Regex("(?i)^metrics"),
                                                      new Regex("(?i)^health"),
                                                      new Regex("(?i)^json")
                                                      }
                                              )
                  .WithMetricsEndpoint(endpointConfig =&gt;
                  {
                      endpointConfig
                          .MetricsTextEndpoint(enabled: false);                            
                  })
              );
  </code></pre>
  
  <p>how can i do some similar in asp net core?</p>