Refactor kubelet metricsets to share response from endpoint#25782
Merged
ChrsMark merged 8 commits intoelastic:masterfrom May 28, 2021
Merged
Refactor kubelet metricsets to share response from endpoint#25782ChrsMark merged 8 commits intoelastic:masterfrom
ChrsMark merged 8 commits intoelastic:masterfrom
Conversation
Signed-off-by: chrismark <chrismarkou92@gmail.com>
Contributor
💔 Build Failed
Expand to view the summary
Build stats
Trends 🧪Steps errors
Expand to view the steps failures
|
Contributor
|
Pinging @elastic/integrations (Team:Integrations) |
Signed-off-by: chrismark <chrismarkou92@gmail.com>
Signed-off-by: chrismark <chrismarkou92@gmail.com>
jsoriano
approved these changes
May 27, 2021
Member
jsoriano
left a comment
There was a problem hiding this comment.
Looks good, only some nitpicking.
Comment on lines
+42
to
+43
| GetSharedFamilies(prometheus p.Prometheus) ([]*dto.MetricFamily, error) | ||
| GetSharedKubeletStats(http *helper.HTTP) ([]byte, error) |
Member
There was a problem hiding this comment.
Nit. I am thinking now that this being shared is an implementation detail, interface and consumers don't care if the response is shared or cached.
Suggested change
| GetSharedFamilies(prometheus p.Prometheus) ([]*dto.MetricFamily, error) | |
| GetSharedKubeletStats(http *helper.HTTP) ([]byte, error) | |
| GetFamilies(prometheus p.Prometheus) ([]*dto.MetricFamily, error) | |
| GetKubeletStats(http *helper.HTTP) ([]byte, error) |
Co-authored-by: Jaime Soriano Pastor <jaime.soriano@elastic.co>
Signed-off-by: chrismark <chrismarkou92@gmail.com>
Member
Author
|
/package |
Member
Author
|
Failing tests seem to be unrelated (hitting issue reported at #25956). Merging this one. |
ChrsMark
added a commit
that referenced
this pull request
May 28, 2021
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.
What does this PR do?
Follow up of #25640. This PR changes how kubernetes module handle metricsets which collect metrics from kubelet's API and which share same target endpoint.
Metricsets affected:
systempodnodevolumecontainerWhy is it important?
To improve the performance of the module by avoid fetching same content multiple times.
How to test this PR locally
Related issues
Closes #24869
Screenshots