Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ dev = [
"qdrant-client",
"graphlit-client",
"python-dotenv",
"pinecone-client",
"pinecone",
"langchain",
"langchain-community",
"langchain-openai",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ class PineconeInstrumentation(BaseInstrumentor):
The PineconeInstrumentation class represents the Pinecone instrumentation"""

def instrumentation_dependencies(self) -> Collection[str]:
return ["pinecone-client >= 3.1.0"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update version here

return ["pinecone >= 3.1.0"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here aswell


def _instrument(self, **kwargs):
tracer_provider = kwargs.get("tracer_provider")
tracer = get_tracer(__name__, "", tracer_provider)
version = importlib.metadata.version("pinecone-client")
version = importlib.metadata.version("pinecone")
for operation_name, details in APIS.items():
operation = details["OPERATION"]
# Dynamically creating the patching call
Expand Down
2 changes: 1 addition & 1 deletion src/langtrace_python_sdk/instrumentation/pinecone/patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def traced_method(wrapped, instance, args, kwargs):
) as span:

if span.is_recording():
set_span_attribute(span, "server.address", instance._config.host)
set_span_attribute(span, "server.address", instance.config.host)
if operation_name == "QUERY":
set_query_input_attributes(span, kwargs)

Expand Down
2 changes: 1 addition & 1 deletion src/langtrace_python_sdk/langtrace.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ def init(
all_instrumentations = {
"openai": OpenAIInstrumentation(),
"groq": GroqInstrumentation(),
"pinecone-client": PineconeInstrumentation(),
"pinecone": PineconeInstrumentation(),
"llama-index": LlamaindexInstrumentation(),
"chromadb": ChromaInstrumentation(),
"embedchain": EmbedchainInstrumentation(),
Expand Down
2 changes: 1 addition & 1 deletion src/langtrace_python_sdk/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class InstrumentationType(Enum):
MISTRALAI = "mistralai"
OLLAMA = "ollama"
OPENAI = "openai"
PINECONE = "pinecone-client"
PINECONE = "pinecone"
QDRANT = "qdrant"
SQLALCHEMY = "sqlalchemy"
VERTEXAI = "vertexai"
Expand Down
4 changes: 2 additions & 2 deletions src/tests/pinecone/test_pinecone.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def test_upsert(openai_client, pinecone_client, exporter):
assert attributes.get("langtrace.sdk.name") == "langtrace-python-sdk"
assert attributes.get("langtrace.service.name") == SERVICE_PROVIDERS["PINECONE"]
assert attributes.get("langtrace.service.type") == "vectordb"
assert attributes.get("langtrace.service.version") == v("pinecone-client")
assert attributes.get("langtrace.service.version") == v("pinecone")
assert attributes.get("langtrace.version") == v("langtrace-python-sdk")
assert attributes.get("db.system") == "pinecone"
assert attributes.get("db.operation") == APIS["UPSERT"]["OPERATION"]
Expand Down Expand Up @@ -67,7 +67,7 @@ def test_query(openai_client, pinecone_client, exporter):
assert attributes.get("langtrace.sdk.name") == "langtrace-python-sdk"
assert attributes.get("langtrace.service.name") == SERVICE_PROVIDERS["PINECONE"]
assert attributes.get("langtrace.service.type") == "vectordb"
assert attributes.get("langtrace.service.version") == v("pinecone-client")
assert attributes.get("langtrace.service.version") == v("pinecone")
assert attributes.get("langtrace.version") == v("langtrace-python-sdk")
assert attributes.get("db.system") == "pinecone"
assert attributes.get("db.operation") == APIS["QUERY"]["OPERATION"]
Expand Down
Loading