Example #1
0
        public void MetricsTest()
        {
            var data = new[]
            {
                new LogzMetricsData
                {
                    Metrics = new LogzMetrics {
                        DetailCount = 1
                    },
                    Dimensions = new LogzDimensions
                    {
                        Name = "Name", Details = "Test Detail", HostName = "HostName",
                        BasePortalUrlName = "BasePortalUrlName", DecisionsVersion = "DecisionsVersion"
                    }
                },
                new LogzMetricsData
                {
                    Metrics = new LogzMetrics {
                        DetailCount = 2
                    },
                    Dimensions = new LogzDimensions {
                        Name = "Name", Details = "metrics message"
                    }
                }
            };
            var res = LogzApi.SendMetrics(credential, data);

            Assert.IsTrue(res);
        }
 protected override void SendData(LogzMetricsData[] metrics)
 {
     if (!LogzApi.SendMetrics(CredentialHelper.Credentials, metrics))
     {
         LogConstants.SYSTEM.Error("Decisions.Monitoring.Logz.io failed to send Metrics");
     }
 }