[release/6.0-preview5] Regression and Perf Fixes #52983
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.
Backport of #52956 to release/6.0-preview5
/cc @tarekgh
Customer Impact
The changes here are addressing some regression causing some failures in the OpenTelemetery when started using .NET 6.0 bits. Also, it fixes some memory allocation issue in the new exposed Metrics APIs for preview 5.
here is more info about the changes:
Testing
This has been tested with the OpenTelemetry failures and ensured fixing that. Also, added more tests for the failures in our regression tests. We have validated the memory allocation issue is fixed by manually instrumenting the scenario and looking at the allocated memory.
Risk
Is very low. The reason is, part of the change didn't change anything more than moving a couple of source lines a few lines down and we successfully run all tests against the change too. The other part of the change is in the newly exposed Metrics APIs which is going to have the first release in preview 5. In addition, the change is simple and not expected to cause any issue.