Replies: 1 comment
-
Sorry for the delay on this @AishuVaid - you may have already moved on. I believe you have to set the response code manually per the docs: https://rnfirebase.io/perf/usage#http-request-tracing // Perform a HTTP request and provide response information
const response = await fetch(url);
metric.setHttpResponseCode(response.status);
metric.setResponseContentType(response.headers.get('Content-Type'));
metric.setResponsePayloadSize(response.headers.get('Content-Length'));
// Stop the metric
await metric.stop(); You'll need to post your code to get more detailed assistance |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I've been trying to run performance monitoring on firebase for my react-native app with the library @react-native-firebase/perf using version 7.6.1. I have integrated the SDK,the automatic logs appear on the firebase console. I've been trying to trace few HTTP Requests events but I get a warning which says :
"Warning: A firebase.perf.HttpMetric (GET: http://foo.com/) failed to provide a httpResponseCode; this metric will not be visible on the Firebase console."
I've used the latest version and added the metrics according to the docs.
Is this the expected way to log the event?
Beta Was this translation helpful? Give feedback.
All reactions