Optionally disable Process and Platform collectors
See original GitHub issueIs there any way to optionally disable those collectors during usage? I would like to be able to disable those metrics from being generated except if they will actually be used.
A quick check on the code shows me that they are loaded from prometheus_client/__init__.py
but there aren’t (that I see) many options on that except by doing a PR with code modified.
I was able to see that trying to import resource
on Microsoft Windows used to cause an exception, but the current version only ignores and generate constant values for those metrics:
Thanks!
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:17 (6 by maintainers)
Top Results From Across the Web
IZ64862: OPTIONALLY DISABLE JOB OBJECT AND ... - IBM
This behavior is caused by MS Windows libraries that uses such cpu to enumerate the JobObjects elements. Problem occurs in systems where a...
Read more >Collector (Java Platform SE 8 ) - Oracle Help Center
A Collector is specified by four functions that work together to accumulate entries into a mutable result container, and optionally perform a final...
Read more >Enable/disable the xDB and the tracker
To disable data collection, set the Xdb.Enabled setting to false . Open the web.config file and in the <appSettings> section, in ...
Read more >Create and manage an inherited process - Azure DevOps ...
To customize any project defined on a collection for TFS 2018 or earlier, ... Add a project based on a process; Enable or...
Read more >Managing AWS Regions - AWS General Reference
Learn how to enable and disable AWS Regions. ... An AWS Region is a collection of AWS resources in a geographic area. Each...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
very good! unregister default metrics.
there are thousands of exporter and with default metrics it could be 1000*100 it will create a big problem to time series database.
export only defined metrics:
Thanks for the help @valdemarpavesi. This is the code I ended up with, to clean up all the built-in metrics.