Watch
0
0
Fork
You've already forked hyperhive
0

claude usage dashboard: count the token and cost panels as increase per step so review classifier sessions show up

This commit is contained in:
damocles 2026-11-01 12:01:40 +01:00
commit 0912e2ca06

View file

@ -284,7 +284,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "@datasourceUid@" "uid": "@datasourceUid@"
}, },
"expr": "sum by (type) (rate({__name__=\"claude_code.token.usage\", hive=~\"$hive\", \"service.name\"=~\"$service\", agent=~\"$agent\"}[$__rate_interval])) * 60", "expr": "sum by (type) (increase({__name__=\"claude_code.token.usage\", hive=~\"$hive\", \"service.name\"=~\"$service\", agent=~\"$agent\"}[$__interval])) / ($__interval_ms / 60000)",
"legendFormat": "{{type}}" "legendFormat": "{{type}}"
} }
], ],
@ -405,7 +405,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "@datasourceUid@" "uid": "@datasourceUid@"
}, },
"expr": "sum by (model) (rate({__name__=\"claude_code.cost.usage\", hive=~\"$hive\", \"service.name\"=~\"$service\", agent=~\"$agent\"}[$__rate_interval])) * 60", "expr": "sum by (model) (increase({__name__=\"claude_code.cost.usage\", hive=~\"$hive\", \"service.name\"=~\"$service\", agent=~\"$agent\"}[$__interval])) / ($__interval_ms / 60000)",
"legendFormat": "{{model}}" "legendFormat": "{{model}}"
} }
], ],