mirror of
https://github.com/milvus-io/milvus.git
synced 2026-10-12 02:19:10 +00:00
Issue: #47281 ## Summary - retain executed command IDs at the current telemetry timestamp cursor and prevent equal-timestamp redelivery from executing twice - keep an already-started control heartbeat alive after runtime `enabled=false`, while preserving initial `Enabled=false` as a complete user opt-out - recover custom-handler panics (including hostile `String()` / `Error()` implementations) into failed command replies so the heartbeat stays alive - retain at most one hour / 4096 telemetry windows and aggregate history percentiles from bounded per-window latency samples instead of averaging p99 values - keep latency history bounded to 128 sorted quantile samples per operation/window ## Documentation - updated the [client-side telemetry design](https://github.com/milvus-io/milvus/blob/master/docs/design-docs/design_docs/20260131-client_side_telemetry.md) with the default interval, client identity, disable semantics, panic boundary, retention limits, and percentile aggregation algorithm ## Verification - `cd client && go test ./milvusclient -count=1` - `cd client && go test -race ./milvusclient -run "TestAggregateSnapshotsP99UsesCombinedLatencyDistribution|TestAggregateSnapshotsEdgeCases|TestSnapshotTrimming|TestProcessProtoCommands" -count=1` - `git diff --check` --------- Signed-off-by: xiaofanluan <[email protected]> Signed-off-by: xiaofanluan <[email protected]> Co-authored-by: xiaofanluan <[email protected]> Co-authored-by: opencode <[email protected]>
Go MilvusClient
Go MilvusClient for Milvus. To contribute code to this project, please read our contribution guidelines first.
Getting started
Prerequisites
Go 1.24.12 or higher
Install Milvus Go SDK
-
Use
go getto install the latest version of the Milvus Go SDK and dependencies:go get -u github.com/milvus-io/milvus/client/v3 -
Include the Go MilvusClient in your application:
import "github.com/milvus-io/milvus/client/v3/milvusclient" //...other snippet ... ctx, cancel := context.WithCancel(context.Background()) defer cancel() milvusAddr := "YOUR_MILVUS_ENDPOINT" cli, err := milvusclient.New(ctx, &milvusclient.ClientConfig{ Address: milvusAddr, }) if err != nil { // handle error } // Do your work with milvus client
API Documentation
Refer to https://milvus.io/api-reference/go/v3.0.x/About.md for the Go SDK API documentation.
Code format
The Go source code is formatted using gci & gofumpt. Please run make lint-fix before sumbit a PR.