langtrace-python-sdk 2.0.5__py3-none-any.whl → 2.0.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.
@@ -70,7 +70,7 @@ def init(
70
70
  write_spans_to_console: bool = False,
71
71
  custom_remote_exporter=None,
72
72
  api_host: Optional[str] = None,
73
- disable_instrumentations: Optional[DisableInstrumentations] = {},
73
+ disable_instrumentations: Optional[DisableInstrumentations] = None,
74
74
  ):
75
75
  provider = TracerProvider()
76
76
 
@@ -125,27 +125,35 @@ def init(
125
125
  def init_instrumentations(
126
126
  disable_instrumentations: DisableInstrumentations, all_instrumentations: dict
127
127
  ):
128
- validate_instrumentations(disable_instrumentations)
129
-
130
- for key in disable_instrumentations:
131
- for vendor in disable_instrumentations[key]:
132
- if key == "only":
133
- filtered_dict = {
134
- k: v for k, v in all_instrumentations.items() if k != vendor.value
135
- }
136
- for _, v in filtered_dict.items():
137
- v.instrument()
138
- else:
139
- filtered_dict = {
140
- k: v for k, v in all_instrumentations.items() if k == vendor.value
141
- }
128
+ if disable_instrumentations is None:
129
+ for _, v in all_instrumentations.items():
130
+ v.instrument()
131
+ else:
142
132
 
143
- for _, v in filtered_dict.items():
144
- v.instrument()
133
+ validate_instrumentations(disable_instrumentations)
134
+
135
+ for key in disable_instrumentations:
136
+ for vendor in disable_instrumentations[key]:
137
+ if key == "only":
138
+ filtered_dict = {
139
+ k: v
140
+ for k, v in all_instrumentations.items()
141
+ if k != vendor.value
142
+ }
143
+ for _, v in filtered_dict.items():
144
+ v.instrument()
145
+ else:
146
+ filtered_dict = {
147
+ k: v
148
+ for k, v in all_instrumentations.items()
149
+ if k == vendor.value
150
+ }
151
+
152
+ for _, v in filtered_dict.items():
153
+ v.instrument()
145
154
 
146
155
 
147
156
  def validate_instrumentations(disable_instrumentations):
148
-
149
157
  if disable_instrumentations is not None:
150
158
  for key, value in disable_instrumentations.items():
151
159
  if isinstance(value, str):
@@ -1 +1 @@
1
- __version__ = "2.0.5"
1
+ __version__ = "2.0.7"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: langtrace-python-sdk
3
- Version: 2.0.5
3
+ Version: 2.0.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>
@@ -36,8 +36,8 @@ examples/pinecone_example/basic.py,sha256=9IWMoMLozMTpxjY8BFBg2EpUNY5dDjU1xocEG9
36
36
  examples/qdrant_example/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
37
37
  examples/qdrant_example/basic.py,sha256=DCMjHSuBZKkhEjCkwy5d5La9WMyW0lCWqtcZWiFCEm4,1425
38
38
  langtrace_python_sdk/__init__.py,sha256=q2TAsxGIv4wFIQA7G-HGxlnzO89bhPU5TgI42sPHLj0,740
39
- langtrace_python_sdk/langtrace.py,sha256=7eJB-aF-iZssv4pvm3nzVHXYFLJAcfP8SMVGekOgldQ,6438
40
- langtrace_python_sdk/version.py,sha256=xEb7Z4b8xalXXExBg42XPAhbJKniHzcsEPjp-6S3ppg,22
39
+ langtrace_python_sdk/langtrace.py,sha256=285nu16mkIlJ9dXKD497OuehAQppOBB-dCCBdsbz8fA,6724
40
+ langtrace_python_sdk/version.py,sha256=L4aOgvDE9n_eqL_mM_j5bO3bQ73q6ulNpnVuG8OmqWE,22
41
41
  langtrace_python_sdk/constants/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
42
42
  langtrace_python_sdk/constants/exporter/langtrace_exporter.py,sha256=5MNjnAOg-4am78J3gVMH6FSwq5N8TOj72ugkhsw4vi0,46
43
43
  langtrace_python_sdk/constants/instrumentation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -122,7 +122,7 @@ tests/openai/cassettes/test_chat_completion.yaml,sha256=YkNFgK9VHAzNqGWuxFcTiE19
122
122
  tests/openai/cassettes/test_chat_completion_streaming.yaml,sha256=nkx_TemQMYSZxUF_b-LCEFwCRDm0AkQHLf4sdJVuZBw,2592394
123
123
  tests/openai/cassettes/test_image_generation.yaml,sha256=gn5aSVp6V6_hb_rt2NnkAWd_idzDxo-7VzhZII0Wslw,3562
124
124
  tests/pinecone/test_pinecone.py,sha256=iFuAqzbfrxHzH_J2kDCbezqYv1m-yeQiHiO3rMKTuYc,2735
125
- langtrace_python_sdk-2.0.5.dist-info/METADATA,sha256=cOseMAA5zkwb-uP451n57vptbNZf2pHgU_tm3lhfzX0,9582
126
- langtrace_python_sdk-2.0.5.dist-info/WHEEL,sha256=zEMcRr9Kr03x1ozGwg5v9NQBKn3kndp6LSoSlVg-jhU,87
127
- langtrace_python_sdk-2.0.5.dist-info/licenses/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
128
- langtrace_python_sdk-2.0.5.dist-info/RECORD,,
125
+ langtrace_python_sdk-2.0.7.dist-info/METADATA,sha256=NqVxfKgYjWHUQN7Uv3QStLXwOrhSQLbEceYWyYAZOH0,9582
126
+ langtrace_python_sdk-2.0.7.dist-info/WHEEL,sha256=zEMcRr9Kr03x1ozGwg5v9NQBKn3kndp6LSoSlVg-jhU,87
127
+ langtrace_python_sdk-2.0.7.dist-info/licenses/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
128
+ langtrace_python_sdk-2.0.7.dist-info/RECORD,,