public async Task SubmitPointAsync(MetricBuilder builder)
        {
            // TODO: [TESTS] (MetricService.SubmitPointAsync) Add tests
            if (!Enabled)
            {
                return;
            }

            await SubmitPointAsync(builder.Build(_dateTime.UtcNow));
        }
Example #2
0
        public static void Enqueue(this Reporter reporter, string alias, Dictionary <string, object> data = null)
        {
            var builder = new MetricBuilder();

            builder.WithTimestamp()
            .WithAlias(alias)
            .WithPath(GeneratePath(alias));

            if (data != null && data.Any())
            {
                foreach (var pair in data)
                {
                    builder.WithData(pair.Key, pair.Value);
                }
            }

            reporter.Enqueue(builder.Build());
        }
Example #3
0
 public static void Enqueue(this Reporter reporter, MetricBuilder builder)
 {
     reporter.Enqueue(builder.Build());
 }