Skip to content

Commit 3755dc6

Browse files
authored
Merge pull request #411 from Scale3-Labs/development
Release: add langtrace attributes for `milvus`
2 parents 3337be1 + 89bdd3e commit 3755dc6

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/langtrace_python_sdk/instrumentation/milvus/patch.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
from langtrace_python_sdk.constants.instrumentation.common import SERVICE_PROVIDERS
12
from langtrace_python_sdk.utils.silently_fail import silently_fail
23
from opentelemetry.trace import Tracer
34
from opentelemetry.trace import SpanKind
45
from langtrace_python_sdk.utils import handle_span_error, set_span_attribute
56
from langtrace_python_sdk.utils.llm import (
7+
get_langtrace_attributes,
68
get_extra_attributes,
79
set_span_attributes,
810
)
@@ -16,6 +18,11 @@ def traced_method(wrapped, instance, args, kwargs):
1618
with tracer.start_as_current_span(span_name, kind=SpanKind.CLIENT) as span:
1719
try:
1820
span_attributes = {
21+
**get_langtrace_attributes(
22+
service_provider=SERVICE_PROVIDERS["MILVUS"],
23+
version=version,
24+
vendor_type="Vector Database",
25+
),
1926
"db.system": "milvus",
2027
"db.operation": operation,
2128
"db.name": kwargs.get("collection_name", None),
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "3.3.6"
1+
__version__ = "3.3.7"

0 commit comments

Comments
 (0)