Mooncake/docs/source/deployment
Stary 69663d117b
[TE] Add Task Completion Latency Tracking and Detailed Metrics Reporting (#1310)
* feat(metrics): add task completion latency tracking and detailed metrics reporting

- Add histogram metric for tracking transfer task completion latency with
configurable buckets
- Record task start time in submitTransfer and calculate latency upon completion
- Enhance metrics reporting thread to include latency distribution statistics
- Add skip_metrics parameter to getBatchTransferStatus to avoid double counting
- Update task structure to include start_time field for latency calculation

Signed-off-by: staryxchen <staryxchen@tencent.com>

* feat: add metrics support for submitTransferWithNotify

Signed-off-by: staryxchen <staryxchen@tencent.com>

* refactor(metrics): improve metrics recording logic with early returns

- Replace nested if statements with early returns using goto for cleaner flow
- Add boundary checks for task_id and validate start_time before recording
- Only record metrics for COMPLETED status and reset start_time to prevent
duplicates

Signed-off-by: staryxchen <staryxchen@tencent.com>

* refactor(metrics): simplify bucket count tracking logic

- Remove conditional checks for vector bounds by ensuring prev_bucket_counts_
size matches bucket_counts
- Consolidate previous snapshot update into a single assignment

Signed-off-by: staryxchen <staryxchen@tencent.com>

* fix(metrics): conditionally enable metrics collection

- Add metrics_enabled_ flag check before collecting metrics
- Wrap metrics collection logic with flag condition to avoid unnecessary
operations
- Ensure metrics are only recorded when explicitly enabled

Signed-off-by: staryxchen <staryxchen@tencent.com>

* docs: clarify Transfer Engine metrics limitation with TENT

- Add note about MC_TE_METRIC not being supported when using Transfer Engine
TENT in deployment guide
- Add same note to Python API reference for MC_TE_METRIC environment variable

Signed-off-by: staryxchen <staryxchen@tencent.com>

---------

Signed-off-by: staryxchen <staryxchen@tencent.com>
2025-12-31 15:47:11 +08:00
..
mooncake-store-deployment-guide.md [TE] Add Task Completion Latency Tracking and Detailed Metrics Reporting (#1310) 2025-12-31 15:47:11 +08:00