-
Notifications
You must be signed in to change notification settings - Fork 91
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
feat(profiling): Add mixed profiles (profile event V2) #2685
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think creating a mixed format like this is the right approach. We could add a field to the current Android format to make it backwards compatible (we wouldn't need any change to the pipeline if the field is empty).
You can still reuse some elements of the sample format (like the Profile
struct) but besides that, let's keep things separate.
I agree adding an extra field on the Android profile is a faster way to go, but it would work only for Android. The mixed format would allow a general approach for Hybrid SDKs to pack multiple profiles. Compared to that adding a field to the Android profile works only on Android. (Mixed profiles could be used for iOS, Hermes...) Adding a field on the Android profile moves part of the complexity to SDKs, where the assembled event will change metadata based on the content. (Hermes -> Profiles V1, Hermes + iOS -> Profiles V1, Hermes + Android -> Android Profiles "V0") The SDK should send one format of metadata no matter the actual profiling data. If needed to reduce the complexity we can change the format in Relay. I'll adjust the PR, the mentioned points can be addressed in the future. |
Do we actually have to create another format for sample profilers? Why wouldn't we add the samples/stacks/frames the way we have the schema already, mixed in with the rest with adding the proper platform field to frames? I'm not convinced we need a new mixed schema. Android has always been treated differently because of the binary format it sends us not fitting anything else. For the rest, it seems like the sample format we created fits our needs, even with RN frames and samples mixed in with native frames and samples. |
The current format works for mixed profiles, but we mixed them on a device at the moment. We also convert RN Hermes profiles on a device. It's still a time-consuming task, but faster than parsing the Android binary trace. I'm not sure about adding
But as we would like to have our own Android profiler in the future which will produce our format, which will be simpler to process and merge on a device, maybe the workaround is acceptable in this case. |
Closing this in favor of simpler RN/Android specific format -> #2706 |
This PR drafts a structure of mixed profiles which enable us to ingest for example Mixed React Native and Android profiles.