Closed slappyslap closed 3 years ago
+1
I agree that we need it. Unfortunately, I don't have enough time at the moment to provide us with the quality solution. And I don't know when I will have. So, if there is any volunteer to do that, the PR would be more than appreciated.
So, I checked it. It actually is already possible, see this test code:
/** @var Adapter $adapter */
$adapter = self::$container->get('prometheus_metrics_bundle.adapter');
// [ .... skipped .... ]
// wipe storage
$adapter->wipeStorage();
So, you can inject @prometheus_metrics_bundle.adapter
service to your code and call its wipeStorage
method when you need.
All is in the title, you can add a command to clear metrics (for exemple after some performance testing)