瀏覽代碼

docs: add changelog for #12326

Zaiming (Stone) Shi 2 年之前
父節點
當前提交
330baa6cc3
共有 1 個文件被更改,包括 14 次插入0 次删除
  1. 14 0
      changes/ce/feat-12326.en.md

+ 14 - 0
changes/ce/feat-12326.en.md

@@ -0,0 +1,14 @@
+Add session registration history.
+
+Setting config `broker.session_history_retain` allows EMQX to keep track of expired sessions for the retained period.
+
+API `GET /api/v5/sessions_count?since=1705682238` can be called to count the cluster-wide sessions which were alive (unexpired) since the provided timestamp (UNIX epoch at seconds precision).
+
+A new gauge `cluster_sessions` is added to the metrics collection. Exposed to prometheus as
+
+```
+# TYPE emqx_cluster_sessions_count gauge
+emqx_cluster_sessions_count 1234
+```
+
+The counter can only be used for an approximate estimation as the collection and calculations are async.