I'm working on a custom exporter, using the prometheus_client python library. I've read the documentation about auto_describe but it's not clear.
With auto_describe=True, the collect() method runs twice on each scrape. This is bad because it puts extra load on the target device. I can fix this by adding a describe() method that returns an empty list. That's easy, but I want to follow best practices. Is there any reason I should return a proper list of metrics instead? If I did want to implement a proper describe method, would it need to return a list of GaugeMetricFamily objects with name, help text, and labels? It seems like a lot of duplicated code with the collect() method... Are there any good example exporters to look at? My code is here: https://gist.github.com/llamafilm/0c2ce612273db11ad9d8edcd0643ab44 I'd be happy to hear any other feedback too since this is my first exporter. Thanks! -- You received this message because you are subscribed to the Google Groups "Prometheus Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-users+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/prometheus-users/1c343982-5693-426c-b6ef-f96bc8139526n%40googlegroups.com.