we used to open "type_data" section as a array (that's open_array_section),
some key field names can not be dumped out. use open_object_section to dump them
as following:
before this change:
------------------
"description": "osd_op(client.4202.0:4958 3.28 3:
163e8348:::rbd_data.
10472ae8944a.
0000000000000164:head [write
1691648~4096 [fadvise_sequential]] snapc 0=[] ondisk+write+known_if_redirected e24)",
"initiated_at": "2017-07-22 14:22:13.469324",
"age": 17.595664,
"duration": 0.460406,
"type_data": [
"commit sent; apply or cleanup",
{
"client": "client.4202",
"client_addr": "-",
"tid": 4958
},
-----------------
after:
-----------------
"description": "osd_op(client.24123.0:328 3.36 3:
6ec0d61b:::rbd_data.
10472ae8944a.
0000000000000289:head [write
4141056~4096 [fadvise_sequential]] snapc 0=[] ondisk+write+known_if_redirected e36)",
"initiated_at": "2017-07-22 14:24:25.925633",
"age": 4.893190,
"duration": 0.272642,
"type_data": {
"flag_point": "commit sent; apply or cleanup",
"client_info": {
"client": "client.24123",
"client_addr": "-",
"tid": 328
},
----------------
Signed-off-by: Yan Jun <yan.jun8@zte.com.cn>
f->dump_float("age", now - get_initiated());
f->dump_float("duration", get_duration());
{
- f->open_array_section("type_data");
+ f->open_object_section("type_data");
_dump(f);
f->close_section();
}