public async Task GetLogAnalyticsMetrics() { SubscriptionResource subscription = await Client.GetDefaultSubscriptionAsync(); ResourceGroupResource rg = await subscription.GetResourceGroups().GetAsync("CdnTest"); ProfileResource afdProfile = await rg.GetProfiles().GetAsync("testAFDProfile"); List <LogMetric> metric = new List <LogMetric>() { LogMetric.ClientRequestCount }; DateTimeOffset dateTimeBegin = new DateTimeOffset(2021, 9, 23, 0, 0, 0, TimeSpan.Zero); DateTimeOffset dateTimeEnd = new DateTimeOffset(2021, 9, 25, 0, 0, 0, TimeSpan.Zero); List <string> customDomain = new List <string>() { "customdomain4afd.azuretest.net" }; List <string> protocols = new List <string>() { "https" }; MetricsResponse mtricsResponse = await afdProfile.GetLogAnalyticsMetricsAsync(metric, dateTimeBegin, dateTimeEnd, LogMetricsGranularity.PT5M, customDomain, protocols); Assert.AreEqual(mtricsResponse.Granularity, MetricsResponseGranularity.PT5M); Assert.AreEqual(mtricsResponse.Series.Count, 0); }