Skip to content

Commit c8497a3

Browse files
committed
优化监控
1 parent 640bd88 commit c8497a3

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

feapder/buffer/item_buffer.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,10 +402,12 @@ def metric_datas(self, table, datas):
402402
@param datas: 数据 列表
403403
@return:
404404
"""
405-
metrics.emit_counter("total count", len(datas), classify=table)
405+
total_count = 0
406406
for data in datas:
407+
total_count += 1
407408
for k, v in data.items():
408409
metrics.emit_counter(k, int(bool(v)), classify=table)
410+
metrics.emit_counter("total count", total_count, classify=table)
409411

410412
def close(self):
411413
# 调用pipeline的close方法

feapder/utils/metrics.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,10 +295,10 @@ def init(
295295
retention_policy=None,
296296
retention_policy_duration="180d",
297297
emit_interval=60,
298-
batch_size=10,
298+
batch_size=100,
299299
debug=False,
300300
use_udp=False,
301-
timeout=10,
301+
timeout=22,
302302
time_precision="s",
303303
ssl=False,
304304
**kwargs,

0 commit comments

Comments
 (0)