Skip to content

WIP: Add OpContext trace span helpers#96

Open
jamesgao-jpg wants to merge 5 commits into
masterfrom
codex/milvus-common-opcontext-trace-parent
Open

WIP: Add OpContext trace span helpers#96
jamesgao-jpg wants to merge 5 commits into
masterfrom
codex/milvus-common-opcontext-trace-parent

Conversation

@jamesgao-jpg

@jamesgao-jpg jamesgao-jpg commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add milvus::OpContext::trace_span as the trace parent carrier for downstream search paths
  • add milvus::OpContext::GetTraceSpan() accessors for trace span reads
  • add shared trace helper APIs in common/Tracer.h for Cardinal and Knowhere
  • remove the separate common/Trace.h wrapper; callers should include common/Tracer.h directly
  • rename the scoped span-slot restoration helper to NestedSpanGuard
  • remove thin wrapper helpers SetTemporaryOpContextTraceSpan and StartScopedSpan; callers now construct NestedSpanGuard and ScopedSpan directly
  • keep temporary span replacement scoped so the previous span is restored when the guard is destroyed

Dependency context

Earlier branch commit 6476f5068efdea819403dff9cb42f8f9f37f502d was published as milvus-common/1.0.0-6476f50@milvus/dev#96b754f8757ce3c59471b6d8dcbfaba4.

Branch commit 242dedaaa2af86f1c070872cc75cc62e58e1882f was tagged as v1.0.0-242deda, but it is superseded by current branch commit 45bff01293e050be7af2c9c1e5b70c49da8940ef, which moves the helper APIs into common/Tracer.h and removes common/Trace.h. A new tag/package is needed before downstream conan pins can move.

Downstream PRs consuming this helper package:

Verification

  • git diff --check
  • rg -n "common/Trace\\.h|Trace.h" across milvus-common, Knowhere, and Cardinal: no matches
  • make test was attempted locally but did not run because conan is not available on PATH in this local environment.

Signed-off-by: jamesgao-jpg <james.gao@zilliz.com>
Signed-off-by: jamesgao-jpg <james.gao@zilliz.com>
Signed-off-by: jamesgao-jpg <james.gao@zilliz.com>
Signed-off-by: jamesgao-jpg <james.gao@zilliz.com>
Signed-off-by: jamesgao-jpg <james.gao@zilliz.com>
@jamesgao-jpg jamesgao-jpg force-pushed the codex/milvus-common-opcontext-trace-parent branch from 5910cf8 to 45bff01 Compare June 18, 2026 03:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant