langtrace-python-sdk 2.3.11__py3-none-any.whl → 2.3.12__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.
@@ -1,2 +1 @@
1
1
  LANGTRACE_SDK_NAME = "langtrace-python-sdk"
2
- SENTRY_DSN = "https://7f8eed3a1237fb2efef0f5e96ab407af@o1419498.ingest.us.sentry.io/4507929133056000"
@@ -19,7 +19,6 @@ import sys
19
19
  from typing import Optional
20
20
  import importlib.util
21
21
  from colorama import Fore
22
- from langtrace_python_sdk.constants import LANGTRACE_SDK_NAME, SENTRY_DSN
23
22
  from opentelemetry import trace
24
23
  from opentelemetry.instrumentation.sqlalchemy import SQLAlchemyInstrumentor
25
24
  from opentelemetry.sdk.resources import SERVICE_NAME, Resource
@@ -61,9 +60,8 @@ from langtrace_python_sdk.types import (
61
60
  InstrumentationMethods,
62
61
  InstrumentationType,
63
62
  )
64
- from langtrace_python_sdk.utils import check_if_sdk_is_outdated, get_sdk_version
63
+ from langtrace_python_sdk.utils import check_if_sdk_is_outdated
65
64
  from langtrace_python_sdk.utils.langtrace_sampler import LangtraceSampler
66
- import sentry_sdk
67
65
 
68
66
 
