langtrace-python-sdk 2.1.6__py3-none-any.whl → 2.1.7__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- examples/weaviate_example/query_text.py +6 -2
- langtrace_python_sdk/instrumentation/weaviate/instrumentation.py +12 -15
- langtrace_python_sdk/version.py +1 -1
- {langtrace_python_sdk-2.1.6.dist-info → langtrace_python_sdk-2.1.7.dist-info}/METADATA +7 -7
- {langtrace_python_sdk-2.1.6.dist-info → langtrace_python_sdk-2.1.7.dist-info}/RECORD +7 -7
- {langtrace_python_sdk-2.1.6.dist-info → langtrace_python_sdk-2.1.7.dist-info}/WHEEL +0 -0
- {langtrace_python_sdk-2.1.6.dist-info → langtrace_python_sdk-2.1.7.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
# export
|
|
1
|
+
# export OPENAI_API_KEY=sk-<OPENAI API KEY>
|
|
2
|
+
# export WCS_DEMO_URL=https://<CLUSTER ID>.weaviate.cloud
|
|
3
|
+
# export WCS_DEMO_RO_KEY=<YOUR READ ONLY KEY>
|
|
4
|
+
# export LANGTRACE_API_KEY=<YOUR LANGTRACE API KEY>
|
|
5
|
+
|
|
2
6
|
# python main.py
|
|
3
7
|
|
|
4
8
|
# Example taken from startup guide
|
|
@@ -27,7 +31,7 @@ client = weaviate.connect_to_wcs(
|
|
|
27
31
|
cluster_url=WCS_DEMO_URL,
|
|
28
32
|
auth_credentials=weaviate.auth.AuthApiKey(WCS_DEMO_RO_KEY),
|
|
29
33
|
skip_init_checks=True,
|
|
30
|
-
headers={"X-OpenAI-Api-Key": os.environ["
|
|
34
|
+
headers={"X-OpenAI-Api-Key": os.environ["OPENAI_API_KEY"]},
|
|
31
35
|
)
|
|
32
36
|
|
|
33
37
|
langtrace.init()
|
|
@@ -17,16 +17,16 @@ limitations under the License.
|
|
|
17
17
|
import importlib.metadata
|
|
18
18
|
import logging
|
|
19
19
|
from typing import Collection
|
|
20
|
-
|
|
20
|
+
|
|
21
21
|
from opentelemetry.instrumentation.instrumentor import BaseInstrumentor
|
|
22
22
|
from opentelemetry.trace import get_tracer
|
|
23
23
|
from wrapt import wrap_function_wrapper
|
|
24
24
|
|
|
25
|
+
from langtrace_python_sdk.constants.instrumentation.weaviate import APIS
|
|
25
26
|
from langtrace_python_sdk.instrumentation.weaviate.patch import (
|
|
26
27
|
generic_collection_patch,
|
|
27
28
|
generic_query_patch,
|
|
28
29
|
)
|
|
29
|
-
from langtrace_python_sdk.constants.instrumentation.weaviate import APIS
|
|
30
30
|
|
|
31
31
|
logging.basicConfig(level=logging.DEBUG) # Set to DEBUG for detailed logging
|
|
32
32
|
|
|
@@ -45,21 +45,18 @@ class WeaviateInstrumentation(BaseInstrumentor):
|
|
|
45
45
|
version = importlib.metadata.version("weaviate-client")
|
|
46
46
|
|
|
47
47
|
for api_name, api_config in APIS.items():
|
|
48
|
-
module_path, function_name = api_name.rsplit(".", 1)
|
|
49
48
|
if api_config.get("OPERATION") == "query":
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
)
|
|
49
|
+
wrap_function_wrapper(
|
|
50
|
+
api_config["MODULE"],
|
|
51
|
+
api_config["METHOD"],
|
|
52
|
+
generic_query_patch(api_name, version, tracer),
|
|
53
|
+
)
|
|
56
54
|
elif api_config.get("OPERATION") == "create":
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
)
|
|
55
|
+
wrap_function_wrapper(
|
|
56
|
+
api_config["MODULE"],
|
|
57
|
+
api_config["METHOD"],
|
|
58
|
+
generic_collection_patch(api_name, version, tracer),
|
|
59
|
+
)
|
|
63
60
|
|
|
64
61
|
def _instrument_module(self, module_name):
|
|
65
62
|
pass
|
langtrace_python_sdk/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "2.1.
|
|
1
|
+
__version__ = "2.1.7"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: langtrace-python-sdk
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.7
|
|
4
4
|
Summary: Python SDK for LangTrace
|
|
5
5
|
Project-URL: Homepage, https://github.com/Scale3-Labs/langtrace-python-sdk
|
|
6
6
|
Author-email: Scale3 Labs <engineering@scale3labs.com>
|
|
@@ -11,12 +11,12 @@ Classifier: Operating System :: OS Independent
|
|
|
11
11
|
Classifier: Programming Language :: Python :: 3
|
|
12
12
|
Requires-Python: >=3.9
|
|
13
13
|
Requires-Dist: colorama>=0.4.6
|
|
14
|
-
Requires-Dist: opentelemetry-api>=1.
|
|
15
|
-
Requires-Dist: opentelemetry-exporter-otlp-proto-grpc>=1.
|
|
16
|
-
Requires-Dist: opentelemetry-exporter-otlp-proto-http>=1.
|
|
17
|
-
Requires-Dist: opentelemetry-instrumentation-sqlalchemy>=0.
|
|
18
|
-
Requires-Dist: opentelemetry-instrumentation>=0.
|
|
19
|
-
Requires-Dist: opentelemetry-sdk>=1.
|
|
14
|
+
Requires-Dist: opentelemetry-api>=1.25.0
|
|
15
|
+
Requires-Dist: opentelemetry-exporter-otlp-proto-grpc>=1.25.0
|
|
16
|
+
Requires-Dist: opentelemetry-exporter-otlp-proto-http>=1.25.0
|
|
17
|
+
Requires-Dist: opentelemetry-instrumentation-sqlalchemy>=0.46b0
|
|
18
|
+
Requires-Dist: opentelemetry-instrumentation>=0.46b0
|
|
19
|
+
Requires-Dist: opentelemetry-sdk>=1.25.0
|
|
20
20
|
Requires-Dist: sqlalchemy
|
|
21
21
|
Requires-Dist: tiktoken>=0.1.1
|
|
22
22
|
Requires-Dist: trace-attributes>=4.0.4
|
|
@@ -35,10 +35,10 @@ examples/pinecone_example/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJW
|
|
|
35
35
|
examples/pinecone_example/basic.py,sha256=b-5-cSf3_N6Gk4zGVecGF47mBcFY9ZrC5ztrIZVgTQo,1430
|
|
36
36
|
examples/qdrant_example/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
37
37
|
examples/qdrant_example/basic.py,sha256=DCMjHSuBZKkhEjCkwy5d5La9WMyW0lCWqtcZWiFCEm4,1425
|
|
38
|
-
examples/weaviate_example/query_text.py,sha256=
|
|
38
|
+
examples/weaviate_example/query_text.py,sha256=iE9OiHsibjsprbCGzabE03eZsGN06e6ym2iS1A9P3ig,64650
|
|
39
39
|
langtrace_python_sdk/__init__.py,sha256=R4dv73QARUw4WRfCdSKkKzZTLDumF9jcSdwtVrzWhb4,962
|
|
40
40
|
langtrace_python_sdk/langtrace.py,sha256=h168V4kyqSezozDnMVar2Xgbi764WvVA_PpSgVuBzz0,6560
|
|
41
|
-
langtrace_python_sdk/version.py,sha256=
|
|
41
|
+
langtrace_python_sdk/version.py,sha256=f8a2MVmX1Pzg6y0vb9wOlUWlRzaM1t0oaZBemKhaz6M,22
|
|
42
42
|
langtrace_python_sdk/constants/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
43
43
|
langtrace_python_sdk/constants/exporter/langtrace_exporter.py,sha256=5MNjnAOg-4am78J3gVMH6FSwq5N8TOj72ugkhsw4vi0,46
|
|
44
44
|
langtrace_python_sdk/constants/instrumentation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -91,7 +91,7 @@ langtrace_python_sdk/instrumentation/qdrant/__init__.py,sha256=TaIGSAEPysrL23KJ5
|
|
|
91
91
|
langtrace_python_sdk/instrumentation/qdrant/instrumentation.py,sha256=vl2eKSP55aqDo1JiRlvOUBrr6kddvG9Z5dCYew2OG08,1816
|
|
92
92
|
langtrace_python_sdk/instrumentation/qdrant/patch.py,sha256=KcUWmvnS3PgPStzs1oWmlZsyomKBl3dmg8nXuR0T1C0,4654
|
|
93
93
|
langtrace_python_sdk/instrumentation/weaviate/__init__.py,sha256=Mc-Je6evPo-kKQzerTG7bd1XO5JOh4YGTE3wBxaUBwg,99
|
|
94
|
-
langtrace_python_sdk/instrumentation/weaviate/instrumentation.py,sha256=
|
|
94
|
+
langtrace_python_sdk/instrumentation/weaviate/instrumentation.py,sha256=Dn2wMj__nNZkUtDw_jEYslE8-bz2KGkdAU_t8qzWjuA,2281
|
|
95
95
|
langtrace_python_sdk/instrumentation/weaviate/patch.py,sha256=ig2fc33hNydEcH5cJWRycFnMXiXiJr731J-Vg5Ze4No,5634
|
|
96
96
|
langtrace_python_sdk/types/__init__.py,sha256=-j8cuz3bhUdOqj7N2c0w5y-j3UmcxwEgNh8BWeXwHoI,813
|
|
97
97
|
langtrace_python_sdk/utils/__init__.py,sha256=MbBqT4NpDCNTqqvZ0lG4tRiFFZ-tlM8Dwophg4xyrRw,148
|
|
@@ -137,7 +137,7 @@ tests/pinecone/cassettes/test_query.yaml,sha256=b5v9G3ssUy00oG63PlFUR3JErF2Js-5A
|
|
|
137
137
|
tests/pinecone/cassettes/test_upsert.yaml,sha256=neWmQ1v3d03V8WoLl8FoFeeCYImb8pxlJBWnFd_lITU,38607
|
|
138
138
|
tests/qdrant/conftest.py,sha256=9n0uHxxIjWk9fbYc4bx-uP8lSAgLBVx-cV9UjnsyCHM,381
|
|
139
139
|
tests/qdrant/test_qdrant.py,sha256=pzjAjVY2kmsmGfrI2Gs2xrolfuaNHz7l1fqGQCjp5_o,3353
|
|
140
|
-
langtrace_python_sdk-2.1.
|
|
141
|
-
langtrace_python_sdk-2.1.
|
|
142
|
-
langtrace_python_sdk-2.1.
|
|
143
|
-
langtrace_python_sdk-2.1.
|
|
140
|
+
langtrace_python_sdk-2.1.7.dist-info/METADATA,sha256=H9c6_Gh8svD7ffbYCi3WSUEBItnwNzyX_CPpVf4Bueg,11859
|
|
141
|
+
langtrace_python_sdk-2.1.7.dist-info/WHEEL,sha256=zEMcRr9Kr03x1ozGwg5v9NQBKn3kndp6LSoSlVg-jhU,87
|
|
142
|
+
langtrace_python_sdk-2.1.7.dist-info/licenses/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
|
|
143
|
+
langtrace_python_sdk-2.1.7.dist-info/RECORD,,
|
|
File without changes
|
{langtrace_python_sdk-2.1.6.dist-info → langtrace_python_sdk-2.1.7.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|