openllmetry icon indicating copy to clipboard operation
openllmetry copied to clipboard

fix(milvus): Enhanced Milvus VectorDB Instrumentation for Improved search Monitoring

Open divyapathak24 opened this issue 8 months ago • 11 comments

Fixes #2808

  • [x] I have added tests that cover my changes.
  • [x] If adding a new instrumentation or changing an existing one, I've added screenshots from some observability platform showing the change.
  • [x] PR name follows conventional commits format: feat(instrumentation): ... or fix(instrumentation): ....
  • [ ] (If applicable) I have updated the documentation accordingly.

New search attributes for single-vector searches

Screenshot 2025-04-15 at 12 13 46 AM

New search attributes for multi-vector searches Screenshot 2025-04-15 at 12 11 23 AM

Search Events to log results: Screenshot 2025-04-15 at 12 11 39 AM


[!IMPORTANT] Enhance Milvus VectorDB instrumentation with detailed search monitoring attributes and events, and add tests for single and multi-vector searches.

  • Instrumentation Enhancements:
    • Add search duration and result status attributes in _wrap() in wrapper.py.
    • Log search result events in _add_search_result_events() in wrapper.py.
    • Add new search attributes like MILVUS_SEARCH_RADIUS, MILVUS_SEARCH_METRIC_TYPE, and MILVUS_SEARCH_INDEX_TYPE in semconv_ai/__init__.py.
  • Testing:
    • Add test_search.py to test single and multi-vector searches, verifying span attributes and events.
    • Test different radius values to ensure varying result counts.
  • Misc:
    • Import time module in wrapper.py for measuring search duration.

This description was created by Ellipsis for 3fe4f70605773bf0e3a583b587db3d0982f384db. It will automatically update as commits are pushed.

divyapathak24 avatar Apr 14 '25 18:04 divyapathak24