fix(orphan-chain): sentry logging #1140
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Add sentry logging when an orphan chain has been detected. To not spam the sentry I made send event only once.
Motivation and Context
This warning pop ups in many cases which is not obvious. With more logging it will be easier for developers to find the root cause.
How Has This Been Tested?
Create locally an orphan chain and check if logs appeared in sentry. In my case there was logged event with description:
Orphan chain detected: block 19debc546c857d112eddb1c3c76969e815c9d41be44fdbae57e88ca7576be152 at height 15725 not found in local chain. Block scan tip height: 15775 - Local tip height: 15670
What process can a PR reviewer use to test or verify this change?
Same as above.
Breaking Changes