feat: add client telemetry support - #585
Conversation
|
Tick the box to add this pull request to the merge queue (same as
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f69630f982
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: xiaofanluan <xiaofan.luan@zilliz.com>
Signed-off-by: xiaofanluan <xiaofan.luan@zilliz.com>
Sampling kept a counter modulo 10000 and recorded an operation while the remainder was under rate*10000, so the sampled operations formed one contiguous run per cycle. A cycle is ten thousand operations while a heartbeat window is tens or hundreds, so every window came out wholly sampled or wholly dropped: at 3 QPS a rate of 0.25 gave fourteen minutes of full metrics followed by forty-one reporting nothing from a client that never stopped working. The long-run ratio was right; the ratio inside a window, which is the only unit the telemetry API reports, never was. Accumulate the rate instead and sample on the operation that carries the accumulator across a whole unit: 0.25 samples every fourth operation, and any stretch of operations holds the configured ratio. A rate too small to represent now still samples rarely rather than never -- the old threshold truncated anything below 1e-4 to zero and then sampled nothing, so a configured rate silently meant "off". Matches the Go client, milvus-io/milvus#52615. Signed-off-by: xiaofanluan <xiaofan.luan@zilliz.com>
The heartbeat interval is also the metrics window: each heartbeat carries the operations since the last one, and the coordinator answers a telemetry query from the window before the newest, so a caller reads data between one and two intervals old. At the previous default of 30 seconds that is up to a minute behind, which reads as a stalled client rather than as a lagging view. Ten seconds puts the worst case at twenty. The cost is the coordinator heartbeat rate, which scales with the number of connected clients rather than with traffic; a deployment with enough clients for that to matter can raise the interval, per client or fleet-wide, with a persistent push_config. Signed-off-by: xiaofanluan <xiaofan.luan@zilliz.com>
Signed-off-by: xiaofanluan <xiaofan.luan@zilliz.com>
Signed-off-by: xiaofanluan <xiaofan.luan@zilliz.com>
Signed-off-by: xiaofanluan <xiaofan.luan@zilliz.com>
Signed-off-by: xiaofanluan <xiaofan.luan@zilliz.com>
Signed-off-by: xiaofanluan <xiaofan.luan@zilliz.com>
722e13c to
8eec85c
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #585 +/- ##
===========================================
+ Coverage 53.47% 87.28% +33.80%
===========================================
Files 52 379 +327
Lines 4432 15796 +11364
Branches 0 1715 +1715
===========================================
+ Hits 2370 13787 +11417
+ Misses 2062 2009 -53
🚀 New features to boost your workflow:
|
Signed-off-by: xiaofanluan <xiaofan.luan@zilliz.com>
Signed-off-by: xiaofanluan <xiaofan.luan@zilliz.com>
Signed-off-by: xiaofanluan <xiaofan.luan@zilliz.com>
Signed-off-by: xiaofanluan <xiaofan.luan@zilliz.com>
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: xiaofan-luan, yhmo The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Summary
Related work
Verification
Compatibility note
ConnectParam gains telemetry configuration state. Consumers should rebuild against this SDK revision rather than mixing binaries compiled against the previous object layout.