Skip to content
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

[PLAT-5298] Remove breadcrumbs from client metadata #853

Merged
merged 4 commits into from
Oct 22, 2020

Conversation

nickdowell
Copy link
Contributor

Goal

These changes reduce the CPU and memory impact of leaving breadcrumbs by stopping the breadcrumbs array from being serialised into an in-memory JSON buffer every time a new one is added.

Changeset

BSSerializeDataCrashHandler which is invoked in the event of an unhandled error now reads in the breadcrumbs data from the file on disk. Previously, the breadcrumbs were included in bsg_g_bugsnag_data.stateJSON

This required a slight change to where the breadcrumbs reside within the KSCrashReport JSON structure, so the BSGParseBreadcrumbs function was updated to reflect this.

Testing

A unit test was added to measure the performance of leaving breadcrumbs. This should report any regressions against the baseline as a test failure.

End-to-end tests check the breadcrumbs payload and these have passed.

Manually verified that breadcrumbs are still reported to the dashboard.

Copy link
Contributor

@kattrali kattrali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good 🎉

Even though this doesn't have a public interface change, I'd recommend adding a changelog entry for this as its intended to address reported performance concerns and can be referenced in the future as a part of the next release.

@nickdowell nickdowell merged commit 014a29c into next Oct 22, 2020
@nickdowell nickdowell deleted the feature/remove-breadcrumbs-from-client-metadata branch October 22, 2020 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants