Skip to content

Commit

Permalink
fix(firebase_performance): HttpMetric send only non-null values on …
Browse files Browse the repository at this point in the history
…`stop()` (#7593)
  • Loading branch information
russellwheatley committed Dec 14, 2021
1 parent abe4c2c commit 16ec31e
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,13 @@ class MethodChannelHttpMetric extends HttpMetricPlatform {
<String, Object?>{
'handle': _httpMetricHandle,
'attributes': _attributes,
'httpResponseCode': _httpResponseCode,
'requestPayloadSize': _requestPayloadSize,
'responseContentType': _responseContentType,
'responsePayloadSize': _responsePayloadSize,
if (_httpResponseCode != null) 'httpResponseCode': _httpResponseCode,
if (_requestPayloadSize != null)
'requestPayloadSize': _requestPayloadSize,
if (_responseContentType != null)
'responseContentType': _responseContentType,
if (_responsePayloadSize != null)
'responsePayloadSize': _responsePayloadSize,
},
);
_hasStopped = true;
Expand Down

0 comments on commit 16ec31e

Please sign in to comment.