...
|
...
|
@@ -231,25 +231,6 @@ static NSArray *kYHEventReportIgnoredViewControllerArray; |
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
- (void)reportWithHttpRequestFinish:(NSURLRequest*)request response:(NSURLResponse*)response error:(NSError*)error
|
|
|
{
|
|
|
@try {
|
|
|
NSString *hostInHTTPField = [request.allHTTPHeaderFields objectForKey:@"Host"];
|
|
|
if ([YHEventReport sharedInstance].isPerformanceTrackEnabled && [YHEventReport sharedInstance].isHttpPerformanceTrackEnable && !error && ([[request.URL host] isEqualToString:YHEventReportHttpHost] || [hostInHTTPField isEqualToString:YHEventReportHttpHost])) {
|
|
|
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse*)response;
|
|
|
NSDictionary *httpResponseHeaderFields = [httpResponse allHeaderFields];
|
|
|
NSString *contentLength = [NSString stringWithFormat:@"%lld",[[httpResponseHeaderFields objectForKey:@"Content-Length"] longLongValue]];
|
|
|
NSString *statusCode = [NSString stringWithFormat:@"%ld",(long)httpResponse.statusCode];
|
|
|
NSString *HTTPBodyStr = [[NSString alloc]initWithData:request.HTTPBody encoding:NSUTF8StringEncoding];
|
|
|
|
|
|
[[YH_EventCollector sharedInstance] timeEventEndWithRequestUrl:[request.URL absoluteString] HTTPMethod:request.HTTPMethod statusCode:statusCode contentLength:contentLength HTTPBodyStr:HTTPBodyStr];
|
|
|
}
|
|
|
} @catch (NSException *exception) {
|
|
|
YHLog(@"%@ error: %@", self, exception);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
#pragma mark - Exception handle methods
|
|
|
// 发送本地存储的Exception数据
|
|
|
- (void)uploadLocalErrorData
|
...
|
...
|
|