Say you are instrumenting a metric *app_widgets_total*, and your implementation is based on *std::vector<Widget> mWidgets*. It seems the client libraries (at least the one I looked at) expect you to explicitly instrument every change to *mWidgets*. It seems natural you might want to just bind your Gauge to *mWidgets.size() - *there might be threading ramifications but is this possible/feasible? One could presumably write their own specialised client library changes, is that commonly done or considered a Bad Idea?
In the context of an Exporter where you wish to respect the Prometheus scrape-frequency, it would be nice if there were a callback to inform you of a scrape request and again I cannot tell if this is considered sensible or not. Thanks for any insight. -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/CAGJRanjcQnekxfZrhRHGNJp-9ud8vsoHX0uytUWE89TF498Vtw%40mail.gmail.com.

