-
Notifications
You must be signed in to change notification settings - Fork 821
Description
Describe your environment
OS: macOS Tahoe 26.1
Python version: Python 3.14.0
Package version: 0.49.1 (opentelemetry-instrumentation-qdrant)
What happened?
The QdrantInstrumentor from opentelemetry-instrumentation-qdrant==0.49.1 fails to instrument when used with qdrant-client==1.16.0 (latest version). The instrumentor attempts to wrap the upload_records method on QdrantClient, but this method no longer exists in the current version of qdrant-client, causing an AttributeError during instrumentation.
The error occurs because the instrumentor's configuration file (qdrant_client_methods.json) lists upload_records as a method to wrap, but QdrantClient only has upload_points and upload_collection methods in version 1.16.0.
Steps to Reproduce
- Install the latest versions:
pip install qdrant-client==1.16.0 opentelemetry-instrumentation-qdrant==0.49.1- Run below Python script:
from opentelemetry.instrumentation.qdrant import QdrantInstrumentor
QdrantInstrumentor().instrument()Expected Result
The QdrantInstrumentor().instrument() call should successfully instrument the Qdrant client without errors, wrapping only the methods that actually exist in the current version of qdrant-client.
The instrumentor should either:
- Only attempt to wrap methods that exist in the installed version of qdrant-client, or
- Gracefully skip methods that don't exist without failing
Actual Result
The instrumentation fails immediately with an AttributeError:
Traceback (most recent call last):
QdrantInstrumentor().instrument()
File ".venv/lib/python3.14/site-packages/opentelemetry/instrumentation/instrumentor.py", line 125, in instrument
result = self._instrument(
**kwargs
)
File ".venv/lib/python3.14/site-packages/opentelemetry/instrumentation/qdrant/init.py", line 55, in _instrument
wrap_function_wrapper(
MODULE,
f"{wrap_object}.{wrap_method}",
_wrap(tracer, wrapped_method),
)
File ".venv/lib/python3.14/site-packages/wrapt/patches.py", line 114, in wrap_function_wrapper
return wrap_object(module, name, FunctionWrapper, (wrapper,))
File ".venv/lib/python3.14/site-packages/wrapt/patches.py", line 60, in wrap_object
(parent, attribute, original) = resolve_path(module, name)
File ".venv/lib/python3.14/site-packages/wrapt/patches.py", line 52, in resolve_path
original = lookup_attribute(parent, attribute)
File ".venv/lib/python3.14/site-packages/wrapt/patches.py", line 44, in lookup_attribute
return getattr(parent, attribute)
AttributeError: type object 'QdrantClient' has no attribute 'upload_records'
Additional context
No response
Would you like to implement a fix?
None
Tip
React with π to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.