langtrace-python-sdk 3.3.7__py3-none-any.whl → 3.3.8__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.
- langtrace_python_sdk/utils/with_root_span.py +10 -8
- langtrace_python_sdk/version.py +1 -1
- {langtrace_python_sdk-3.3.7.dist-info → langtrace_python_sdk-3.3.8.dist-info}/METADATA +1 -1
- {langtrace_python_sdk-3.3.7.dist-info → langtrace_python_sdk-3.3.8.dist-info}/RECORD +7 -7
- {langtrace_python_sdk-3.3.7.dist-info → langtrace_python_sdk-3.3.8.dist-info}/WHEEL +0 -0
- {langtrace_python_sdk-3.3.7.dist-info → langtrace_python_sdk-3.3.8.dist-info}/entry_points.txt +0 -0
- {langtrace_python_sdk-3.3.7.dist-info → langtrace_python_sdk-3.3.8.dist-info}/licenses/LICENSE +0 -0
@@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
|
|
14
14
|
limitations under the License.
|
15
15
|
"""
|
16
16
|
|
17
|
+
import base64
|
17
18
|
import asyncio
|
18
19
|
import os
|
19
20
|
from deprecated import deprecated
|
@@ -145,7 +146,9 @@ class SendUserFeedback:
|
|
145
146
|
_langtrace_api_key: str
|
146
147
|
|
147
148
|
def __init__(self):
|
148
|
-
self._langtrace_host = os.environ.get(
|
149
|
+
self._langtrace_host = os.environ.get(
|
150
|
+
"LANGTRACE_API_HOST", LANGTRACE_REMOTE_URL
|
151
|
+
)
|
149
152
|
# When the host is set to /api/trace, remove the /api/trace
|
150
153
|
if self._langtrace_host.endswith("/api/trace"):
|
151
154
|
self._langtrace_host = self._langtrace_host.replace("/api/trace", "")
|
@@ -162,14 +165,13 @@ class SendUserFeedback:
|
|
162
165
|
print(Fore.RESET)
|
163
166
|
return
|
164
167
|
|
165
|
-
# convert spanId and traceId to
|
166
|
-
|
167
|
-
|
168
|
-
data["spanId"] = f"0x{formatted_span_hex_number}"
|
168
|
+
# convert spanId and traceId to Base64
|
169
|
+
span_bytes = int(data["spanId"], 10).to_bytes(8, "big")
|
170
|
+
data["spanId"] = base64.b64encode(span_bytes).decode("ascii")
|
169
171
|
|
170
|
-
|
171
|
-
|
172
|
-
data["traceId"] =
|
172
|
+
# Convert traceId to base64
|
173
|
+
trace_bytes = int(data["traceId"], 10).to_bytes(16, "big")
|
174
|
+
data["traceId"] = base64.b64encode(trace_bytes).decode("ascii")
|
173
175
|
|
174
176
|
evaluation = self.get_evaluation(data["spanId"])
|
175
177
|
headers = {"x-api-key": self._langtrace_api_key}
|
langtrace_python_sdk/version.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = "3.3.
|
1
|
+
__version__ = "3.3.8"
|
@@ -105,7 +105,7 @@ examples/weaviate_example/__init__.py,sha256=8JMDBsRSEV10HfTd-YC7xb4txBjD3la56sn
|
|
105
105
|
examples/weaviate_example/query_text.py,sha256=wPHQTc_58kPoKTZMygVjTj-2ZcdrIuaausJfMxNQnQc,127162
|
106
106
|
langtrace_python_sdk/__init__.py,sha256=VZM6i71NR7pBQK6XvJWRelknuTYUhqwqE7PlicKa5Wg,1166
|
107
107
|
langtrace_python_sdk/langtrace.py,sha256=TtRWuUiWUB0S7JiQpUsF9lZsiyqPG3m9mMDX-QlDgAw,12601
|
108
|
-
langtrace_python_sdk/version.py,sha256=
|
108
|
+
langtrace_python_sdk/version.py,sha256=pQATGDyqrNBUFj1qQmGoPCfn2udX5OQy6wvCOuVPUfg,22
|
109
109
|
langtrace_python_sdk/constants/__init__.py,sha256=3CNYkWMdd1DrkGqzLUgNZXjdAlM6UFMlf_F-odAToyc,146
|
110
110
|
langtrace_python_sdk/constants/exporter/langtrace_exporter.py,sha256=d-3Qn5C_NTy1NkmdavZvy-6vePwTC5curN6QMy2haHc,50
|
111
111
|
langtrace_python_sdk/constants/instrumentation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -221,7 +221,7 @@ langtrace_python_sdk/utils/prompt_registry.py,sha256=n5dQMVLBw8aJZY8Utvf67bncc25
|
|
221
221
|
langtrace_python_sdk/utils/sdk_version_checker.py,sha256=F-VVVH7Fmhr5LcY0IIe-34zIi5RQcx26uuxFpPzZesM,1782
|
222
222
|
langtrace_python_sdk/utils/silently_fail.py,sha256=wzmvRDZppaRZgVP8C1xpq2GlWXYCwubhaeWvEbQP1SI,1196
|
223
223
|
langtrace_python_sdk/utils/types.py,sha256=l-N6o7cnWUyrD6dBvW7W3Pf5CkPo5QaoT__k1XLbrQg,383
|
224
|
-
langtrace_python_sdk/utils/with_root_span.py,sha256=
|
224
|
+
langtrace_python_sdk/utils/with_root_span.py,sha256=EW0WQfxESntf23dJt0E0rFdHV-7BRniW1Ce6nrCoEPY,8291
|
225
225
|
tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
226
226
|
tests/conftest.py,sha256=0Jo6iCZTXbdvyJVhG9UpYGkLabL75378oauCzmt-Sa8,603
|
227
227
|
tests/utils.py,sha256=8ZBYvxBH6PynipT1sqenfyjTGLhEV7SORQH1NJjnpsM,2500
|
@@ -264,8 +264,8 @@ tests/pinecone/cassettes/test_query.yaml,sha256=b5v9G3ssUy00oG63PlFUR3JErF2Js-5A
|
|
264
264
|
tests/pinecone/cassettes/test_upsert.yaml,sha256=neWmQ1v3d03V8WoLl8FoFeeCYImb8pxlJBWnFd_lITU,38607
|
265
265
|
tests/qdrant/conftest.py,sha256=9n0uHxxIjWk9fbYc4bx-uP8lSAgLBVx-cV9UjnsyCHM,381
|
266
266
|
tests/qdrant/test_qdrant.py,sha256=pzjAjVY2kmsmGfrI2Gs2xrolfuaNHz7l1fqGQCjp5_o,3353
|
267
|
-
langtrace_python_sdk-3.3.
|
268
|
-
langtrace_python_sdk-3.3.
|
269
|
-
langtrace_python_sdk-3.3.
|
270
|
-
langtrace_python_sdk-3.3.
|
271
|
-
langtrace_python_sdk-3.3.
|
267
|
+
langtrace_python_sdk-3.3.8.dist-info/METADATA,sha256=sfFy68YkEQs8-KFe2u4oLkL7tn1KohguWPdWBzC5uPs,15642
|
268
|
+
langtrace_python_sdk-3.3.8.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
269
|
+
langtrace_python_sdk-3.3.8.dist-info/entry_points.txt,sha256=1_b9-qvf2fE7uQNZcbUei9vLpFZBbbh9LrtGw95ssAo,70
|
270
|
+
langtrace_python_sdk-3.3.8.dist-info/licenses/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
|
271
|
+
langtrace_python_sdk-3.3.8.dist-info/RECORD,,
|
File without changes
|
{langtrace_python_sdk-3.3.7.dist-info → langtrace_python_sdk-3.3.8.dist-info}/entry_points.txt
RENAMED
File without changes
|
{langtrace_python_sdk-3.3.7.dist-info → langtrace_python_sdk-3.3.8.dist-info}/licenses/LICENSE
RENAMED
File without changes
|