improve CoreSv1.Status API with more detailed metrics

- add new metrics (off by default)
- add Debug boolean option for full metric details
- add Timezone option for 'running_since' field
- update default metrics shown and their constants
- remove utils.GetStartTime(), now use process metrics
This commit is contained in:
ionutboangiu
2024-09-06 23:11:06 +03:00
committed by Dan Christian Bogos
parent 98f770c61b
commit 62c30ab539
13 changed files with 416 additions and 124 deletions

View File

@@ -31,15 +31,6 @@ import (
"github.com/google/go-cmp/cmp"
)
func TestGetStartTime(t *testing.T) {
startCGRateSTime = time.Date(2020, time.April, 18, 23, 0, 0, 0, time.UTC)
eOut := startCGRateSTime.Format(time.UnixDate)
rcv := GetStartTime()
if !reflect.DeepEqual(eOut, rcv) {
t.Errorf("Expecting: %+v, received: %+v", eOut, rcv)
}
}
func TestFirstNonEmpty(t *testing.T) {
//only check with an empty string
rcv := FirstNonEmpty(EmptyString)