This is an automated email from the ASF dual-hosted git repository.

wu-sheng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-horizon-ui.git

commit b9933625c5961ec3c768645eba925aaf7acd3a2b
Author: Wu Sheng <[email protected]>
AuthorDate: Thu May 21 11:27:50 2026 +0800

    ttl: make MetricsTTL.metadata optional so non-BanyanDB backends load
    
    getMetricsTTL on this OAP (ES backend) does not expose the `metadata`
    field, so requesting it 400s the whole TTL query. Drop it from the
    query (matches booster-ui), make MetricsTTL.metadata optional, and
    render the Metadata row only when the backend returns it. Do not infer
    the storage backend from TTL field shapes — read the wire values
    verbatim.
---
 apps/bff/src/http/query/ttl.ts               |  2 +-
 apps/ui/src/features/operate/ttl/TtlView.vue |  3 ++-
 packages/api-client/src/oap-ops.ts           | 10 ++++++++--
 3 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/apps/bff/src/http/query/ttl.ts b/apps/bff/src/http/query/ttl.ts
index ce24cdc..cd1f150 100644
--- a/apps/bff/src/http/query/ttl.ts
+++ b/apps/bff/src/http/query/ttl.ts
@@ -41,7 +41,7 @@ const TTL_QUERY = /* GraphQL */ `
       coldNormal coldTrace coldZipkinTrace coldLog coldBrowserErrorLog
     }
     metrics: getMetricsTTL {
-      metadata minute hour day
+      minute hour day
       coldMinute coldHour coldDay
     }
   }
diff --git a/apps/ui/src/features/operate/ttl/TtlView.vue 
b/apps/ui/src/features/operate/ttl/TtlView.vue
index ddcdda7..d5a78df 100644
--- a/apps/ui/src/features/operate/ttl/TtlView.vue
+++ b/apps/ui/src/features/operate/ttl/TtlView.vue
@@ -48,7 +48,8 @@ const metricRows = computed<Row[]>(() => {
   const m = metrics.value;
   if (!m) return [];
   return [
-    { label: 'Metadata', hot: m.metadata, hasCold: false },
+    // `metadata` isn't exposed by every OAP deployment; omit when absent.
+    ...(m.metadata !== undefined ? [{ label: 'Metadata', hot: m.metadata, 
hasCold: false }] : []),
     { label: 'Minute', hot: m.minute, cold: m.coldMinute, hasCold: true },
     { label: 'Hour', hot: m.hour, cold: m.coldHour, hasCold: true },
     { label: 'Day', hot: m.day, cold: m.coldDay, hasCold: true },
diff --git a/packages/api-client/src/oap-ops.ts 
b/packages/api-client/src/oap-ops.ts
index 89da208..108c76f 100644
--- a/packages/api-client/src/oap-ops.ts
+++ b/packages/api-client/src/oap-ops.ts
@@ -42,9 +42,15 @@ export interface RecordsTTL {
   coldBrowserErrorLog: number;
 }
 
-/** OAP `MetricsTTL` — retention (days) for metric-class storage. */
+/** OAP `MetricsTTL` — retention (days) for metric-class storage.
+ *  `metadata` (TTL of the service/instance/endpoint/topology inventory)
+ *  is not exposed by every OAP deployment, so it stays optional; the
+ *  TTL query does not request it (matches booster) and the UI renders
+ *  the row only when present. `cold*` is the cold-stage retention, `-1`
+ *  when no cold stage is configured. Do NOT infer the storage backend
+ *  from these fields — read the wire values verbatim and display them. */
 export interface MetricsTTL {
-  metadata: number;
+  metadata?: number;
   minute: number;
   hour: number;
   day: number;

Reply via email to