Beispiel #1
0
 public void WriteDetail(ProfileWriterData header, ProfilerDetail[] details, TimeSpan time)
 {
     if (header.type == ProfilerType.Usage)
     {
         foreach (ProfilerDetail eachEntry in details)
         {
             TEL_CLIENT.TrackMetric(header.Name, (details == null) ? 1 : details.Length);
         }
     }
 }
 public void WriteDetail(ProfileWriterData header, ProfilerDetail[] details, TimeSpan time)
 {
     if (header.type == ProfilerType.Usage && details != null && details.Length > 0)
     {
         var metrics = new List <LogzMetricsData>(details.Length);
         foreach (var eachEntry in details)
         {
             metrics.Add(CreateMetrics(header, eachEntry));
         }
         metricSendingJob.AddItem(metrics.ToArray());
     }
 }
        private LogzMetricsData CreateMetrics(ProfileWriterData header, ProfilerDetail detail)
        {
            var settings = Settings.GetSettings();

            var metrics = new LogzMetricsData
            {
                Metrics = new LogzMetrics {
                    DetailCount = detail.Count
                },
                Dimensions = new LogzDimensions
                {
                    Name              = header.Name,
                    Details           = detail.Message,
                    HostName          = System.Environment.MachineName,
                    BasePortalUrlName = settings.PortalBaseUrl,
                    DecisionsVersion  = DecisionsVersion.VERSION
                }
            };

            return(metrics);
        }
Beispiel #4
0
 public void WriteSummary(ProfileWriterData header, ProfileTimeSummary timeSummary)
 {
     // Do Nothing.
 }