Skip to content
This repository was archived by the owner on Jun 17, 2026. It is now read-only.

Expose prom_collector_default_collect function#75

Open
dsmeytis wants to merge 1 commit into
digitalocean:masterfrom
dsmeytis:expose-default-collect
Open

Expose prom_collector_default_collect function#75
dsmeytis wants to merge 1 commit into
digitalocean:masterfrom
dsmeytis:expose-default-collect

Conversation

@dsmeytis

@dsmeytis dsmeytis commented Feb 5, 2023

Copy link
Copy Markdown

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants