forked from adamlaska/boulder
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscope.go
More file actions
19 lines (13 loc) · 753 Bytes
/
scope.go
File metadata and controls
19 lines (13 loc) · 753 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package metrics
import "github.com/prometheus/client_golang/prometheus"
// InternetFacingBuckets are the histogram buckets that should be used when
// measuring latencies that involve traversing the public internet.
var InternetFacingBuckets = []float64{.1, .5, 1, 5, 10, 30, 45}
// noopRegisterer mocks prometheus.Registerer. It is used when we need to
// register prometheus metrics in tests where multiple registrations would
// cause a panic.
type noopRegisterer struct{}
func (np *noopRegisterer) MustRegister(_ ...prometheus.Collector) {}
func (np *noopRegisterer) Register(_ prometheus.Collector) error { return nil }
func (np *noopRegisterer) Unregister(_ prometheus.Collector) bool { return true }
var NoopRegisterer = &noopRegisterer{}