line / promgen

Promgen is a configuration file generator for Prometheus
https://line.github.io/promgen/
MIT License
1.04k stars 150 forks source link

[IMPROVEMENT] Added exporter labels. #381

Closed ekhvalov closed 2 years ago

ekhvalov commented 2 years ago

To resolve issues #346 and partially #180

ekhvalov commented 2 years ago

New exporter scraping is fixed but scraping for existed exporters is still not working. We have to decide how to deal with it. I think we have two different types of scraping, one for existed exporters and another for new ones. Probably we have to scrape new exporters using my solution and create API especially for existed exporters. Also I have some questions. If is_parameter field was added, is it correct to allow users to name labels with double underscore prefix? Any validation is needed?

ekhvalov commented 2 years ago

I have removed field is_parameter and moved test config data to separate file in the examples folder. There is one more thing I have to do, is to solve saved exporters testing. I need some time to do it, because I have to get familiar with rest-framework.

ekhvalov commented 2 years ago

Exporters scraping is working via new REST endpoint. The old endpoint is still exists and could be removed if new one is OK.

kfdm commented 2 years ago

I apologize for the long delay without comment. I have not forgotten this PR, I have just been preoccupied with other work tasks which have made it more difficult to prioritize this.

Advanced users may have specific, legitimate use cases for this, there is also a large set of less advanced users who will not understand the implications and are very likely to make things more complicated by adding additional custom labels. I'm somewhat reluctant to merge as is, again not because the idea or code are bad, but because we need to be very careful that we can clearly communicate to the user when this feature should be used (since it likely should not be used in the most common cases). Unfortunately, this April may also be a little bit scattered in terms of ability so I can not currently commit to when I'll be able to think through all the implications of this change. 🙇