public static Task <int?> GetExceptionsServer(Guid appid, string apikey, AppInsightsTimeSpan timeSpan) { return(GetTelemetryAsInt(appid, apikey, "metrics", "exceptions/count", timeSpan, "sum")); }
public static Task <int?> GetRequestsDuration(Guid appid, string apikey, AppInsightsTimeSpan timeSpan) { return(GetTelemetryAsInt(appid, apikey, "metrics", "requests/duration", timeSpan, "avg")); }
public static Task <int?> GetRequestsFailed(Guid appid, string apikey, AppInsightsTimeSpan timeSpan) { return(GetTelemetryAsInt(appid, apikey, "metrics", "requests/failed", timeSpan, "sum")); }
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?>()); }
public static Task <long?> GetTelemetrySize(Guid appid, string apikey, AppInsightsTimeSpan timeSpan) { return(GetTelemetryAsLong(appid, apikey, "metrics", "billingMeters/telemetrySize", timeSpan, "sum")); }
public static Task <int?> GetTelemetryCount(Guid appid, string apikey, AppInsightsTimeSpan timeSpan) { return(GetTelemetryAsInt(appid, apikey, "metrics", "billing/telemetryCount", timeSpan, "sum")); }
public static Task <int?> GetAvailabilityPercentage(Guid appid, string apikey, AppInsightsTimeSpan timeSpan) { return(GetTelemetryAsInt(appid, apikey, "metrics", "availabilityResults/availabilityPercentage", timeSpan, "avg")); }