openllmetry
openllmetry copied to clipboard
fix(milvus): Enhanced Milvus VectorDB Instrumentation for Improved search Monitoring
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): ...orfix(instrumentation): .... - [ ] (If applicable) I have updated the documentation accordingly.
New search attributes for single-vector searches
New search attributes for multi-vector searches
Search Events to log results:
[!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()inwrapper.py.- Log search result events in
_add_search_result_events()inwrapper.py.- Add new search attributes like
MILVUS_SEARCH_RADIUS,MILVUS_SEARCH_METRIC_TYPE, andMILVUS_SEARCH_INDEX_TYPEinsemconv_ai/__init__.py.- Testing:
- Add
test_search.pyto test single and multi-vector searches, verifying span attributes and events.- Test different radius values to ensure varying result counts.
- Misc:
- Import
timemodule inwrapper.pyfor measuring search duration.This description was created by
for 3fe4f70605773bf0e3a583b587db3d0982f384db. It will automatically update as commits are pushed.