You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by "jmsperu (via GitHub)" <gi...@apache.org> on 2026/06/20 09:47:32 UTC

Re: [PR] Fix JSON tag mismatch for metrics responses [cloudstack-go]

jmsperu commented on PR #137:
URL: https://github.com/apache/cloudstack-go/pull/137#issuecomment-4757217853

   Reviewed these against the CloudStack 4.22 source (`plugins/metrics/src/main/java/org/apache/cloudstack/metrics/MetricsServiceImpl.java`). The `host` / `cluster` / `volume` / `zone` changes look correct (they match the object names inherited from the base responses / set in the service). Two look off, though:
   
   - **`DbMetricsResponse`** — this changes `json:"dbMetrics"` → `json:"db"`, but `listDbMetrics()` calls `response.setObjectName("dbMetrics")` (`MetricsServiceImpl.java:1114`). So the original `dbMetrics` tag was already correct, and `db` would actually break DB-metrics unmarshalling. Suggest reverting this one to `dbMetrics`.
   - **`UsageServerMetrics`** — changed to `json:"usageserver"`, but `listUsageServerMetrics()` calls `response.setObjectName("usageMetrics")` (`MetricsServiceImpl.java:1087`). The key is `usageMetrics`, not `usageserver`.
   
   The other four are good to merge. Happy to confirm against a live 4.22 deployment once I have one to hand.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org