Deregister Metrics - GitAtSmsPortal/Metrics.NET GitHub Wiki
You can deregister a metric from the registry by simply calling the Deregister method for the specific metric type and passing the unique identifier of the metric instance.
Metric.DeregisterMeter("name");
If WithUniqueTagIdentifiers is enabled then the name and the tags for a metric will need to be passed through.
Metric.DeregisterMeter("name", new[] { "key1=value1,key2=value2" });
Similar methods are available for the other metric types as well:
- DeregisterGauge
- DeregisterCounter
- DeregisterHistogram
- DeregisterTimer