aboutsummaryrefslogtreecommitdiffstats
path: root/metrics
diff options
context:
space:
mode:
authorKurkó Mihály <kurkomisi@users.noreply.github.com>2018-11-09 17:20:51 +0800
committerMartin Holst Swende <martin@swende.se>2018-11-09 17:20:51 +0800
commitf574c4e74b12d275d24b209aac8dd98ed9b9bb52 (patch)
tree5635b4f3532a9dd9b356b8bfea41ba1d63f49905 /metrics
parent870efeef01ad45f1e06bbe4479e5afa9986f3518 (diff)
downloaddexon-f574c4e74b12d275d24b209aac8dd98ed9b9bb52.tar.gz
dexon-f574c4e74b12d275d24b209aac8dd98ed9b9bb52.tar.zst
dexon-f574c4e74b12d275d24b209aac8dd98ed9b9bb52.zip
metrics, p2p: add ephemeral registry (#18067)
* metrics, p2p: add ephemeral registry * metrics: fix linter issue
Diffstat (limited to 'metrics')
-rw-r--r--metrics/registry.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/metrics/registry.go b/metrics/registry.go
index cc34c9dfd..c1cf7906c 100644
--- a/metrics/registry.go
+++ b/metrics/registry.go
@@ -311,7 +311,10 @@ func (r *PrefixedRegistry) UnregisterAll() {
r.underlying.UnregisterAll()
}
-var DefaultRegistry Registry = NewRegistry()
+var (
+ DefaultRegistry = NewRegistry()
+ EphemeralRegistry = NewRegistry()
+)
// Call the given function for each registered metric.
func Each(f func(string, interface{})) {