langtrace-python-sdk 2.1.10__py3-none-any.whl → 2.1.11__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/langtrace.py +21 -23
- langtrace_python_sdk/version.py +1 -1
- {langtrace_python_sdk-2.1.10.dist-info → langtrace_python_sdk-2.1.11.dist-info}/METADATA +1 -1
- {langtrace_python_sdk-2.1.10.dist-info → langtrace_python_sdk-2.1.11.dist-info}/RECORD +6 -6
- {langtrace_python_sdk-2.1.10.dist-info → langtrace_python_sdk-2.1.11.dist-info}/WHEEL +0 -0
- {langtrace_python_sdk-2.1.10.dist-info → langtrace_python_sdk-2.1.11.dist-info}/licenses/LICENSE +0 -0
|
@@ -70,30 +70,8 @@ def init(
|
|
|
70
70
|
simple_processor_remote = SimpleSpanProcessor(remote_write_exporter)
|
|
71
71
|
simple_processor_console = SimpleSpanProcessor(console_exporter)
|
|
72
72
|
|
|
73
|
-
if write_spans_to_console:
|
|
74
|
-
print(Fore.BLUE + "Writing spans to console" + Fore.RESET)
|
|
75
|
-
provider.add_span_processor(simple_processor_console)
|
|
76
|
-
|
|
77
|
-
elif custom_remote_exporter is not None:
|
|
78
|
-
print(Fore.BLUE + "Exporting spans to custom remote exporter.." + Fore.RESET)
|
|
79
|
-
if batch:
|
|
80
|
-
provider.add_span_processor(batch_processor_remote)
|
|
81
|
-
else:
|
|
82
|
-
provider.add_span_processor(simple_processor_remote)
|
|
83
|
-
|
|
84
|
-
elif api_host is not None:
|
|
85
|
-
print(Fore.BLUE + f"Exporting spans to custom host: {api_host}.." + Fore.RESET)
|
|
86
|
-
if batch:
|
|
87
|
-
provider.add_span_processor(batch_processor_remote)
|
|
88
|
-
else:
|
|
89
|
-
provider.add_span_processor(simple_processor_remote)
|
|
90
|
-
else:
|
|
91
|
-
print(Fore.BLUE + "Exporting spans to Langtrace cloud.." + Fore.RESET)
|
|
92
|
-
provider.add_span_processor(batch_processor_remote)
|
|
93
|
-
|
|
94
73
|
# Initialize tracer
|
|
95
74
|
trace.set_tracer_provider(provider)
|
|
96
|
-
|
|
97
75
|
all_instrumentations = {
|
|
98
76
|
"openai": OpenAIInstrumentation(),
|
|
99
77
|
"groq": GroqInstrumentation(),
|
|
@@ -112,13 +90,33 @@ def init(
|
|
|
112
90
|
}
|
|
113
91
|
|
|
114
92
|
init_instrumentations(disable_instrumentations, all_instrumentations)
|
|
93
|
+
if write_spans_to_console:
|
|
94
|
+
print(Fore.BLUE + "Writing spans to console" + Fore.RESET)
|
|
95
|
+
provider.add_span_processor(simple_processor_console)
|
|
96
|
+
|
|
97
|
+
elif custom_remote_exporter is not None:
|
|
98
|
+
print(Fore.BLUE + "Exporting spans to custom remote exporter.." + Fore.RESET)
|
|
99
|
+
if batch:
|
|
100
|
+
provider.add_span_processor(batch_processor_remote)
|
|
101
|
+
else:
|
|
102
|
+
provider.add_span_processor(simple_processor_remote)
|
|
103
|
+
|
|
104
|
+
elif api_host is not None:
|
|
105
|
+
print(Fore.BLUE + f"Exporting spans to custom host: {api_host}.." + Fore.RESET)
|
|
106
|
+
if batch:
|
|
107
|
+
provider.add_span_processor(batch_processor_remote)
|
|
108
|
+
else:
|
|
109
|
+
provider.add_span_processor(simple_processor_remote)
|
|
110
|
+
else:
|
|
111
|
+
print(Fore.BLUE + "Exporting spans to Langtrace cloud.." + Fore.RESET)
|
|
112
|
+
provider.add_span_processor(batch_processor_remote)
|
|
115
113
|
|
|
116
114
|
|
|
117
115
|
def init_instrumentations(
|
|
118
116
|
disable_instrumentations: DisableInstrumentations, all_instrumentations: dict
|
|
119
117
|
):
|
|
120
118
|
if disable_instrumentations is None:
|
|
121
|
-
for
|
|
119
|
+
for idx, (name, v) in enumerate(all_instrumentations.items()):
|
|
122
120
|
v.instrument()
|
|
123
121
|
else:
|
|
124
122
|
|
langtrace_python_sdk/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "2.1.
|
|
1
|
+
__version__ = "2.1.11"
|
|
@@ -37,8 +37,8 @@ examples/qdrant_example/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG
|
|
|
37
37
|
examples/qdrant_example/basic.py,sha256=DCMjHSuBZKkhEjCkwy5d5La9WMyW0lCWqtcZWiFCEm4,1425
|
|
38
38
|
examples/weaviate_example/query_text.py,sha256=iE9OiHsibjsprbCGzabE03eZsGN06e6ym2iS1A9P3ig,64650
|
|
39
39
|
langtrace_python_sdk/__init__.py,sha256=FuvyRuStRe_N2wo2SB2_ZQ0w7LGNIjV0lLi6S1IgGwY,958
|
|
40
|
-
langtrace_python_sdk/langtrace.py,sha256=
|
|
41
|
-
langtrace_python_sdk/version.py,sha256=
|
|
40
|
+
langtrace_python_sdk/langtrace.py,sha256=E2z-VCke4QnFiBm-Ivx7W571xN0vRH7r1raHl_sMz8w,6674
|
|
41
|
+
langtrace_python_sdk/version.py,sha256=zcHMV6HbszEZFZ1gDEpbHxTYg8dJ5fCYdeDd-O6IPP4,23
|
|
42
42
|
langtrace_python_sdk/constants/__init__.py,sha256=P8QvYwt5czUNDZsKS64vxm9Dc41ptGbuF1TFtAF6nv4,44
|
|
43
43
|
langtrace_python_sdk/constants/exporter/langtrace_exporter.py,sha256=5MNjnAOg-4am78J3gVMH6FSwq5N8TOj72ugkhsw4vi0,46
|
|
44
44
|
langtrace_python_sdk/constants/instrumentation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -138,7 +138,7 @@ tests/pinecone/cassettes/test_query.yaml,sha256=b5v9G3ssUy00oG63PlFUR3JErF2Js-5A
|
|
|
138
138
|
tests/pinecone/cassettes/test_upsert.yaml,sha256=neWmQ1v3d03V8WoLl8FoFeeCYImb8pxlJBWnFd_lITU,38607
|
|
139
139
|
tests/qdrant/conftest.py,sha256=9n0uHxxIjWk9fbYc4bx-uP8lSAgLBVx-cV9UjnsyCHM,381
|
|
140
140
|
tests/qdrant/test_qdrant.py,sha256=pzjAjVY2kmsmGfrI2Gs2xrolfuaNHz7l1fqGQCjp5_o,3353
|
|
141
|
-
langtrace_python_sdk-2.1.
|
|
142
|
-
langtrace_python_sdk-2.1.
|
|
143
|
-
langtrace_python_sdk-2.1.
|
|
144
|
-
langtrace_python_sdk-2.1.
|
|
141
|
+
langtrace_python_sdk-2.1.11.dist-info/METADATA,sha256=nEImkaBy426rcyy-Rn2YNFE3gYJgPF-EYYCrzmWvTTM,11860
|
|
142
|
+
langtrace_python_sdk-2.1.11.dist-info/WHEEL,sha256=zEMcRr9Kr03x1ozGwg5v9NQBKn3kndp6LSoSlVg-jhU,87
|
|
143
|
+
langtrace_python_sdk-2.1.11.dist-info/licenses/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
|
|
144
|
+
langtrace_python_sdk-2.1.11.dist-info/RECORD,,
|
|
File without changes
|
{langtrace_python_sdk-2.1.10.dist-info → langtrace_python_sdk-2.1.11.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|