public void SubmitSingleMetric(DataDogMetricSeries s)
        {
            const string apiPathProjects = "api/v1/series";
            const Method verb            = Method.POST;

            var output = JsonConvert.SerializeObject(s);


            ConfigureClientWithBodyContent(verb, apiPathProjects, output);

            //var content = response.Content; // raw content as string
            //return content;
        }
Exemplo n.º 2
0
        private static void SubmitMetricToDd(DataDogConfig datadogConfiguration)
        {
            var dProcessor = new DataDogProcessor(datadogConfiguration);
            var ddms       = new DataDogMetricSeries
            {
                series = new List <Series>
                {
                    new Series {
                        metric = "TestApp.TestCounter", points = new List <List <long> > {
                            new List <long> {
                                DateTimeOffset.UtcNow.ToUnixTimeSeconds(), 5
                            }
                        }
                    }
                }
            };


            dProcessor.SubmitSingleMetric(ddms);
            Logger.Info("Metric Sent");
        }