@@ -40,7 +40,7 @@ func (m metricsImpl) GetCapabilities(
4040 _ * metrics.MetricsCapabilitiesRequest ,
4141) (* metrics.MetricsCapabilitiesResult , error ) {
4242 contextLogger := log .FromContext (ctx )
43- contextLogger .Trace ("metrics capabilities call received" )
43+ contextLogger .Info ("metrics capabilities call received" )
4444
4545 return & metrics.MetricsCapabilitiesResult {
4646 Capabilities : []* metrics.MetricsCapability {
@@ -60,17 +60,10 @@ func (m metricsImpl) Define(
6060 _ * metrics.DefineMetricsRequest ,
6161) (* metrics.DefineMetricsResult , error ) {
6262 contextLogger := log .FromContext (ctx )
63- contextLogger .Trace ("metrics define call received" )
63+ contextLogger .Info ("metrics define call received" )
6464
6565 return & metrics.DefineMetricsResult {
6666 Metrics : []* metrics.Metric {
67- {
68- FqName : testMetricName ,
69- Help : "this is a test metric" ,
70- VariableLabels : nil ,
71- ConstLabels : map [string ]string {"test" : "value" },
72- ValueType : & metrics.MetricType {Type : metrics .MetricType_TYPE_GAUGE },
73- },
7467 {
7568 FqName : firstRecoverabilityPointMetricName ,
7669 Help : "The first point of recoverability for the cluster as a unix timestamp" ,
@@ -90,7 +83,7 @@ func (m metricsImpl) Collect(
9083 req * metrics.CollectMetricsRequest ,
9184) (* metrics.CollectMetricsResult , error ) {
9285 contextLogger := log .FromContext (ctx )
93- contextLogger .Trace ("metrics collect call received" )
86+ contextLogger .Info ("metrics collect call received" )
9487
9588 configuration , err := config .NewFromClusterJSON (req .ClusterDefinition )
9689 if err != nil {
@@ -106,7 +99,18 @@ func (m metricsImpl) Collect(
10699
107100 x , ok := objectStore .Status .ServerRecoveryWindow [configuration .ServerName ]
108101 if ! ok {
109- return nil , fmt .Errorf ("no recovery window found for server %s" , configuration .ServerName )
102+ return & metrics.CollectMetricsResult {
103+ Metrics : []* metrics.CollectMetric {
104+ {
105+ FqName : firstRecoverabilityPointMetricName ,
106+ Value : 0 ,
107+ },
108+ {
109+ FqName : lastAvailableBackupTimestampMetricName ,
110+ Value : 0 ,
111+ },
112+ },
113+ }, nil
110114 }
111115
112116 var firstRecoverabilityPoint float64
@@ -120,10 +124,6 @@ func (m metricsImpl) Collect(
120124
121125 return & metrics.CollectMetricsResult {
122126 Metrics : []* metrics.CollectMetric {
123- {
124- FqName : testMetricName ,
125- Value : 42.0 ,
126- },
127127 {
128128 FqName : firstRecoverabilityPointMetricName ,
129129 Value : firstRecoverabilityPoint ,
0 commit comments