digitalocean / prometheus-client-c

A Prometheus Client in C
Other
158 stars 78 forks source link

Add method to unregister metrics #63

Open a-rose opened 2 years ago

a-rose commented 2 years ago

Hello,

This PR adds prom_collector_registry_unregister_metric(). This gives the ability to remove metrics without having to restart the whole registry.

It also contains a fix for a crash in prom_map_delete_internal where the node is deleted before its key, resulting in using a deleted object when deleting the key later on.