69
67
  def init(
@@ -166,27 +164,6 @@ def init(
166
164
  provider.add_span_processor(batch_processor_remote)
167
165
 
168
166
  sys.stdout = sys.__stdout__
169
- if os.environ.get("LANGTRACE_ERROR_REPORTING", "True") == "True":
170
- sentry_sdk.init(
171
- dsn=SENTRY_DSN,
172
- traces_sample_rate=1.0,
173
- profiles_sample_rate=1.0,
174
- )
175
- sdk_options = {
176
- "service_name": os.environ.get("OTEL_SERVICE_NAME")
177
- or service_name
178
- or sys.argv[0],
179
- "disable_logging": disable_logging,
180
- "disable_instrumentations": disable_instrumentations,
181
- "disable_tracing_for_functions": disable_tracing_for_functions,
182
- "batch": batch,
183
- "write_spans_to_console": write_spans_to_console,
184
- "custom_remote_exporter": custom_remote_exporter,
185
- "sdk_name": LANGTRACE_SDK_NAME,
186
- "sdk_version": get_sdk_version(),
187
- "api_host": host,
188
- }
189
- sentry_sdk.set_context("sdk_init_options", sdk_options)
190
167
 
191
168
 
192
169
  def init_instrumentations(
@@ -31,7 +31,3 @@ def set_event_prompt(span: Span, prompt):
31
31
  def check_if_sdk_is_outdated():
32
32
  SDKVersionChecker().check()
33
33
  return
34
-
35
-
36
- def get_sdk_version():
37
- return SDKVersionChecker().get_sdk_version()
@@ -44,9 +44,6 @@ class SDKVersionChecker:
44
44
  return self._current_version < latest_version
45
45
  return False
46
46
 
47
- def get_sdk_version(self):
48
- return self._current_version
49
-
50
47
  def check(self):
51
48
  if self.is_outdated():
52
49
  print(
@@ -1 +1 @@
1
- __version__ = "2.3.11"
1
+ __version__ = "2.3.12"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: langtrace-python-sdk
3
- Version: 2.3.11
3
+ Version: 2.3.12
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>
@@ -18,7 +18,6 @@ Requires-Dist: opentelemetry-exporter-otlp-proto-http>=1.25.0
18
18
  Requires-Dist: opentelemetry-instrumentation-sqlalchemy>=0.46b0
19
19
  Requires-Dist: opentelemetry-instrumentation>=0.47b0
20
20
  Requires-Dist: opentelemetry-sdk>=1.25.0
21
- Requires-Dist: sentry-sdk>=2.14.0
22
21
  Requires-Dist: sqlalchemy
23
22
  Requires-Dist: tiktoken>=0.1.1
24
23
  Requires-Dist: trace-attributes==7.0.4
@@ -197,10 +196,6 @@ langtrace.init(custom_remote_exporter=<your_exporter>, batch=<True or False>)
197
196
  | `api_host` | `Optional[str]` | `https://langtrace.ai/` | The API host for the remote exporter. |
198
197
  | `disable_instrumentations` | `Optional[DisableInstrumentations]` | `None` | You can pass an object to disable instrumentation for specific vendors ex: `{'only': ['openai']}` or `{'all_except': ['openai']}` |
199
198
 
200
- ### Error Reporting to Langtrace
201
-
202
- By default all sdk errors are reported to langtrace via Sentry. This can be disabled by setting the following enviroment variable to `False` like so `LANGTRACE_ERROR_REPORTING=False`
203
-
204
199
  ### Additional Customization
205
200
 
206
201
  - `@with_langtrace_root_span` - this decorator is designed to organize and relate different spans, in a hierarchical manner. When you're performing multiple operations that you want to monitor together as a unit, this function helps by establishing a "parent" (`LangtraceRootSpan` or whatever is passed to `name`) span. Then, any calls to the LLM APIs made within the given function (fn) will be considered "children" of this parent span. This setup is especially useful for tracking the performance or behavior of a group of operations collectively, rather than individually.
@@ -282,7 +277,6 @@ prompt = get_prompt_from_registry(<Registry ID>, options={"prompt_version": 1, "
282
277
  ```
283
278
 
284
279
  ### Opt out of tracing prompt and completion data
285
-
286
280
  By default, prompt and completion data are captured. If you would like to opt out of it, set the following env var,
287
281
 
288
282
  `TRACE_PROMPT_COMPLETION_DATA=false`
@@ -88,9 +88,9 @@ examples/vertexai_example/main.py,sha256=gndId5X5ksD-ycxnAWMdEqIDbLc3kz5Vt8vm4YP
88
88
  examples/weaviate_example/__init__.py,sha256=8JMDBsRSEV10HfTd-YC7xb4txBjD3la56snk-Bbg2Kw,618
89
89
  examples/weaviate_example/query_text.py,sha256=wPHQTc_58kPoKTZMygVjTj-2ZcdrIuaausJfMxNQnQc,127162
90
90
  langtrace_python_sdk/__init__.py,sha256=VZM6i71NR7pBQK6XvJWRelknuTYUhqwqE7PlicKa5Wg,1166
91
- langtrace_python_sdk/langtrace.py,sha256=labHlbgL6BbGwmreWT0xJwD2UxNU2vLOmojBzRQslR8,9771
92
- langtrace_python_sdk/version.py,sha256=nuL9dghQK8vN4aR24DmbKir_FPU7ZcuF5DEn_IKqPMA,23
93
- langtrace_python_sdk/constants/__init__.py,sha256=3CNYkWMdd1DrkGqzLUgNZXjdAlM6UFMlf_F-odAToyc,146
91
+ langtrace_python_sdk/langtrace.py,sha256=ezUIcBdQ8vqTpO4CTNmy5ovnV5VclANaiLaQMviG7RE,8775
92
+ langtrace_python_sdk/version.py,sha256=badthZq3wkqZi8sSGlQXKfSJ1FFgsBn5Fa_VOpzC7cc,23
93
+ langtrace_python_sdk/constants/__init__.py,sha256=P8QvYwt5czUNDZsKS64vxm9Dc41ptGbuF1TFtAF6nv4,44
94
94
  langtrace_python_sdk/constants/exporter/langtrace_exporter.py,sha256=5MNjnAOg-4am78J3gVMH6FSwq5N8TOj72ugkhsw4vi0,46
95
95
  langtrace_python_sdk/constants/instrumentation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
96
96
  langtrace_python_sdk/constants/instrumentation/anthropic.py,sha256=YX3llt3zwDY6XrYk3CB8WEVqgrzRXEw_ffyk56JoF3k,126
@@ -174,12 +174,12 @@ langtrace_python_sdk/instrumentation/weaviate/__init__.py,sha256=Mc-Je6evPo-kKQz
174
174
  langtrace_python_sdk/instrumentation/weaviate/instrumentation.py,sha256=bzPwtoQD0X6beLYXe6ZL7XRkyRkqdiqKiGc4gOlCQdU,2295
175
175
  langtrace_python_sdk/instrumentation/weaviate/patch.py,sha256=3qxhJjEnu5lNb6_x0p82PaFBgXul-b0XTyTQV1JHzhw,6597
176
176
  langtrace_python_sdk/types/__init__.py,sha256=MeGkmoy2OY3V21GErDIdlf_N8Aj7HDld5Tpbvq2PwTY,4104
177
- langtrace_python_sdk/utils/__init__.py,sha256=E_e67mDn5fSGF3qcYilz2X2qtqAiIS0HTpbh9kzYcXY,967
177
+ langtrace_python_sdk/utils/__init__.py,sha256=giTHkvDOQdqFqXU4PoGP7DhA9tAteZN-KxX3mEUg6QQ,893
178
178
  langtrace_python_sdk/utils/langtrace_sampler.py,sha256=BupNndHbU9IL_wGleKetz8FdcveqHMBVz1bfKTTW80w,1753
179
179
  langtrace_python_sdk/utils/llm.py,sha256=k16jQL3wf1dYIDOcXSvHVfL0s97cu3QVLMmZmtTT3Gk,14741
180
180
  langtrace_python_sdk/utils/misc.py,sha256=7PRJ45BwuwJ6fPAdy1OpBau8QERR2aWaVvzDvZ7JTkE,1729
181
181
  langtrace_python_sdk/utils/prompt_registry.py,sha256=n5dQMVLBw8aJZY8Utvf67bncc25ELf6AH9BYw8_hSzo,2619
182
- langtrace_python_sdk/utils/sdk_version_checker.py,sha256=F-VVVH7Fmhr5LcY0IIe-34zIi5RQcx26uuxFpPzZesM,1782
182
+ langtrace_python_sdk/utils/sdk_version_checker.py,sha256=FzjIWZjn53cX0LEVPdipQd1fO9lG8iGVUEVUs9Hyk6M,1713
183
183
  langtrace_python_sdk/utils/silently_fail.py,sha256=wzmvRDZppaRZgVP8C1xpq2GlWXYCwubhaeWvEbQP1SI,1196
184
184
  langtrace_python_sdk/utils/types.py,sha256=l-N6o7cnWUyrD6dBvW7W3Pf5CkPo5QaoT__k1XLbrQg,383
185
185
  langtrace_python_sdk/utils/with_root_span.py,sha256=2iWu8XD1NOFqSFgDZDJiMHZ1JB4HzmYPLr_F3Ugul2k,8480
@@ -225,8 +225,8 @@ tests/pinecone/cassettes/test_query.yaml,sha256=b5v9G3ssUy00oG63PlFUR3JErF2Js-5A
225
225
  tests/pinecone/cassettes/test_upsert.yaml,sha256=neWmQ1v3d03V8WoLl8FoFeeCYImb8pxlJBWnFd_lITU,38607
226
226
  tests/qdrant/conftest.py,sha256=9n0uHxxIjWk9fbYc4bx-uP8lSAgLBVx-cV9UjnsyCHM,381
227
227
  tests/qdrant/test_qdrant.py,sha256=pzjAjVY2kmsmGfrI2Gs2xrolfuaNHz7l1fqGQCjp5_o,3353
228
- langtrace_python_sdk-2.3.11.dist-info/METADATA,sha256=6ZhhzV4Eyq5rgOMd1k-fLf20WBgoKzS8yPd6KTG7bLo,15265
229
- langtrace_python_sdk-2.3.11.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
230
- langtrace_python_sdk-2.3.11.dist-info/entry_points.txt,sha256=1_b9-qvf2fE7uQNZcbUei9vLpFZBbbh9LrtGw95ssAo,70
231
- langtrace_python_sdk-2.3.11.dist-info/licenses/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
232
- langtrace_python_sdk-2.3.11.dist-info/RECORD,,
228
+ langtrace_python_sdk-2.3.12.dist-info/METADATA,sha256=Tefa-4PsDAPTLhDjQbz2v9qpYOmbqWcMZjnvS4f7bBA,15012
229
+ langtrace_python_sdk-2.3.12.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
230
+ langtrace_python_sdk-2.3.12.dist-info/entry_points.txt,sha256=1_b9-qvf2fE7uQNZcbUei9vLpFZBbbh9LrtGw95ssAo,70
231
+ langtrace_python_sdk-2.3.12.dist-info/licenses/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
232
+ langtrace_python_sdk-2.3.12.dist-info/RECORD,,