Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a way not to expose process_* metrics? #56

Open
nicolacdnll opened this issue Apr 21, 2021 · 2 comments
Open

Is there a way not to expose process_* metrics? #56

nicolacdnll opened this issue Apr 21, 2021 · 2 comments

Comments

@nicolacdnll
Copy link

As the title says, is there a way not to expose process_* metrics?

I've given a quick look at the code and prom_collector_registry_t->disable_process_metrics seems the knob I'm looking for, but it seems it's never used. Besides, it seems that collecting and exposing process metrics is enabled by default:

int prom_collector_registry_default_init(void) {
if (PROM_COLLECTOR_REGISTRY_DEFAULT != NULL) return 0;
PROM_COLLECTOR_REGISTRY_DEFAULT = prom_collector_registry_new("default");
if (PROM_COLLECTOR_REGISTRY_DEFAULT) {
return prom_collector_registry_enable_process_metrics(PROM_COLLECTOR_REGISTRY_DEFAULT);
}
return 1;
}

I guess that one could always edit and recompile the library but I was looking for something out of the box.

@xmcqueen
Copy link

xmcqueen commented May 6, 2021

If its been enabled by default for some time, it seems best to add a new cli option to turn them off via that disable_process_metrics setting you found.

@nicolacdnll are you going to put a PR for this?

@nicolacdnll
Copy link
Author

I might, but definitely not in the upcoming 2-3 weeks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants