-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[exporterhelper] Fix metric name preservation during request splitting #13238
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
base: main
Are you sure you want to change the base?
[exporterhelper] Fix metric name preservation during request splitting #13238
Conversation
Resolve an issue in where metric names were lost when splitting objects. Updated logic now ensures all metric fields, including names, are retained across splitting operations. Added relevant tests to validate the fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there is a bug please add a test to reproduce it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment about new added bug. Please add tests
Ensure metric metadata is copied when splitting data points by adding a `CopyTo` call. Added comprehensive test coverage to verify correct behavior for various metric types and scenarios.
Previously, RequestSizerTypeBytes was calculating datapoint size incorrectly due to the omission of 'name', 'description', and 'unit' fields. This commit rectifies the calculation by including these fields.
@bogdandrutu |
This update ensures that metadata is copied from source to destination metrics during transformation. Tests have been updated to validate metadata handling, including verifying key-value pairs in the metadata.
@bogdandrutu |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #13238 +/- ##
==========================================
- Coverage 91.64% 91.63% -0.02%
==========================================
Files 522 522
Lines 29183 29191 +8
==========================================
+ Hits 26746 26750 +4
- Misses 1920 1923 +3
- Partials 517 518 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-authored-by: Damien Mathieu <[email protected]>
@bogdandrutu |
Description
This PR fixes an issue in exporter/exporterhelper's sending_queue where metric names were lost during metricRequest splitting. Previously, when large batches of metrics were processed, the splitting logic in metric_batch.go could cause the name field of some metrics to disappear. This fix ensures that all metric fields are properly preserved when metricRequest objects are split.
Link to tracking issue
Fixes #13236