Observability/metrics update (#1962)
* Removing logging from the NOOP implementatino * Simplifying the percentiles option * Simple logging implementation Co-authored-by: chris <chris@Profanity.local>
This commit is contained in:
@@ -9,10 +9,16 @@ import (
|
||||
func TestOptions(t *testing.T) {
|
||||
|
||||
// Make some new options:
|
||||
options := NewOptions(Path("/prometheus"), DefaultTags(map[string]string{"service": "prometheus-test"}))
|
||||
options := NewOptions(
|
||||
Address(":9999"),
|
||||
DefaultTags(map[string]string{"service": "prometheus-test"}),
|
||||
Path("/prometheus"),
|
||||
Percentiles([]float64{0.11, 0.22, 0.33}),
|
||||
)
|
||||
|
||||
// Check that the defaults and overrides were accepted:
|
||||
assert.Equal(t, ":9000", options.Address)
|
||||
assert.Equal(t, "/prometheus", options.Path)
|
||||
assert.Equal(t, ":9999", options.Address)
|
||||
assert.Equal(t, "prometheus-test", options.DefaultTags["service"])
|
||||
assert.Equal(t, "/prometheus", options.Path)
|
||||
assert.Equal(t, []float64{0.11, 0.22, 0.33}, options.Percentiles)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user