This section contains some guidelines for handling errors that you may encounter when trying to collect .NET metrics.

Problem: No metrics received

No metrics are observed in your account.

Possible cause - Incorrect token and/or listener URL

Your token and/or listener URL may be incorrect.

Suggested remedy

  1. Navigate to Manage tokens > Data shipping tokens - Metrics and verify your account’s metrics token and listener URL.

  2. Check in the integration code whether the token and listener URL are specified correctly.

Possible cause - Shipper connectivity failure

Your host/server may not be connected to your listener.

Suggested remedy

Verify connectivity of your listener as follows.

  • For Linux and Mac servers, use telnet:

    telnet <<PORT>>
  • For Windows servers running Windows 8/Server 2012 and later, use the following command in PowerShell:

    Test-NetConnection -Port <<PORT>>

    Replace <<PORT>> with the appropriate port nummber. For HTTPS communication use port 8053. For HTTP communication use port 8052.

Possible cause - Incorrect listener endpoint

Your listener may not be using the correct endpoint.

Suggested remedy

Change the endpoint of your listener from https://<<LISTENER-HOST>>:<<PORT>> to http://<<LISTENER-HOST>>:<<PORT>> or from http://<<LISTENER-HOST>>:<<PORT>> to https://<<LISTENER-HOST>>:<<PORT>>

Replace <<LISTENER-HOST>> with the host for your region. For example, if your account is hosted on AWS US East, or if hosted on Azure West Europe. The required port depends whether HTTP or HTTPS is used: HTTP = 8070, HTTPS = 8071.

Possible cause - Kubernetes environment - is not set

If you’re running .NET on Kubernetes, the may not be enabled.

Suggested remedy

Make sure you have the scrape setting enabled as follows: true.

Possible cause - Code needs debugging

If all the above causes are not applicable, the code may need debugging.

Suggested remedy

Check if the following code works with your integration:

using System;
using System.Threading;
using System.Threading.Tasks;
using App.Metrics.Counter;
using App.Metrics.Scheduling;

namespace App.Metrics.Logzio
    class Program
        static void Main(string[] args)
            var metrics = new MetricsBuilder()
                .Report.ToLogzioHttp("[[logzio_endpoint]]", "[[metrics_token]]")

            var scheduler = new AppMetricsTaskScheduler(
                async () => { await Task.Run(() => metrics.ReportRunner.RunAsync<LogzioMetricsReporter>()); });

            var counter = new CounterOptions {Name = "my_counter", Tags = new MetricTags("test", "my_test")};



            Thread.Sleep(100000); // Lets the program to continue running so that the scheduler wiil be able to continue sending metrics to 

If this code is not working, we need to start debugging the integration.

App Metrics supports the following .NET logging providers:

  • Serilog
  • NLog
  • log4net
  • EntLib
  • Loupe

To see in-app logs, configure your desired log provider and change the properties of your config file as follows:

  • Copy to output directory to Copy if newer or Copy always.