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-7415] - Ensure breadcrumbs are returned in the correct order #150

Merged
merged 11 commits into from Dec 22, 2021

Conversation

yousif-bugsnag
Copy link
Contributor

@yousif-bugsnag yousif-bugsnag commented Nov 26, 2021

Goal

Breadcrumbs added after MaximumBreadcrumbs is reached were being added from the start of the breadcrumb array, causing breadcrumbs to be added/returned in the wrong order.

Also fixes IndexOutOfRangeException and OverflowException errors when MaximumBreadcrumbs is set to a value < 1.

Design

The previous implementation was a bit over complicated. It has now been simplified, using a LinkedList instead of an Array and checking the config value before adding breadcrumbs.

Testing

Manually verified that breadcrumbs are returned in the correct order after MaximumBreadcrumbs is exceeded. Updated automated test to cover this scenario (the issue was being masked previously as the test was adding exactly double the MaximumBreadcrumbs value)

Copy link
Contributor

@twometresteve twometresteve left a comment

Choose a reason for hiding this comment

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

I'm happy if Gareth is.

@yousif-bugsnag yousif-bugsnag merged commit ac47c53 into next Dec 22, 2021
@yousif-bugsnag yousif-bugsnag deleted the 7415-breadcrumb-order branch January 31, 2022 11:49
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.

None yet

4 participants