langtrace-python-sdk 2.2.19__py3-none-any.whl → 2.2.20__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.
@@ -33,7 +33,8 @@ from opentelemetry.sdk.trace.export import (
33
33
  SimpleSpanProcessor,
34
34
  )
35
35
  import sys
36
- from opentelemetry.sdk.resources import Resource
36
+ from opentelemetry.sdk.resources import Resource, SERVICE_NAME
37
+
37
38
 
38
39
  from langtrace_python_sdk.extensions.langtrace_exporter import LangTraceExporter
39
40
  from langtrace_python_sdk.instrumentation import (
@@ -79,10 +80,14 @@ def init(
79
80
  check_if_sdk_is_outdated()
80
81
  print(Fore.GREEN + "Initializing Langtrace SDK.." + Fore.RESET)
81
82
  sampler = LangtraceSampler(disabled_methods=disable_tracing_for_functions)
82
- provider = TracerProvider(
83
- resource=Resource.create({"service.name": service_name or sys.argv[0]}),
84
- sampler=sampler,
83
+ resource = Resource.create(
84
+ attributes={
85
+ SERVICE_NAME: os.environ.get("OTEL_SERVICE_NAME")
86
+ or service_name
87
+ or sys.argv[0]
88
+ }
85
89
  )
90
+ provider = TracerProvider(resource=resource, sampler=sampler)
86
91
 
87
92
  remote_write_exporter = (
88
93
  LangTraceExporter(api_key=api_key, api_host=host)
@@ -1 +1 @@
1
- __version__ = "2.2.19"
1
+ __version__ = "2.2.20"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: langtrace-python-sdk
3
- Version: 2.2.19
3
+ Version: 2.2.20
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>
@@ -62,8 +62,8 @@ examples/vertexai_example/main.py,sha256=gndId5X5ksD-ycxnAWMdEqIDbLc3kz5Vt8vm4YP
62
62
  examples/weaviate_example/__init__.py,sha256=8JMDBsRSEV10HfTd-YC7xb4txBjD3la56snk-Bbg2Kw,618
63
63
  examples/weaviate_example/query_text.py,sha256=sG8O-bXQpflBAiYpgE_M2X7GcHUlZNgl_wJW8_h-W6Q,127024
64
64
  langtrace_python_sdk/__init__.py,sha256=VZM6i71NR7pBQK6XvJWRelknuTYUhqwqE7PlicKa5Wg,1166
65
- langtrace_python_sdk/langtrace.py,sha256=1L0IjME-pzEYht92QfwByPZr3H1MClTrqQdoN1KyKJY,7689
66
- langtrace_python_sdk/version.py,sha256=bCvXTPWtyIYVG2yISha1-D5DHVJ1OH-DM6TXyHxTFQQ,23
65
+ langtrace_python_sdk/langtrace.py,sha256=hh3okJYyxXvC9TMm_vaFOGz-5TxxJp1zQDmZmy63aRY,7813
66
+ langtrace_python_sdk/version.py,sha256=kOrmSTcDQ0cSVmIBVsgETbkmkVVEbLmdHPzkY_Y2PbA,23
67
67
  langtrace_python_sdk/constants/__init__.py,sha256=P8QvYwt5czUNDZsKS64vxm9Dc41ptGbuF1TFtAF6nv4,44
68
68
  langtrace_python_sdk/constants/exporter/langtrace_exporter.py,sha256=5MNjnAOg-4am78J3gVMH6FSwq5N8TOj72ugkhsw4vi0,46
69
69
  langtrace_python_sdk/constants/instrumentation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -189,8 +189,8 @@ tests/pinecone/cassettes/test_query.yaml,sha256=b5v9G3ssUy00oG63PlFUR3JErF2Js-5A
189
189
  tests/pinecone/cassettes/test_upsert.yaml,sha256=neWmQ1v3d03V8WoLl8FoFeeCYImb8pxlJBWnFd_lITU,38607
190
190
  tests/qdrant/conftest.py,sha256=9n0uHxxIjWk9fbYc4bx-uP8lSAgLBVx-cV9UjnsyCHM,381
191
191
  tests/qdrant/test_qdrant.py,sha256=pzjAjVY2kmsmGfrI2Gs2xrolfuaNHz7l1fqGQCjp5_o,3353
192
- langtrace_python_sdk-2.2.19.dist-info/METADATA,sha256=mrrYbmb6EwAk1J8ggbLAjSZECGH5tyjFQBxU24iVE1U,14705
193
- langtrace_python_sdk-2.2.19.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
194
- langtrace_python_sdk-2.2.19.dist-info/entry_points.txt,sha256=1_b9-qvf2fE7uQNZcbUei9vLpFZBbbh9LrtGw95ssAo,70
195
- langtrace_python_sdk-2.2.19.dist-info/licenses/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
196
- langtrace_python_sdk-2.2.19.dist-info/RECORD,,
192
+ langtrace_python_sdk-2.2.20.dist-info/METADATA,sha256=RiiPFYBgE6nH5CrpRVOgIiTw94B1xHtzTeVGYwoowmk,14705
193
+ langtrace_python_sdk-2.2.20.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
194
+ langtrace_python_sdk-2.2.20.dist-info/entry_points.txt,sha256=1_b9-qvf2fE7uQNZcbUei9vLpFZBbbh9LrtGw95ssAo,70
195
+ langtrace_python_sdk-2.2.20.dist-info/licenses/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
196
+ langtrace_python_sdk-2.2.20.dist-info/RECORD,,