瀏覽代碼

Only include thanos offset when thanos is enabled

Matt Bolt 6 年之前
父節點
當前提交
82d98c2f65
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      pkg/costmodel/router.go

+ 3 - 1
pkg/costmodel/router.go

@@ -622,7 +622,9 @@ func (p *Accesses) ClusterInfo(w http.ResponseWriter, r *http.Request, ps httpro
 	writeReportingFlags(data)
 
 	// Include Thanos Offset Duration if Applicable
-	data["thanosOffset"] = thanos.Offset()
+	if thanos.IsEnabled() {
+		data["thanosOffset"] = thanos.Offset()
+	}
 
 	w.Write(WrapData(data, err))
 }