When a scrape job has a custom metrics_path AND uses star-notation, then the other side of the relation (consumer, i.e. the prom that scrapes) has the custom metrics_path ignored, and uses the default one.
On one hand, multiple units may have different hostnames but the exact same path prefix. In those cases the star-notation should still work.
On the other hand, with ingress-per-unit, each unit will have a different path so it should be possible to combine it with star-notation.
EDIT
Put differently, a job's target hostname has no effect, if the external_hostname= kwarg is not passed to MetricsEndpointProvider.
Still, after passing external_hostname, there is some duplication (apart from ingress nor path not being picked up):
Bug Description
When a scrape job has a custom metrics_path AND uses star-notation, then the other side of the relation (consumer, i.e. the prom that scrapes) has the custom metrics_path ignored, and uses the default one.
EDIT
Put differently, a job's
target
hostname has no effect, if theexternal_hostname=
kwarg is not passed to MetricsEndpointProvider.Still, after passing
external_hostname
, there is some duplication (apart from ingress nor path not being picked up):To Reproduce
Pass the following job to PromScrapeProvider:
Environment
N/A
Relevant log output
Additional context
Noticed this while working on ingress (#349).