langtrace-python-sdk 3.3.16__py3-none-any.whl → 3.3.18__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.
@@ -153,6 +153,16 @@ def get_headers(config: LangtraceConfig):
153
153
  return headers
154
154
 
155
155
 
156
+ def append_api_path(host: str):
157
+ if host == LANGTRACE_REMOTE_URL:
158
+ return f"{host}/api/trace"
159
+
160
+ if "/api/trace" in host:
161
+ return host
162
+
163
+ return f"{host}/v1/traces"
164
+
165
+
156
166
  def get_exporter(config: LangtraceConfig, host: str):
157
167
  if config.custom_remote_exporter:
158
168
  return config.custom_remote_exporter
@@ -160,14 +170,8 @@ def get_exporter(config: LangtraceConfig, host: str):
160
170
  headers = get_headers(config)
161
171
  exporter_protocol = os.environ.get("OTEL_EXPORTER_OTLP_PROTOCOL", "http")
162
172
  if "http" in exporter_protocol.lower():
163
- return HTTPExporter(
164
- endpoint=(
165
- f"{host}/api/trace"
166
- if host == LANGTRACE_REMOTE_URL
167
- else f"{host}/v1/traces"
168
- ),
169
- headers=headers,
170
- )
173
+ host = append_api_path(host)
174
+ return HTTPExporter(endpoint=host, headers=headers)
171
175
  else:
172
176
  return GRPCExporter(endpoint=host, headers=headers)
173
177
 
@@ -1 +1 @@
1
- __version__ = "3.3.16"
1
+ __version__ = "3.3.18"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: langtrace-python-sdk
3
- Version: 3.3.16
3
+ Version: 3.3.18
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>
@@ -108,8 +108,8 @@ examples/vertexai_example/main.py,sha256=gndId5X5ksD-ycxnAWMdEqIDbLc3kz5Vt8vm4YP
108
108
  examples/weaviate_example/__init__.py,sha256=8JMDBsRSEV10HfTd-YC7xb4txBjD3la56snk-Bbg2Kw,618
109
109
  examples/weaviate_example/query_text.py,sha256=wPHQTc_58kPoKTZMygVjTj-2ZcdrIuaausJfMxNQnQc,127162
110
110
  langtrace_python_sdk/__init__.py,sha256=VZM6i71NR7pBQK6XvJWRelknuTYUhqwqE7PlicKa5Wg,1166
111
- langtrace_python_sdk/langtrace.py,sha256=BxuXc2nFp_P0UYyuTV5DLNPWGsuaSMjZ8mqcqCWpxI4,13099
112
- langtrace_python_sdk/version.py,sha256=2by_AinXADvzUFKp--fRsB9P_I_LD3NXs1PvFwaL31c,23
111
+ langtrace_python_sdk/langtrace.py,sha256=nvPaJc426Iww3ildrhsSacXtLdzsZIa94_rlK2giyVM,13153
112
+ langtrace_python_sdk/version.py,sha256=9g2UTdPAtK4y3-RMCghlZIFhe-b0mxLKaThdD7MED8M,23
113
113
  langtrace_python_sdk/constants/__init__.py,sha256=3CNYkWMdd1DrkGqzLUgNZXjdAlM6UFMlf_F-odAToyc,146
114
114
  langtrace_python_sdk/constants/exporter/langtrace_exporter.py,sha256=EVCrouYCpY98f0KSaKr4PzNxPULTZZO6dSA_crEOyJU,106
115
115
  langtrace_python_sdk/constants/instrumentation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -270,8 +270,8 @@ tests/pinecone/cassettes/test_query.yaml,sha256=b5v9G3ssUy00oG63PlFUR3JErF2Js-5A
270
270
  tests/pinecone/cassettes/test_upsert.yaml,sha256=neWmQ1v3d03V8WoLl8FoFeeCYImb8pxlJBWnFd_lITU,38607
271
271
  tests/qdrant/conftest.py,sha256=9n0uHxxIjWk9fbYc4bx-uP8lSAgLBVx-cV9UjnsyCHM,381
272
272
  tests/qdrant/test_qdrant.py,sha256=pzjAjVY2kmsmGfrI2Gs2xrolfuaNHz7l1fqGQCjp5_o,3353
273
- langtrace_python_sdk-3.3.16.dist-info/METADATA,sha256=J5e-JB6fDqEMbeXWLm6CjtbUEU322tgGic0XYoKo2XM,15676
274
- langtrace_python_sdk-3.3.16.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
275
- langtrace_python_sdk-3.3.16.dist-info/entry_points.txt,sha256=1_b9-qvf2fE7uQNZcbUei9vLpFZBbbh9LrtGw95ssAo,70
276
- langtrace_python_sdk-3.3.16.dist-info/licenses/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
277
- langtrace_python_sdk-3.3.16.dist-info/RECORD,,
273
+ langtrace_python_sdk-3.3.18.dist-info/METADATA,sha256=M4r-V_wmy75oIlqyYNY0beRto96gM-DjA7OXdvuCmyg,15676
274
+ langtrace_python_sdk-3.3.18.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
275
+ langtrace_python_sdk-3.3.18.dist-info/entry_points.txt,sha256=1_b9-qvf2fE7uQNZcbUei9vLpFZBbbh9LrtGw95ssAo,70
276
+ langtrace_python_sdk-3.3.18.dist-info/licenses/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
277
+ langtrace_python_sdk-3.3.18.dist-info/RECORD,,