-
-
Notifications
You must be signed in to change notification settings - Fork 338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exposed http client span as transaction #4162
Comments
Hi, By default the network request are recorded as span in a transaction, this can't be changed. But you can measure network request you are interested in manually using the Example: const span = Sentry.startInactiveSpan({
name: 'Request to example.request',
op: 'http.request',
forceTransaction: true,
});
await fetch('https://example.request');
span?.end(); Let us know if this works for you. |
Hi @krystofwoldrich , Thanks for getting back to me asap. I can see how that would work. Do you think its advisable if I add this And would this now create duplicates spans of Thank you |
Yes, you can do that. That's how our official integration works.
These new transactions will be standalone and won't show in other transactions. But the original spans will still be created. But you can disable the automatic spans by using https://github.com/getsentry/sentry-react-native/blob/5a5c4b4941fa6e71bf3b449d3bc5b5b6f635fc23/packages/core/src/js/tracing/reactnativetracing.ts#L28C1-L40C21 |
@krystofwoldrich Thank you so much! I will try it out! |
I'll close the issue for now, but feel free to comment here in case of any further related questions, we can reopen it again. |
For react-native performance monitoring.
We are trying to capture the api latency for individual API. We notice that the performance are able to capture
navigation
andui.load
as transaction but not forhttp.client
.By surfacing the http.client span as transaction, we would be able to create custom widgets that is tied to our product domain within our application. Example: Api latency on
/transaction
Thank you
Side note: We only integrate our Expo RN application to Sentry and not our backend. So we are not able to do
tracePropagationTargets
since we wouldnt have the origin endpoint info? (assumption)Do push me in the right direction. Thanks!
The text was updated successfully, but these errors were encountered: