title: Where to find custom metrics in Azure Portal
body: <p>I'm trying to send custom metrics to an App Service in Azure Portal given an instrumentation key. I have the following code running in .NET Core as part of a Background service:</p>
  <pre class="lang-cs prettyprint-override"><code>public override async Task StartAsync(CancellationToken stoppingToken)
  {
      try
      {
          TelemetryClient telemetry = new TelemetryClient();
          telemetry.TrackEvent(&quot;new event&quot;);
          var sample = new MetricTelemetry();
          sample.Name = &quot;metric name&quot;;
          sample.Value = 42.3;
          telemetry.TrackMetric(sample);
          telemetry.Flush();
      }
      catch (Exception e)
      {
          _logger.LogError($&quot;{e.Message} {e.StackTrace}&quot;);
      }
  }
  </code></pre>
  <p>This sample code comes from <a href="https://docs.microsoft.com/en-us/azure/azure-monitor/app/api-custom-events-metrics" rel="nofollow noreferrer">here</a>.</p>
  <p>However I'm not sure if these metrics are even reaching the Azure instance or where to look for them. I went to Application Insights &gt; MyInstance &gt; Logs and found a table there named 'customEvents'. However I can't query over it. On the Metrics tabs I only get the default metrics namespace which shows the default metrics available in Azure, but not any new custom metrics.</p>