You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, this is a native request but I hope you don't mind me putting it here rather than cross-posting ios/android.
We're using the DdTrace API to collect spans to represent user journeys and generate latency/availability metrics. Currently there's a gap in the case of a native crash, the span isn't ended so the availability metric isn't accurate.
On a crash we would like open spans to be ended and marked with an attribute such as error.crash.count: 1.
Perhaps this could be achieved by either:
a) The native crash handler adding the attribute, ending the open spans and writing them to disk
b) Probably safer: writing open spans to disk on span start. If there's a crash report from the previous run read the started spans, add the attribute and end them (although the end timestamp would be inaccurate)
Thanks for your time!
The text was updated successfully, but these errors were encountered:
This is indeed not supported at the moment in the SDK. I've added tasks in our backlog to look at possible implementations on both platforms.
In the meantime, you can probably solve this on your end for RN crashes by implementing a custom error handler for JS crashes like we do in our SDK, closing all open spans before letting the app crash.
Let me know if that solved (even partially) your problem!
We have indeed implemented a handler for JS side as you suggest. Seems to work well but fyi, found that we needed to add a short timeout before calling the previous handler to allow the spans to be written to disk. 10ms seems sufficient in my limited testing.
Hi, this is a native request but I hope you don't mind me putting it here rather than cross-posting ios/android.
We're using the DdTrace API to collect spans to represent user journeys and generate latency/availability metrics. Currently there's a gap in the case of a native crash, the span isn't ended so the availability metric isn't accurate.
On a crash we would like open spans to be ended and marked with an attribute such as
error.crash.count: 1
.Perhaps this could be achieved by either:
a) The native crash handler adding the attribute, ending the open spans and writing them to disk
b) Probably safer: writing open spans to disk on span start. If there's a crash report from the previous run read the started spans, add the attribute and end them (although the end timestamp would be inaccurate)
Thanks for your time!
The text was updated successfully, but these errors were encountered: