fix: stop metrics otap encode panic#2984
Draft
larry-c-ef wants to merge 1 commit into
Draft
Conversation
Stop metrics otap encode panic on otl bytes cursor misuse, and on missing resource. - Avoid draining the shared OTLP proto-bytes metrics() cursor (no pre-loop metrics().count()); emit scope/schema columns per metric instead. - Handle ResourceMetrics with no resource by still appending resource rows so Arrow struct lengths stay consistent. These changes fix a panic due to column mismatch in MetricsRecordBatchBuilder::finish. Tests - add regression tests (proto struct + realistic export bytes with catch_unwind) - add realistic export request fixture and source log under crates/pdata/testdata
|
Author
|
I created this draft so my company could get the ball rolling on the CLA. I will revise it later. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2984 +/- ##
==========================================
+ Coverage 85.90% 85.92% +0.01%
==========================================
Files 725 725
Lines 275426 275657 +231
==========================================
+ Hits 236617 236852 +235
+ Misses 38285 38281 -4
Partials 524 524
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Stop metrics otap encode panic on otl bytes cursor misuse, and on missing resource.
These changes fix a panic due to column mismatch in MetricsRecordBatchBuilder::finish.
Tests
Change Summary
What issue does this PR close?
How are these changes tested?
Are there any user-facing changes?