Cherry-pick #26334 to 7.x: Refactor of system/memory metricset #26589
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.
Cherry-pick of PR #26334 to 7.x branch. Original message:
Note that this won't work properly before #26251 is merged and I've re-tested everything with that. However we might also need some additional changes, discussed here: elastic/go-structform#32 (review)
What does this PR do?
This is a continuation of the ongoing refactor of the system module, this time for
system/memory. This is considerably simpler than the changes insystem/cpu, as the data requires less transformation.This is also a first pass at an attempt to move towards more "reporting-defined structures" within the system module, as the main
Memorystruct maps to the final data definition passed upstream. This requires us to do less manual mapping of data, and turns over most of the complexity to the conversion functions. This is designed to work with theOptXtypes introduced in thesystem/cpurefactor, as the above PR togo-structformwill properly see and omit theniltypes.-->
Why is it important?
This is part of an ongoing refactor of the system code, with a few goals
gosigarChecklist
CHANGELOG.next.asciidocorCHANGELOG-developer.next.asciidoc.How to test this PR locally
system/memorymetricset, make sure all fields are reporting properly, and all the data looks reasonable.