Add a services.json endpoint for Prometheus service discovery

This commit is contained in:
Tim Wojtulewicz 2024-03-13 15:28:48 -07:00
parent abb84db6c8
commit e93e4cc26d
10 changed files with 140 additions and 69 deletions

View file

@ -331,6 +331,12 @@ public:
return nullptr;
}
/**
* @return A JSON description of the cluster configuration for reporting
* to Prometheus for service discovery requests.
*/
std::string GetClusterJson() const;
protected:
template<class F>
static auto WithLabelNames(Span<const LabelView> xs, F continuation) {