-
Notifications
You must be signed in to change notification settings - Fork 35
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
Expand wildcard targets into individual jobs #370
Conversation
47fb0eb
to
bd03af3
Compare
bd03af3
to
aaffe77
Compare
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.
So far, this looks great. It doesn't actually cover the use case of the target having ingress-per-unit and requiring a different scrape endpoint per job (yet), but this is a good abstration and cleanup.
I wonder whether it would be better to set a per-unit metrics path or to simply set a flag that ingress-per-unit is enabled. Passing in an IngressPerUnitRequirer
to MetricsEndpointProvider
and checking the status of that to determine the path is a much simpler UX, since the "actual" PathPrefix
is reasonably predictable, and could be constructed in the library so authors don't need to worry about how to create an external_url
property or similar.
On the other hand, making it more flexible allows for easier upkeep if the IPU API ever changes.
|
Issue
Config looks roughly like this:
The scrape URL components are split into two hierarcical levels of a scrape_config:
Currently,
"static_configs": [{"targets": ["*:1234"]}]
is autoexpanded intoWhich means we can't specify different
metrics_path
per unit, but it is needed when using ingress-per-unit.Solution
Expand wildcard targets into individual jobs
Context
#349
Testing Instructions
Release Notes