예제 #1
0
 public static Task <int?> GetExceptionsServer(Guid appid, string apikey, AppInsightsTimeSpan timeSpan)
 {
     return(GetTelemetryAsInt(appid, apikey, "metrics", "exceptions/count", timeSpan, "sum"));
 }
예제 #2
0
 public static Task <int?> GetRequestsDuration(Guid appid, string apikey, AppInsightsTimeSpan timeSpan)
 {
     return(GetTelemetryAsInt(appid, apikey, "metrics", "requests/duration", timeSpan, "avg"));
 }
예제 #3
0
 public static Task <int?> GetRequestsFailed(Guid appid, string apikey, AppInsightsTimeSpan timeSpan)
 {
     return(GetTelemetryAsInt(appid, apikey, "metrics", "requests/failed", timeSpan, "sum"));
 }
예제 #4
0
        private static async Task <long?> GetTelemetryAsLong(Guid appid, string apikey, string operation, string path, AppInsightsTimeSpan timespan, string aggregation)
        {
            var result = await GetTelemetry(appid, apikey, "metrics", path, timespan.ToString(), aggregation);

            return(result["value"][path][aggregation].Value <long?>());
        }
예제 #5
0
 public static Task <long?> GetTelemetrySize(Guid appid, string apikey, AppInsightsTimeSpan timeSpan)
 {
     return(GetTelemetryAsLong(appid, apikey, "metrics", "billingMeters/telemetrySize", timeSpan, "sum"));
 }
예제 #6
0
 public static Task <int?> GetTelemetryCount(Guid appid, string apikey, AppInsightsTimeSpan timeSpan)
 {
     return(GetTelemetryAsInt(appid, apikey, "metrics", "billing/telemetryCount", timeSpan, "sum"));
 }
예제 #7
0
 public static Task <int?> GetAvailabilityPercentage(Guid appid, string apikey, AppInsightsTimeSpan timeSpan)
 {
     return(GetTelemetryAsInt(appid, apikey, "metrics", "availabilityResults/availabilityPercentage", timeSpan, "avg"));
 }