API calls tracing shows the response time a lot more than expected.
OS:
- [ ] Windows
- [* ] MacOS
- [ ] Linux
Platform:
- [ ] iOS
- [ *] Android
SDK:
- [ *]
@sentry/react-native(>= 1.0.0) - [ ]
react-native-sentry(<= 0.43.2)
SDK version: 3.1.1
react-native version: 0.67.4
Are you using Expo?
- [ ] Yes
- [*] No
Are you using sentry.io or on-premise?
- [ ] sentry.io (SaaS)
- [*] on-premise
I have following issue: API calls tracing shows the response time a lot more than expected.
[Description] We have enabled API tracing in our application. When using the API's with postman or any another client, we get the response in under 200ms. (Average) But on Sentry the same API calls take upto 7s (most of them show somehwere between 2s and 3s which is also too long) which make the overall application work very slow. Is there anything that the SDK does that can make the API calls slow? Also how does Sentry calculate the response time for the requests? Because 2-3s do not make sense to me.
@awesome31 thanks for reporting, no, Sentry should not impact that much, we just intercept the call to collect the info from the API call and that's it, the matter of a few milliseconds, likely under ~2..3ms.
Can you reproduce that? Can you provide a minimal reproduction example?
In our examples, the requests are very similar to a simple curl in the console.
Closing the issue as a part of large repository cleanup, due to it being inactive and/or outdated. Please do not hesitate to ping me if it is still relevant, and I will happily reopen and work on it. Cheers!
I am also facing similar issue in android using this library- io.sentry:sentry-android-core:6.25.2. I am making an api call which usually takes around 300-400ms when I check in the App Inspection of Android studio. But when I start a span and finish it just after the api call using sentry the span duration in Sentry is reported as 700-800 ms and sometimes even more than that.
Example-
val fetchIpAddressSpan = transaction.startChild("fetch_ip_address", "Fetch IP Address")
val deviceIpAddress = Util.getIpAddress(context)
fetchIpAddressSpan.finish(SpanStatus.fromHttpStatusCode(200))
@HarshitPersona Hi, thank you for sharing this with us, would you be able to provide a minimal reproducible example?
Note that this is an RN issue. If this is still a problem, could you open a new issue in https://github.com/getsentry/sentry-java/issues?