@@ -48,87 +48,87 @@ final class FirebasePerfNetworkValidator extends PerfMetricValidator {
48
48
*/
49
49
public boolean isValidPerfMetric () {
50
50
if (isEmptyUrl (networkMetric .getUrl ())) {
51
- logger .info ("URL is missing:" + networkMetric .getUrl ());
51
+ logger .warn ("URL is missing:" + networkMetric .getUrl ());
52
52
return false ;
53
53
}
54
54
URI uri = getResultUrl (networkMetric .getUrl ());
55
55
if (uri == null ) {
56
- logger .info ("URL cannot be parsed" );
56
+ logger .warn ("URL cannot be parsed" );
57
57
return false ;
58
58
}
59
59
60
60
if (!isAllowlisted (uri , appContext )) {
61
- logger .info ("URL fails allowlist rule: " + uri );
61
+ logger .warn ("URL fails allowlist rule: " + uri );
62
62
return false ;
63
63
}
64
64
if (!isValidHost (uri .getHost ())) {
65
- logger .info ("URL host is null or invalid" );
65
+ logger .warn ("URL host is null or invalid" );
66
66
return false ;
67
67
}
68
68
if (!isValidScheme (uri .getScheme ())) {
69
- logger .info ("URL scheme is null or invalid" );
69
+ logger .warn ("URL scheme is null or invalid" );
70
70
return false ;
71
71
}
72
72
if (!isValidUserInfo (uri .getUserInfo ())) {
73
- logger .info ("URL user info is null" );
73
+ logger .warn ("URL user info is null" );
74
74
return false ;
75
75
}
76
76
if (!isValidPort (uri .getPort ())) {
77
- logger .info ("URL port is less than or equal to 0" );
77
+ logger .warn ("URL port is less than or equal to 0" );
78
78
return false ;
79
79
}
80
80
if (!isValidHttpMethod (networkMetric .hasHttpMethod () ? networkMetric .getHttpMethod () : null )) {
81
- logger .info ("HTTP Method is null or invalid: " + networkMetric .getHttpMethod ());
81
+ logger .warn ("HTTP Method is null or invalid: " + networkMetric .getHttpMethod ());
82
82
return false ;
83
83
}
84
84
if (networkMetric .hasHttpResponseCode ()
85
85
&& !isValidHttpResponseCode (networkMetric .getHttpResponseCode ())) {
86
- logger .info ("HTTP ResponseCode is a negative value:" + networkMetric .getHttpResponseCode ());
86
+ logger .warn ("HTTP ResponseCode is a negative value:" + networkMetric .getHttpResponseCode ());
87
87
return false ;
88
88
}
89
89
if (networkMetric .hasRequestPayloadBytes ()
90
90
&& !isValidPayload (networkMetric .getRequestPayloadBytes ())) {
91
- logger .info ("Request Payload is a negative value:" + networkMetric .getRequestPayloadBytes ());
91
+ logger .warn ("Request Payload is a negative value:" + networkMetric .getRequestPayloadBytes ());
92
92
return false ;
93
93
}
94
94
if (networkMetric .hasResponsePayloadBytes ()
95
95
&& !isValidPayload (networkMetric .getResponsePayloadBytes ())) {
96
- logger .info (
96
+ logger .warn (
97
97
"Response Payload is a negative value:" + networkMetric .getResponsePayloadBytes ());
98
98
return false ;
99
99
}
100
100
if (!networkMetric .hasClientStartTimeUs () || networkMetric .getClientStartTimeUs () <= 0 ) {
101
- logger .info (
101
+ logger .warn (
102
102
"Start time of the request is null, or zero, or a negative value:"
103
103
+ networkMetric .getClientStartTimeUs ());
104
104
return false ;
105
105
}
106
106
if (networkMetric .hasTimeToRequestCompletedUs ()
107
107
&& !isValidTime (networkMetric .getTimeToRequestCompletedUs ())) {
108
- logger .info (
108
+ logger .warn (
109
109
"Time to complete the request is a negative value:"
110
110
+ networkMetric .getTimeToRequestCompletedUs ());
111
111
return false ;
112
112
}
113
113
if (networkMetric .hasTimeToResponseInitiatedUs ()
114
114
&& !isValidTime (networkMetric .getTimeToResponseInitiatedUs ())) {
115
- logger .info (
115
+ logger .warn (
116
116
"Time from the start of the request to the start of the response is null or a "
117
117
+ "negative value:"
118
118
+ networkMetric .getTimeToResponseInitiatedUs ());
119
119
return false ;
120
120
}
121
121
if (!networkMetric .hasTimeToResponseCompletedUs ()
122
122
|| networkMetric .getTimeToResponseCompletedUs () <= 0 ) {
123
- logger .info (
123
+ logger .warn (
124
124
"Time from the start of the request to the end of the response is null, negative or "
125
125
+ "zero:"
126
126
+ networkMetric .getTimeToResponseCompletedUs ());
127
127
return false ;
128
128
}
129
129
// Don't log any requests with a connection error set
130
130
if (!networkMetric .hasHttpResponseCode ()) {
131
- logger .info ("Did not receive a HTTP Response Code" );
131
+ logger .warn ("Did not receive a HTTP Response Code" );
132
132
return false ;
133
133
}
134
134
return true ;
0 commit comments