feat: add client telemetry support - #602
Conversation
0e2cec9 to
946b7d5
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 946b7d5e6f
ℹ️ 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".
| export const isValidClientRequestId = (value: unknown): value is string => | ||
| typeof value === 'string' && | ||
| /^[0-9a-f]{32}$/.test(value) && | ||
| value !== '00000000000000000000000000000000'; |
There was a problem hiding this comment.
Avoid silently dropping documented request IDs
When callers use the currently documented IDs such as trace-${Date.now()}, insert-trace-123, or trace-id-123 (docs/src/content/docs/advanced/advanced-features.mdx:156-167,178-207), this new predicate rejects them and executeCall sends no client-request-id metadata. Upgrading therefore silently disables server-side request correlation for existing applications across every RPC, not just telemetry; preserve the prior metadata behavior or provide an explicit compatibility/migration path rather than dropping these values.
Useful? React with 👍 / 👎.
| for (const [id, timestamp] of this.executedCommands) { | ||
| if (timestamp <= previousTimestamp) { | ||
| this.executedCommands.delete(id); |
There was a problem hiding this comment.
Retain command IDs at the current timestamp
When the same command is delivered in three batches with an unchanged create_time, the second delivery is correctly deduplicated, but this cleanup then deletes its ID because its timestamp equals previousTimestamp; the third delivery executes the handler again. This affects persistent or repeatedly delivered commands and is especially unsafe for custom non-idempotent handlers exposed through registerCommandHandler; keep IDs whose timestamp is still equal to the latest command timestamp.
Useful? React with 👍 / 👎.
Signed-off-by: xiaofanluan <xiaofan.luan@zilliz.com>
d117c5b to
60bfc77
Compare
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: shanghaikid, xiaofan-luan The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Summary
Related work
Verification