Skip to content

Add abstraction for GetMetricsData processing #1325

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

Conversation

kgeckhart
Copy link
Contributor

This introduces a new package + abstraction getmetricsdata.processorwhich takes the responsibility of batching the requests, calling GetMetricData, and mapping the results. Now that an abstraction is in place we can share the logic between discovery jobs and custom jobs reducing the amount of code copy between the two and increase test coverage on this code path 🥳 .

This PR is intended to contain no logic changes just reorganization of code + adding tests.

Related to: #1290
Related to: #1094

Copy link
Contributor

@cristiangreco cristiangreco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@cristiangreco cristiangreco merged commit 3b5e265 into prometheus-community:master Mar 14, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants