I faced the problem when tried to write a custom collector for my project.
The type definition for the collector is typedef prom_map_t *prom_collect_fn(prom_collector_t *self);
However prom_collector_t is an opaque type and even metrics field can't be accessed outside library to be returned by the custom collector.
I added a definition of the existing prom_collector_default_collect function that just returns metrics member of the collector.
I faced the problem when tried to write a custom collector for my project. The type definition for the collector is
typedef prom_map_t *prom_collect_fn(prom_collector_t *self);
Howeverprom_collector_t
is an opaque type and evenmetrics
field can't be accessed outside library to be returned by the custom collector. I added a definition of the existingprom_collector_default_collect
function that just returnsmetrics
member of the collector.