提交 fe04b15f 编写于 作者: S Shenglian Zhou 提交者: shenglian zhou

[TD-5861]<feature>:distinguish between tags and metrics values

上级 ae4547db
...@@ -31,9 +31,21 @@ bool metricsProcessRequest(HttpContext* pContext) { ...@@ -31,9 +31,21 @@ bool metricsProcessRequest(HttpContext* pContext) {
httpJsonToken(jsonBuf, JsonObjStt); httpJsonToken(jsonBuf, JsonObjStt);
{ {
char* keyDisks = "tags";
httpJsonPairHead(jsonBuf, keyDisks, (int32_t)strlen(keyDisks));
httpJsonToken(jsonBuf, JsonArrStt);
{
httpJsonItemToken(jsonBuf);
httpJsonToken(jsonBuf, JsonObjStt);
char* keyTagName = "name";
char* keyTagValue = "value";
httpJsonPairOriginString(jsonBuf, keyTagName, (int32_t)strlen(keyTagName), "dnode_id",
(int32_t)strlen("dnode_id"));
int32_t dnodeId = dnodeGetDnodeId(); int32_t dnodeId = dnodeGetDnodeId();
char* keyDnodeId = "dnode_id"; httpJsonPairIntVal(jsonBuf, keyTagValue, (int32_t)strlen(keyTagValue), dnodeId);
httpJsonPairIntVal(jsonBuf, keyDnodeId, (int32_t)strlen(keyDnodeId), dnodeId); httpJsonToken(jsonBuf, JsonObjEnd);
}
httpJsonToken(jsonBuf, JsonArrEnd);
} }
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册