langtrace-python-sdk 2.3.12__py3-none-any.whl → 2.3.14__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.
Files changed (24) hide show
  1. examples/autogen_example/__init__.py +8 -0
  2. examples/autogen_example/main.py +72 -0
  3. examples/langchain_example/__init__.py +2 -0
  4. examples/langchain_example/langchain_google_example.py +29 -0
  5. langtrace_python_sdk/constants/__init__.py +1 -0
  6. langtrace_python_sdk/constants/instrumentation/common.py +1 -0
  7. langtrace_python_sdk/instrumentation/__init__.py +2 -0
  8. langtrace_python_sdk/instrumentation/autogen/__init__.py +3 -0
  9. langtrace_python_sdk/instrumentation/autogen/instrumentation.py +42 -0
  10. langtrace_python_sdk/instrumentation/autogen/patch.py +132 -0
  11. langtrace_python_sdk/instrumentation/langchain/instrumentation.py +2 -7
  12. langtrace_python_sdk/instrumentation/langchain_core/instrumentation.py +14 -0
  13. langtrace_python_sdk/instrumentation/langchain_core/patch.py +38 -17
  14. langtrace_python_sdk/instrumentation/weaviate/patch.py +9 -2
  15. langtrace_python_sdk/langtrace.py +28 -2
  16. langtrace_python_sdk/utils/__init__.py +18 -0
  17. langtrace_python_sdk/utils/llm.py +12 -2
  18. langtrace_python_sdk/utils/sdk_version_checker.py +3 -0
  19. langtrace_python_sdk/version.py +1 -1
  20. {langtrace_python_sdk-2.3.12.dist-info → langtrace_python_sdk-2.3.14.dist-info}/METADATA +32 -25
  21. {langtrace_python_sdk-2.3.12.dist-info → langtrace_python_sdk-2.3.14.dist-info}/RECORD +24 -18
  22. {langtrace_python_sdk-2.3.12.dist-info → langtrace_python_sdk-2.3.14.dist-info}/WHEEL +0 -0
  23. {langtrace_python_sdk-2.3.12.dist-info → langtrace_python_sdk-2.3.14.dist-info}/entry_points.txt +0 -0
  24. {langtrace_python_sdk-2.3.12.dist-info → langtrace_python_sdk-2.3.14.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,8 @@
1
+ from .main import main as autogen_main
2
+ from .main import comedy_show
3
+
4
+
5
+ class AutoGenRunner:
6
+ def run(self):
7
+ # autogen_main()
8
+ comedy_show()
@@ -0,0 +1,72 @@
1
+ from langtrace_python_sdk import langtrace
2
+ from autogen import ConversableAgent
3
+ from dotenv import load_dotenv
4
+ from autogen.coding import LocalCommandLineCodeExecutor
5
+ import tempfile
6
+
7
+
8
+ load_dotenv()
9
+ langtrace.init(write_spans_to_console=False)
10
+ # agentops.init(api_key=os.getenv("AGENTOPS_API_KEY"))
11
+ # Create a temporary directory to store the code files.
12
+ temp_dir = tempfile.TemporaryDirectory()
13
+
14
+
15
+ # Create a local command line code executor.
16
+ executor = LocalCommandLineCodeExecutor(
17
+ timeout=10, # Timeout for each code execution in seconds.
18
+ work_dir=temp_dir.name, # Use the temporary directory to store the code files.
19
+ )
20
+
21
+
22
+ def main():
23
+
24
+ agent = ConversableAgent(
25
+ "chatbot",
26
+ llm_config={"config_list": [{"model": "gpt-4"}], "cache_seed": None},
27
+ code_execution_config=False, # Turn off code execution, by default it is off.
28
+ function_map=None, # No registered functions, by default it is None.
29
+ human_input_mode="NEVER", # Never ask for human input.
30
+ )
31
+
32
+ reply = agent.generate_reply(
33
+ messages=[{"content": "Tell me a joke.", "role": "user"}]
34
+ )
35
+ return reply
36
+
37
+
38
+ def comedy_show():
39
+ cathy = ConversableAgent(
40
+ name="cathy",
41
+ system_message="Your name is Cathy and you are a part of a duo of comedians.",
42
+ llm_config={
43
+ "config_list": [{"model": "gpt-4o-mini", "temperature": 0.9}],
44
+ "cache_seed": None,
45
+ },
46
+ description="Cathy is a comedian",
47
+ max_consecutive_auto_reply=10,
48
+ code_execution_config={
49
+ "executor": executor
50
+ }, # Use the local command line code executor.
51
+ function_map=None,
52
+ chat_messages=None,
53
+ silent=True,
54
+ default_auto_reply="Sorry, I don't know what to say.",
55
+ human_input_mode="NEVER", # Never ask for human input.
56
+ )
57
+
58
+ joe = ConversableAgent(
59
+ "joe",
60
+ system_message="Your name is Joe and you are a part of a duo of comedians.",
61
+ llm_config={
62
+ "config_list": [{"model": "gpt-4o-mini", "temperature": 0.7}],
63
+ "cache_seed": None,
64
+ },
65
+ human_input_mode="NEVER", # Never ask for human input.
66
+ )
67
+
68
+ result = joe.initiate_chat(
69
+ recipient=cathy, message="Cathy, tell me a joke.", max_turns=2
70
+ )
71
+
72
+ return result
@@ -1,3 +1,4 @@
1
+ from examples.langchain_example.langchain_google_genai import basic_google_genai
1
2
  from .basic import basic_app, rag, load_and_split
2
3
  from langtrace_python_sdk import with_langtrace_root_span
3
4
 
@@ -12,6 +13,7 @@ class LangChainRunner:
12
13
  rag()
13
14
  load_and_split()
14
15
  basic_graph_tools()
16
+ basic_google_genai()
15
17
 
16
18
 
17
19
  class GroqRunner:
@@ -0,0 +1,29 @@
1
+ from langchain_core.messages import HumanMessage
2
+ from langchain_google_genai import ChatGoogleGenerativeAI
3
+ from langtrace_python_sdk.utils.with_root_span import with_langtrace_root_span
4
+ from dotenv import find_dotenv, load_dotenv
5
+ from langtrace_python_sdk import langtrace
6
+
7
+ _ = load_dotenv(find_dotenv())
8
+
9
+ langtrace.init()
10
+
11
+ @with_langtrace_root_span("basic_google_genai")
12
+ def basic_google_genai():
13
+ llm = ChatGoogleGenerativeAI(model="gemini-1.5-flash")
14
+ # example
15
+ message = HumanMessage(
16
+ content=[
17
+ {
18
+ "type": "text",
19
+ "text": "What's in this image?",
20
+ },
21
+ ]
22
+ )
23
+ message_image = HumanMessage(content="https://picsum.photos/seed/picsum/200/300")
24
+
25
+ res = llm.invoke([message, message_image])
26
+ # print(res)
27
+
28
+
29
+ basic_google_genai()
@@ -1 +1,2 @@
1
1
  LANGTRACE_SDK_NAME = "langtrace-python-sdk"
2
+ SENTRY_DSN = "https://7f8eed3a1237fb2efef0f5e96ab407af@o1419498.ingest.us.sentry.io/4507929133056000"
@@ -31,6 +31,7 @@ SERVICE_PROVIDERS = {
31
31
  "GEMINI": "Gemini",
32
32
  "MISTRAL": "Mistral",
33
33
  "EMBEDCHAIN": "Embedchain",
34
+ "AUTOGEN": "Autogen",
34
35
  }
35
36
 
36
37
  LANGTRACE_ADDITIONAL_SPAN_ATTRIBUTES_KEY = "langtrace_additional_attributes"
@@ -14,6 +14,7 @@ from .qdrant import QdrantInstrumentation
14
14
  from .weaviate import WeaviateInstrumentation
15
15
  from .ollama import OllamaInstrumentor
16
16
  from .dspy import DspyInstrumentation
17
+ from .autogen import AutogenInstrumentation
17
18
  from .vertexai import VertexAIInstrumentation
18
19
  from .gemini import GeminiInstrumentation
19
20
  from .mistral import MistralInstrumentation
@@ -37,6 +38,7 @@ __all__ = [
37
38
  "WeaviateInstrumentation",
38
39
  "OllamaInstrumentor",
39
40
  "DspyInstrumentation",
41
+ "AutogenInstrumentation",
40
42
  "VertexAIInstrumentation",
41
43
  "GeminiInstrumentation",
42
44
  "MistralInstrumentation",
@@ -0,0 +1,3 @@
1
+ from .instrumentation import AutogenInstrumentation
2
+
3
+ __all__ = ["AutogenInstrumentation"]
@@ -0,0 +1,42 @@
1
+ from opentelemetry.instrumentation.instrumentor import BaseInstrumentor
2
+ from opentelemetry.trace import get_tracer
3
+ from wrapt import wrap_function_wrapper as _W
4
+ from importlib_metadata import version as v
5
+ from .patch import patch_generate_reply, patch_initiate_chat
6
+
7
+
8
+ class AutogenInstrumentation(BaseInstrumentor):
9
+ def instrumentation_dependencies(self):
10
+ return ["autogen >= 0.1.0"]
11
+
12
+ def _instrument(self, **kwargs):
13
+ print("Instrumneting autogen")
14
+ tracer_provider = kwargs.get("tracer_provider")
15
+ tracer = get_tracer(__name__, "", tracer_provider)
16
+ version = v("autogen")
17
+ # conversable_agent.intiate_chat
18
+ # conversable_agent.register_function
19
+ # agent.Agent
20
+ # AgentCreation
21
+ # Tools --> Register_for_llm, register_for_execution, register_for_function
22
+ try:
23
+ _W(
24
+ module="autogen.agentchat.conversable_agent",
25
+ name="ConversableAgent.initiate_chat",
26
+ wrapper=patch_initiate_chat(
27
+ "conversable_agent.initiate_chat", version, tracer
28
+ ),
29
+ )
30
+
31
+ _W(
32
+ module="autogen.agentchat.conversable_agent",
33
+ name="ConversableAgent.generate_reply",
34
+ wrapper=patch_generate_reply(
35
+ "conversable_agent.generate_reply", version, tracer
36
+ ),
37
+ )
38
+ except Exception as e:
39
+ pass
40
+
41
+ def _uninstrument(self, **kwargs):
42
+ pass
@@ -0,0 +1,132 @@
1
+ from langtrace_python_sdk.utils.llm import (
2
+ get_langtrace_attributes,
3
+ get_extra_attributes,
4
+ get_span_name,
5
+ set_span_attributes,
6
+ get_llm_request_attributes,
7
+ set_event_completion,
8
+ set_usage_attributes,
9
+ )
10
+ from langtrace_python_sdk.constants.instrumentation.common import SERVICE_PROVIDERS
11
+ from langtrace.trace_attributes import FrameworkSpanAttributes
12
+ from opentelemetry.trace.status import Status, StatusCode
13
+ from langtrace.trace_attributes import SpanAttributes
14
+ from opentelemetry.trace import Tracer, SpanKind
15
+
16
+ from langtrace_python_sdk.utils import deduce_args_and_kwargs, set_span_attribute
17
+ import json
18
+
19
+
20
+ def patch_initiate_chat(name, version, tracer: Tracer):
21
+ def traced_method(wrapped, instance, args, kwargs):
22
+ all_params = deduce_args_and_kwargs(wrapped, *args, **kwargs)
23
+ all_params["recipient"] = json.dumps(parse_agent(all_params.get("recipient")))
24
+ span_attributes = {
25
+ **get_langtrace_attributes(
26
+ service_provider=SERVICE_PROVIDERS["AUTOGEN"],
27
+ version=version,
28
+ vendor_type="framework",
29
+ ),
30
+ "sender": json.dumps(parse_agent(instance)),
31
+ **all_params,
32
+ }
33
+ attributes = FrameworkSpanAttributes(**span_attributes)
34
+
35
+ with tracer.start_as_current_span(
36
+ name=get_span_name(name), kind=SpanKind.CLIENT
37
+ ) as span:
38
+ try:
39
+ set_span_attributes(span, attributes)
40
+ result = wrapped(*args, **kwargs)
41
+ # set_response_attributes(span, result)
42
+ return result
43
+ except Exception as err:
44
+ # Record the exception in the span
45
+ span.record_exception(err)
46
+
47
+ # Set the span status to indicate an error
48
+ span.set_status(Status(StatusCode.ERROR, str(err)))
49
+
50
+ # Reraise the exception to ensure it's not swallowed
51
+ raise
52
+
53
+ return traced_method
54
+
55
+
56
+ def patch_generate_reply(name, version, tracer: Tracer):
57
+
58
+ def traced_method(wrapped, instance, args, kwargs):
59
+
60
+ llm_config = instance.llm_config
61
+ kwargs = {
62
+ **kwargs,
63
+ **llm_config.get("config_list")[0],
64
+ }
65
+ service_provider = SERVICE_PROVIDERS["AUTOGEN"]
66
+
67
+ span_attributes = {
68
+ **get_langtrace_attributes(
69
+ version=version,
70
+ service_provider=service_provider,
71
+ vendor_type="framework",
72
+ ),
73
+ **get_llm_request_attributes(
74
+ kwargs,
75
+ prompts=kwargs.get("messages"),
76
+ ),
77
+ **get_extra_attributes(),
78
+ }
79
+ attributes = FrameworkSpanAttributes(**span_attributes)
80
+
81
+ with tracer.start_as_current_span(
82
+ name=get_span_name(name), kind=SpanKind.CLIENT
83
+ ) as span:
84
+ try:
85
+
86
+ result = wrapped(*args, **kwargs)
87
+
88
+ # if caching is disabled, return result as langtrace will instrument the rest.
89
+ if "cache_seed" in llm_config and llm_config.get("cache_seed") is None:
90
+ return result
91
+
92
+ set_span_attributes(span, attributes)
93
+ set_event_completion(span, [{"role": "assistant", "content": result}])
94
+ total_cost, response_model = list(instance.get_total_usage().keys())
95
+ set_span_attribute(
96
+ span, SpanAttributes.LLM_RESPONSE_MODEL, response_model
97
+ )
98
+ set_usage_attributes(
99
+ span, instance.get_total_usage().get(response_model)
100
+ )
101
+
102
+ return result
103
+
104
+ except Exception as err:
105
+ # Record the exception in the span
106
+ span.record_exception(err)
107
+
108
+ # Set the span status to indicate an error
109
+ span.set_status(Status(StatusCode.ERROR, str(err)))
110
+
111
+ # Reraise the exception to ensure it's not swallowed
112
+ raise
113
+
114
+ return traced_method
115
+
116
+
117
+ def set_response_attributes(span, result):
118
+ summary = getattr(result, "summary", None)
119
+ if summary:
120
+ set_span_attribute(span, "autogen.chat.summary", summary)
121
+
122
+
123
+ def parse_agent(agent):
124
+
125
+ return {
126
+ "name": getattr(agent, "name", None),
127
+ "description": getattr(agent, "description", None),
128
+ "system_message": str(getattr(agent, "system_message", None)),
129
+ "silent": getattr(agent, "silent", None),
130
+ "llm_config": str(getattr(agent, "llm_config", None)),
131
+ "human_input_mode": getattr(agent, "human_input_mode", None),
132
+ }
@@ -81,21 +81,16 @@ class LangchainInstrumentation(BaseInstrumentor):
81
81
  tracer_provider = kwargs.get("tracer_provider")
82
82
  tracer = get_tracer(__name__, "", tracer_provider)
83
83
  version = importlib.metadata.version("langchain")
84
-
85
84
  wrap_function_wrapper(
86
85
  "langchain.agents.agent",
87
86
  "RunnableAgent.plan",
88
- generic_patch(
89
- "RunnableAgent.plan", "plan", tracer, version, True, True
90
- ),
87
+ generic_patch("RunnableAgent.plan", "plan", tracer, version, True, True),
91
88
  )
92
89
 
93
90
  wrap_function_wrapper(
94
91
  "langchain.agents.agent",
95
92
  "RunnableAgent.aplan",
96
- generic_patch(
97
- "RunnableAgent.aplan", "plan", tracer, version, True, True
98
- ),
93
+ generic_patch("RunnableAgent.aplan", "plan", tracer, version, True, True),
99
94
  )
100
95
 
101
96
  # modules_to_patch = []
@@ -134,6 +134,20 @@ class LangchainCoreInstrumentation(BaseInstrumentor):
134
134
  ]
135
135
 
136
136
  modules_to_patch = [
137
+ (
138
+ "langchain_core.language_models.chat_models",
139
+ "chatmodel",
140
+ generic_patch,
141
+ True,
142
+ True,
143
+ ),
144
+ (
145
+ "langchain_core.language_models.base",
146
+ "language_model",
147
+ generic_patch,
148
+ True,
149
+ True,
150
+ ),
137
151
  ("langchain_core.retrievers", "retriever", generic_patch, True, True),
138
152
  ("langchain_core.prompts.chat", "prompt", generic_patch, True, True),
139
153
  (
@@ -57,7 +57,24 @@ def generic_patch(
57
57
  "langtrace.service.version": version,
58
58
  "langtrace.version": v(LANGTRACE_SDK_NAME),
59
59
  "langchain.task.name": task,
60
- **(extra_attributes if extra_attributes is not None else {}),
60
+ "gen_ai.request.model": (
61
+ instance.model if hasattr(instance, "model") else None
62
+ ),
63
+ SpanAttributes.LLM_REQUEST_MAX_TOKENS: (
64
+ instance.max_output_tokens
65
+ if hasattr(instance, "max_output_tokens")
66
+ else None
67
+ ),
68
+ SpanAttributes.LLM_TOP_K: (
69
+ instance.top_k if hasattr(instance, "top_k") else None
70
+ ),
71
+ SpanAttributes.LLM_REQUEST_TOP_P: (
72
+ instance.top_p if hasattr(instance, "top_p") else None
73
+ ),
74
+ SpanAttributes.LLM_REQUEST_TEMPERATURE: (
75
+ instance.temperature if hasattr(instance, "temperature") else None
76
+ ),
77
+ **(extra_attributes if extra_attributes is not None else {}), # type: ignore
61
78
  }
62
79
 
63
80
  if trace_input and len(args) > 0:
@@ -79,21 +96,17 @@ def generic_patch(
79
96
  try:
80
97
  # Attempt to call the original method
81
98
  result = wrapped(*args, **kwargs)
82
-
83
99
  if trace_output:
84
100
  span.set_attribute("langchain.outputs", to_json_string(result))
85
- if hasattr(result, 'usage'):
86
- prompt_tokens = result.usage.prompt_tokens
87
- completion_tokens = result.usage.completion_tokens
88
- span.set_attribute(SpanAttributes.LLM_USAGE_PROMPT_TOKENS, prompt_tokens)
89
- span.set_attribute(SpanAttributes.LLM_USAGE_COMPLETION_TOKENS, completion_tokens)
90
- elif hasattr(result, 'generations') and len(result.generations) > 0 and len(result.generations[0]) > 0 and hasattr(result.generations[0][0], 'text') and isinstance(result.generations[0][0].text, str):
91
- span.set_attribute(SpanAttributes.LLM_USAGE_COMPLETION_TOKENS, instance.get_num_tokens(result.generations[0][0].text))
92
- elif len(args) > 0 and len(args[0]) > 0 and not hasattr(args[0][0], 'text') and hasattr(instance, 'get_num_tokens'):
93
- span.set_attribute(SpanAttributes.LLM_USAGE_PROMPT_TOKENS, instance.get_num_tokens(args[0][0]))
94
- elif len(args) > 0 and len(args[0]) > 0 and hasattr(args[0][0], 'text') and isinstance(args[0][0].text, str) and hasattr(instance, 'get_num_tokens'):
95
- span.set_attribute(SpanAttributes.LLM_USAGE_PROMPT_TOKENS, instance.get_num_tokens(args[0][0].text))
96
-
101
+ if hasattr(result, "usage_metadata"):
102
+ span.set_attribute(
103
+ SpanAttributes.LLM_USAGE_PROMPT_TOKENS,
104
+ result.usage_metadata["input_tokens"],
105
+ )
106
+ span.set_attribute(
107
+ SpanAttributes.LLM_USAGE_COMPLETION_TOKENS,
108
+ result.usage_metadata["output_tokens"],
109
+ )
97
110
  span.set_status(StatusCode.OK)
98
111
  return result
99
112
  except Exception as err:
@@ -208,9 +221,17 @@ def clean_empty(d):
208
221
  if not isinstance(d, (dict, list, tuple)):
209
222
  return d
210
223
  if isinstance(d, tuple):
211
- return tuple(val for val in (clean_empty(val) for val in d) if val != () and val is not None)
224
+ return tuple(
225
+ val
226
+ for val in (clean_empty(val) for val in d)
227
+ if val != () and val is not None
228
+ )
212
229
  if isinstance(d, list):
213
- return [val for val in (clean_empty(val) for val in d) if val != [] and val is not None]
230
+ return [
231
+ val
232
+ for val in (clean_empty(val) for val in d)
233
+ if val != [] and val is not None
234
+ ]
214
235
  result = {}
215
236
  for k, val in d.items():
216
237
  if isinstance(val, dict):
@@ -226,7 +247,7 @@ def clean_empty(d):
226
247
  result[k] = val.strip()
227
248
  elif isinstance(val, object):
228
249
  # some langchain objects have a text attribute
229
- val = getattr(val, 'text', None)
250
+ val = getattr(val, "text", None)
230
251
  if val is not None and val.strip() != "":
231
252
  result[k] = val.strip()
232
253
  return result
@@ -15,6 +15,7 @@ limitations under the License.
15
15
  """
16
16
 
17
17
  import json
18
+ from datetime import datetime
18
19
 
19
20
  from importlib_metadata import version as v
20
21
  from langtrace.trace_attributes import DatabaseSpanAttributes
@@ -48,9 +49,11 @@ METADATA_ATTRIBUTES = [
48
49
  def extract_inputs(args, kwargs):
49
50
  extracted_params = {}
50
51
  kwargs_without_properties = {
51
- k: v for k, v in kwargs.items() if k not in ["properties", "fusion_type"]
52
+ k: v for k, v in kwargs.items() if k not in ["properties", "fusion_type", "filters"]
52
53
  }
53
54
  extracted_params.update(extract_input_params(args, kwargs_without_properties))
55
+ if kwargs.get("filters", None):
56
+ extracted_params["filters"] = str(kwargs["filters"])
54
57
  if kwargs.get("fusion_type", None):
55
58
  extracted_params["fusion_type"] = kwargs["fusion_type"].value
56
59
  if kwargs.get("properties", None):
@@ -95,9 +98,13 @@ def aggregate_responses(result):
95
98
 
96
99
 
97
100
  def get_response_object_attributes(response_object):
101
+ def convert_value(value):
102
+ if isinstance(value, datetime):
103
+ return value.isoformat()
104
+ return value
98
105
 
99
106
  response_attributes = {
100
- **response_object.properties,
107
+ **{k: convert_value(v) for k, v in response_object.properties.items()},
101
108
  "uuid": str(response_object.uuid) if hasattr(response_object, "uuid") else None,
102
109
  "collection": getattr(response_object, "collection", None),
103
110
  "vector": getattr(response_object, "vector", None),
@@ -19,6 +19,7 @@ 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
22
23
  from opentelemetry import trace
23
24
  from opentelemetry.instrumentation.sqlalchemy import SQLAlchemyInstrumentor
24
25
  from opentelemetry.sdk.resources import SERVICE_NAME, Resource
@@ -52,6 +53,7 @@ from langtrace_python_sdk.instrumentation import (
52
53
  OpenAIInstrumentation,
53
54
  PineconeInstrumentation,
54
55
  QdrantInstrumentation,
56
+ AutogenInstrumentation,
55
57
  VertexAIInstrumentation,
56
58
  WeaviateInstrumentation,
57
59
  )
@@ -60,8 +62,9 @@ from langtrace_python_sdk.types import (
60
62
  InstrumentationMethods,
61
63
  InstrumentationType,
62
64
  )
63
- from langtrace_python_sdk.utils import check_if_sdk_is_outdated
65
+ from langtrace_python_sdk.utils import check_if_sdk_is_outdated, get_sdk_version
64
66
  from langtrace_python_sdk.utils.langtrace_sampler import LangtraceSampler
67
+ import sentry_sdk
65
68
 
66
69
 
67
70
  def init(
@@ -139,6 +142,7 @@ def init(
139
142
  "google-cloud-aiplatform": VertexAIInstrumentation(),
140
143
  "google-generativeai": GeminiInstrumentation(),
141
144
  "mistralai": MistralInstrumentation(),
145
+ "autogen": AutogenInstrumentation(),
142
146
  }
143
147
 
144
148
  init_instrumentations(disable_instrumentations, all_instrumentations)
@@ -164,10 +168,32 @@ def init(
164
168
  provider.add_span_processor(batch_processor_remote)
165
169
 
166
170
  sys.stdout = sys.__stdout__
171
+ if os.environ.get("LANGTRACE_ERROR_REPORTING", "True") == "True":
172
+ sentry_sdk.init(
173
+ dsn=SENTRY_DSN,
174
+ traces_sample_rate=1.0,
175
+ profiles_sample_rate=1.0,
176
+ )
177
+ sdk_options = {
178
+ "service_name": os.environ.get("OTEL_SERVICE_NAME")
179
+ or service_name
180
+ or sys.argv[0],
181
+ "disable_logging": disable_logging,
182
+ "disable_instrumentations": disable_instrumentations,
183
+ "disable_tracing_for_functions": disable_tracing_for_functions,
184
+ "batch": batch,
185
+ "write_spans_to_console": write_spans_to_console,
186
+ "custom_remote_exporter": custom_remote_exporter,
187
+ "sdk_name": LANGTRACE_SDK_NAME,
188
+ "sdk_version": get_sdk_version(),
189
+ "api_host": host,
190
+ }
191
+ sentry_sdk.set_context("sdk_init_options", sdk_options)
167
192
 
168
193
 
169
194
  def init_instrumentations(
170
- disable_instrumentations: DisableInstrumentations, all_instrumentations: dict
195
+ disable_instrumentations: Optional[DisableInstrumentations],
196
+ all_instrumentations: dict
171
197
  ):
172
198
  if disable_instrumentations is None:
173
199
  for idx, (name, v) in enumerate(all_instrumentations.items()):
@@ -2,6 +2,7 @@ from langtrace_python_sdk.types import NOT_GIVEN
2
2
  from .sdk_version_checker import SDKVersionChecker
3
3
  from opentelemetry.trace import Span
4
4
  from langtrace.trace_attributes import SpanAttributes
5
+ import inspect
5
6
  import os
6
7
 
7
8
 
@@ -28,6 +29,23 @@ def set_event_prompt(span: Span, prompt):
28
29
  )
29
30
 
30
31
 
32
+ def deduce_args_and_kwargs(func, *args, **kwargs):
33
+ sig = inspect.signature(func)
34
+ bound_args = sig.bind(*args, **kwargs)
35
+ bound_args.apply_defaults()
36
+
37
+ all_params = {}
38
+ for param_name, param in sig.parameters.items():
39
+ if param_name in bound_args.arguments:
40
+ all_params[param_name] = bound_args.arguments[param_name]
41
+
42
+ return all_params
43
+
44
+
31
45
  def check_if_sdk_is_outdated():
32
46
  SDKVersionChecker().check()
33
47
  return
48
+
49
+
50
+ def get_sdk_version():
51
+ return SDKVersionChecker().get_sdk_version()
@@ -126,7 +126,9 @@ def get_llm_request_attributes(kwargs, prompts=None, model=None, operation_name=
126
126
  tools = kwargs.get("tools", None)
127
127
  return {
128
128
  SpanAttributes.LLM_OPERATION_NAME: operation_name,
129
- SpanAttributes.LLM_REQUEST_MODEL: model or kwargs.get("model") or "gpt-3.5-turbo",
129
+ SpanAttributes.LLM_REQUEST_MODEL: model
130
+ or kwargs.get("model")
131
+ or "gpt-3.5-turbo",
130
132
  SpanAttributes.LLM_IS_STREAMING: kwargs.get("stream"),
131
133
  SpanAttributes.LLM_REQUEST_TEMPERATURE: kwargs.get("temperature"),
132
134
  SpanAttributes.LLM_TOP_K: top_k,
@@ -230,7 +232,15 @@ def set_event_completion(span: Span, result_content):
230
232
 
231
233
 
232
234
  def set_span_attributes(span: Span, attributes: Any) -> None:
233
- for field, value in attributes.model_dump(by_alias=True).items():
235
+ from pydantic import BaseModel
236
+
237
+ attrs = (
238
+ attributes.model_dump(by_alias=True)
239
+ if isinstance(attributes, BaseModel)
240
+ else attributes
241
+ )
242
+
243
+ for field, value in attrs.items():
234
244
  set_span_attribute(span, field, value)
235
245
 
236
246
 
@@ -44,6 +44,9 @@ 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
+
47
50
  def check(self):
48
51
  if self.is_outdated():
49
52
  print(
@@ -1 +1 @@
1
- __version__ = "2.3.12"
1
+ __version__ = "2.3.14"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: langtrace-python-sdk
3
- Version: 2.3.12
3
+ Version: 2.3.14
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,6 +18,7 @@ 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
21
22
  Requires-Dist: sqlalchemy
22
23
  Requires-Dist: tiktoken>=0.1.1
23
24
  Requires-Dist: trace-attributes==7.0.4
@@ -196,6 +197,10 @@ langtrace.init(custom_remote_exporter=<your_exporter>, batch=<True or False>)
196
197
  | `api_host` | `Optional[str]` | `https://langtrace.ai/` | The API host for the remote exporter. |
197
198
  | `disable_instrumentations` | `Optional[DisableInstrumentations]` | `None` | You can pass an object to disable instrumentation for specific vendors ex: `{'only': ['openai']}` or `{'all_except': ['openai']}` |
198
199
 
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
+
199
204
  ### Additional Customization
200
205
 
201
206
  - `@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.
@@ -277,6 +282,7 @@ prompt = get_prompt_from_registry(<Registry ID>, options={"prompt_version": 1, "
277
282
  ```
278
283
 
279
284
  ### Opt out of tracing prompt and completion data
285
+
280
286
  By default, prompt and completion data are captured. If you would like to opt out of it, set the following env var,
281
287
 
282
288
  `TRACE_PROMPT_COMPLETION_DATA=false`
@@ -285,30 +291,31 @@ By default, prompt and completion data are captured. If you would like to opt ou
285
291
 
286
292
  Langtrace automatically captures traces from the following vendors:
287
293
 
288
- | Vendor | Type | Typescript SDK | Python SDK |
289
- | ------------ | --------------- | ------------------ | ------------------------------- |
290
- | OpenAI | LLM | :white_check_mark: | :white_check_mark: |
291
- | Anthropic | LLM | :white_check_mark: | :white_check_mark: |
292
- | Azure OpenAI | LLM | :white_check_mark: | :white_check_mark: |
293
- | Cohere | LLM | :white_check_mark: | :white_check_mark: |
294
- | Groq | LLM | :x: | :white_check_mark: |
295
- | Perplexity | LLM | :white_check_mark: | :white_check_mark: |
296
- | Gemini | LLM | :x: | :white_check_mark: |
297
- | Mistral | LLM | :x: | :white_check_mark: |
298
- | Langchain | Framework | :x: | :white_check_mark: |
299
- | LlamaIndex | Framework | :white_check_mark: | :white_check_mark: |
300
- | Langgraph | Framework | :x: | :white_check_mark: |
301
- | DSPy | Framework | :x: | :white_check_mark: |
302
- | CrewAI | Framework | :x: | :white_check_mark: |
303
- | Ollama | Framework | :x: | :white_check_mark: |
304
- | VertexAI | Framework | :x: | :white_check_mark: |
305
- | Vercel AI SDK| Framework | :white_check_mark: | :x: |
306
- | EmbedChain | Framework | :x: | :white_check_mark: |
307
- | Pinecone | Vector Database | :white_check_mark: | :white_check_mark: |
308
- | ChromaDB | Vector Database | :white_check_mark: | :white_check_mark: |
309
- | QDrant | Vector Database | :white_check_mark: | :white_check_mark: |
310
- | Weaviate | Vector Database | :white_check_mark: | :white_check_mark: |
311
- | PGVector | Vector Database | :white_check_mark: | :white_check_mark: (SQLAlchemy) |
294
+ | Vendor | Type | Typescript SDK | Python SDK |
295
+ | ------------- | --------------- | ------------------ | ------------------------------- |
296
+ | OpenAI | LLM | :white_check_mark: | :white_check_mark: |
297
+ | Anthropic | LLM | :white_check_mark: | :white_check_mark: |
298
+ | Azure OpenAI | LLM | :white_check_mark: | :white_check_mark: |
299
+ | Cohere | LLM | :white_check_mark: | :white_check_mark: |
300
+ | Groq | LLM | :x: | :white_check_mark: |
301
+ | Perplexity | LLM | :white_check_mark: | :white_check_mark: |
302
+ | Gemini | LLM | :x: | :white_check_mark: |
303
+ | Mistral | LLM | :x: | :white_check_mark: |
304
+ | Langchain | Framework | :x: | :white_check_mark: |
305
+ | LlamaIndex | Framework | :white_check_mark: | :white_check_mark: |
306
+ | Langgraph | Framework | :x: | :white_check_mark: |
307
+ | DSPy | Framework | :x: | :white_check_mark: |
308
+ | CrewAI | Framework | :x: | :white_check_mark: |
309
+ | Ollama | Framework | :x: | :white_check_mark: |
310
+ | VertexAI | Framework | :x: | :white_check_mark: |
311
+ | Vercel AI SDK | Framework | :white_check_mark: | :x: |
312
+ | EmbedChain | Framework | :x: | :white_check_mark: |
313
+ | Autogen | Framework | :x: | :white_check_mark: |
314
+ | Pinecone | Vector Database | :white_check_mark: | :white_check_mark: |
315
+ | ChromaDB | Vector Database | :white_check_mark: | :white_check_mark: |
316
+ | QDrant | Vector Database | :white_check_mark: | :white_check_mark: |
317
+ | Weaviate | Vector Database | :white_check_mark: | :white_check_mark: |
318
+ | PGVector | Vector Database | :white_check_mark: | :white_check_mark: (SQLAlchemy) |
312
319
 
313
320
  ---
314
321
 
@@ -1,6 +1,8 @@
1
1
  examples/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
2
2
  examples/anthropic_example/__init__.py,sha256=03us1YuvAJR6fqXX8NH2kROBfTmyz7KzFVY01UlL-tM,237
3
3
  examples/anthropic_example/completion.py,sha256=3_YEZrt0BLVNJT_RbLXg6JGP2bweuc_HPC2MWR73tOM,713
4
+ examples/autogen_example/__init__.py,sha256=UJgpzL2yOmzir-DAiGFR1PB1Zz3YcQvYcq5bCN8nl0A,158
5
+ examples/autogen_example/main.py,sha256=6OJ73VCdHgVrqnekF1S1nK8mXCUABLbUUkQtr7wOCdw,2312
4
6
  examples/azureopenai_example/__init__.py,sha256=PaZM90r6VN4eSOXxb6wGsyhf9-RJCNqBypzk1Xa2GJI,271
5
7
  examples/azureopenai_example/completion.py,sha256=K_GeU0TfJ9lLDfW5VI0Lmm8_I0JXf1x9Qi83ImJ350c,668
6
8
  examples/chroma_example/__init__.py,sha256=Mrf8KptW1hhzu6WDdRRTxbaB-0kM7x5u-Goc_zR7G5c,203
@@ -42,9 +44,10 @@ examples/gemini_example/function_tools.py,sha256=ZOBrdPy_8s3NDfsF5A4RXIoUi2VXlD8
42
44
  examples/gemini_example/main.py,sha256=cTXqgOa6lEMwgX56uneM-1TbIY_QZtDRkByW5z0LpNk,2470
43
45
  examples/hiveagent_example/basic.py,sha256=Sd7I5w8w5Xx7ODaydTY30yiq9HwJDMKHQywrZjgehP0,441
44
46
  examples/inspect_ai_example/basic_eval.py,sha256=hDg2BB9ONNpOGRVH08HsghnS1373sOnq6dyDmUQd9gY,1040
45
- examples/langchain_example/__init__.py,sha256=g0WO8zrKVSDc8XmMVFl3oYno7ihXtPuHu9yy_tY3JhY,493
47
+ examples/langchain_example/__init__.py,sha256=FLple72UuvS0BUp73BFTE3eY7t5-OxOLuFIo515Rwto,603
46
48
  examples/langchain_example/basic.py,sha256=hrwMHOUv78-su5DP9i5krkQnMGHq0svEXsBa40Jkggg,2981
47
49
  examples/langchain_example/groq_example.py,sha256=egrg3FHCnSJ-kV22Z2_t9ElJfKilddfcO5bwcKCfc5M,1060
50
+ examples/langchain_example/langchain_google_example.py,sha256=SQqz3lWApm7DJK9pW-FwtGUtDJ5nkbJ8MIPz79Rwtw0,817
48
51
  examples/langchain_example/langgraph_example.py,sha256=7C2a4Sg0PKbbab03CVkStO3MzT7C-O1UtdmObvBXurM,2005
49
52
  examples/langchain_example/langgraph_example_tools.py,sha256=rFwgQYRngeyCz9PuBxnllp5t5PIHk8d-UDKwCQTgkxw,4208
50
53
  examples/langchain_example/sagemaker.py,sha256=V-rTZRyaErHCuo3kfrrZD8AELHJVi3wF7n1YrixfF1s,2330
@@ -88,15 +91,15 @@ examples/vertexai_example/main.py,sha256=gndId5X5ksD-ycxnAWMdEqIDbLc3kz5Vt8vm4YP
88
91
  examples/weaviate_example/__init__.py,sha256=8JMDBsRSEV10HfTd-YC7xb4txBjD3la56snk-Bbg2Kw,618
89
92
  examples/weaviate_example/query_text.py,sha256=wPHQTc_58kPoKTZMygVjTj-2ZcdrIuaausJfMxNQnQc,127162
90
93
  langtrace_python_sdk/__init__.py,sha256=VZM6i71NR7pBQK6XvJWRelknuTYUhqwqE7PlicKa5Wg,1166
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
+ langtrace_python_sdk/langtrace.py,sha256=SmDig6WHYGmM0dUcguWs8J3S5fuSItHiyf8Sf-OnLDI,9858
95
+ langtrace_python_sdk/version.py,sha256=ezCBY1dWYKVlRARVZudr7rvPqU59svV18xDMDMGYnoc,23
96
+ langtrace_python_sdk/constants/__init__.py,sha256=3CNYkWMdd1DrkGqzLUgNZXjdAlM6UFMlf_F-odAToyc,146
94
97
  langtrace_python_sdk/constants/exporter/langtrace_exporter.py,sha256=5MNjnAOg-4am78J3gVMH6FSwq5N8TOj72ugkhsw4vi0,46
95
98
  langtrace_python_sdk/constants/instrumentation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
96
99
  langtrace_python_sdk/constants/instrumentation/anthropic.py,sha256=YX3llt3zwDY6XrYk3CB8WEVqgrzRXEw_ffyk56JoF3k,126
97
100
  langtrace_python_sdk/constants/instrumentation/chroma.py,sha256=hiPGYdHS0Yj4Kh3eaYBbuCAl_swqIygu80yFqkOgdak,955
98
101
  langtrace_python_sdk/constants/instrumentation/cohere.py,sha256=tf9sDfb5K3qOAHChEE5o8eYWPZ1io58VsOjZDCZPxfw,577
99
- langtrace_python_sdk/constants/instrumentation/common.py,sha256=dbqpfFpkchXn5aNQp07N5emNvsJHiyT6OZA7wIsg4T8,993
102
+ langtrace_python_sdk/constants/instrumentation/common.py,sha256=bjst43qOtzIEAZMr-BS5Qzgv79dkt6GppkAG0_cLFzI,1019
100
103
  langtrace_python_sdk/constants/instrumentation/embedchain.py,sha256=HodCJvaFjILoOG50OwFObxfVxt_8VUaIAIqvgoN3tzo,278
101
104
  langtrace_python_sdk/constants/instrumentation/gemini.py,sha256=UAmfgg9FM7uNeOCdPfWlir6OIH-8BoxFGPRpdBd9ZZs,358
102
105
  langtrace_python_sdk/constants/instrumentation/groq.py,sha256=VFXmIl4aqGY_fS0PAmjPj_Qm7Tibxbx7Ur_e7rQpqXc,134
@@ -110,11 +113,14 @@ langtrace_python_sdk/constants/instrumentation/weaviate.py,sha256=gtv-JBxvNGClEM
110
113
  langtrace_python_sdk/extensions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
111
114
  langtrace_python_sdk/extensions/langtrace_exporter.py,sha256=nbDFxDsDRjpi7otiHHnQ3Z9_LYqLCgxdtP4IWnnOuyI,6307
112
115
  langtrace_python_sdk/extensions/langtrace_filesystem.py,sha256=34fZutG28EJ66l67OvTGsydAH3ZpXgikdE7hVLqBpG4,7863
113
- langtrace_python_sdk/instrumentation/__init__.py,sha256=bkyxh6lq_6dgCdbBseFQEbejRTLZv4s9nLBfNSqL6lk,1548
116
+ langtrace_python_sdk/instrumentation/__init__.py,sha256=2ZSUFvF1Lv15PQvPGk8a_RiukjFKWOM5esDot5ZOkbo,1622
114
117
  langtrace_python_sdk/instrumentation/anthropic/__init__.py,sha256=donrurJAGYlxrSRA3BIf76jGeUcAx9Tq8CVpah68S0Y,101
115
118
  langtrace_python_sdk/instrumentation/anthropic/instrumentation.py,sha256=ndXdruI0BG7n75rsuEpKjfzePxrZxg40gZ39ONmD_v4,1845
116
119
  langtrace_python_sdk/instrumentation/anthropic/patch.py,sha256=LUv-nv94uPJprDj34LQNrhRDqweZZ26Cb9oVATBc2Yc,5230
117
120
  langtrace_python_sdk/instrumentation/anthropic/types.py,sha256=WdeXe2tkjAisMLK38STKwVe7MJS5SLoETJ_aKhA_-UU,2463
121
+ langtrace_python_sdk/instrumentation/autogen/__init__.py,sha256=unDhpqWQIdHFw24lRsRu1Mm1NCZxZgyBrPRZrAJL3Lo,90
122
+ langtrace_python_sdk/instrumentation/autogen/instrumentation.py,sha256=0aUPPRtFkGBB2C7PYR3Myt8JHgze5vs93iCMqj2QN0E,1518
123
+ langtrace_python_sdk/instrumentation/autogen/patch.py,sha256=mp6WxHYVqTXvqZOi6CnZNN0MmzoG5v9LPMU2fjkivsY,4650
118
124
  langtrace_python_sdk/instrumentation/chroma/__init__.py,sha256=pNZ5UO8Q-d5VkXSobBf79reB6AmEl_usnnTp5Itv818,95
119
125
  langtrace_python_sdk/instrumentation/chroma/instrumentation.py,sha256=nT6PS6bsrIOO9kLV5GuUeRjMe6THHHAZGvqWBP1dYog,1807
120
126
  langtrace_python_sdk/instrumentation/chroma/patch.py,sha256=jYcqBeu-0cYA29PO880oXYRwYh-R1oseXmzfK6UDBps,9074
@@ -137,14 +143,14 @@ langtrace_python_sdk/instrumentation/groq/__init__.py,sha256=ZXeq_nrej6Lm_uoMFEg
137
143
  langtrace_python_sdk/instrumentation/groq/instrumentation.py,sha256=Ttf07XVKhdYY1_fqJc7QWiSdmgEhEVyQB_3Az2_wqYo,1832
138
144
  langtrace_python_sdk/instrumentation/groq/patch.py,sha256=MNz2brkSDQT2eRKJFAwUwMEOca9TQC4gsuYIx7WpEA4,22955
139
145
  langtrace_python_sdk/instrumentation/langchain/__init__.py,sha256=-7ZkqQFu64F-cxSFd1ZPrciODKqmUIyUbQQ-eHuQPyM,101
140
- langtrace_python_sdk/instrumentation/langchain/instrumentation.py,sha256=Q7rnpB8wlnG2V7KbHWxnNKAKD02ra8sm_q6pr-OPM60,3921
146
+ langtrace_python_sdk/instrumentation/langchain/instrumentation.py,sha256=mek9-wlkuhFd7teSveQEd717i_a9yQtGdGyw7jOMIdo,3860
141
147
  langtrace_python_sdk/instrumentation/langchain/patch.py,sha256=sjmY-Ciu6G-qRV_mHJ2HFWqbEWXnA75GH_WFK_d_p6o,4410
142
148
  langtrace_python_sdk/instrumentation/langchain_community/__init__.py,sha256=mj5RR_cfkjMql7W9OyyhmviT2GZ-4Pv9XJfGwJufp_E,119
143
149
  langtrace_python_sdk/instrumentation/langchain_community/instrumentation.py,sha256=TmMRXcaiMR99Qg7r7pT1XunCr_GOQl_Csr6leSKYyTQ,5350
144
150
  langtrace_python_sdk/instrumentation/langchain_community/patch.py,sha256=fn-FBbu56ko7XSer0dDdQtIaXcsdZ7L_il_YjnAdL8I,5817
145
151
  langtrace_python_sdk/instrumentation/langchain_core/__init__.py,sha256=kumE_reeqgM-ZvEZ6-XxyT-F-HAdKq_v_PKvsLb4EZQ,110
146
- langtrace_python_sdk/instrumentation/langchain_core/instrumentation.py,sha256=0Sh-CBXeeMYpK05rS33kCmyjRe6xHuqnbLcBlXpj46I,6342
147
- langtrace_python_sdk/instrumentation/langchain_core/patch.py,sha256=axy84D5FcqsY70z4fgIkYsKr6FxV2KEdqvR2fX5YKI0,10919
152
+ langtrace_python_sdk/instrumentation/langchain_core/instrumentation.py,sha256=szTCveG4IP64rlaY4iZATWv2f38k1_DtfbBU60YlfYk,6730
153
+ langtrace_python_sdk/instrumentation/langchain_core/patch.py,sha256=CXEfbq6E88X_y3JF7CaEEbNCYzSfig5ztNHW-aiiTic,10918
148
154
  langtrace_python_sdk/instrumentation/langgraph/__init__.py,sha256=eitlHloY-aZ4ZuIEJx61AadEA3G7siyecP-V-lziAr8,101
149
155
  langtrace_python_sdk/instrumentation/langgraph/instrumentation.py,sha256=SUZZhWSIbcfsF1S5NtEqW8QzkRM_pKAuXB7pwk5tsOU,2526
150
156
  langtrace_python_sdk/instrumentation/langgraph/patch.py,sha256=PGe1ZywXctB_yYqnp8AtD8Xqj7EZ087-S5_2vLRYhEQ,4987
@@ -172,14 +178,14 @@ langtrace_python_sdk/instrumentation/vertexai/instrumentation.py,sha256=Keeb1D7n
172
178
  langtrace_python_sdk/instrumentation/vertexai/patch.py,sha256=vPxwuSKgA3cUtelgot4XZEox8AD4ehsi3bNTKD_HS_M,4394
173
179
  langtrace_python_sdk/instrumentation/weaviate/__init__.py,sha256=Mc-Je6evPo-kKQzerTG7bd1XO5JOh4YGTE3wBxaUBwg,99
174
180
  langtrace_python_sdk/instrumentation/weaviate/instrumentation.py,sha256=bzPwtoQD0X6beLYXe6ZL7XRkyRkqdiqKiGc4gOlCQdU,2295
175
- langtrace_python_sdk/instrumentation/weaviate/patch.py,sha256=3qxhJjEnu5lNb6_x0p82PaFBgXul-b0XTyTQV1JHzhw,6597
181
+ langtrace_python_sdk/instrumentation/weaviate/patch.py,sha256=aWLDbNGz35V6XQUv4lkMD0O689suqh6KdTa33VDtUkE,6905
176
182
  langtrace_python_sdk/types/__init__.py,sha256=MeGkmoy2OY3V21GErDIdlf_N8Aj7HDld5Tpbvq2PwTY,4104
177
- langtrace_python_sdk/utils/__init__.py,sha256=giTHkvDOQdqFqXU4PoGP7DhA9tAteZN-KxX3mEUg6QQ,893
183
+ langtrace_python_sdk/utils/__init__.py,sha256=f6VKZ-izPamPT1-e2S35I8ONhHwm4EnZtjAix3CNIM8,1358
178
184
  langtrace_python_sdk/utils/langtrace_sampler.py,sha256=BupNndHbU9IL_wGleKetz8FdcveqHMBVz1bfKTTW80w,1753
179
- langtrace_python_sdk/utils/llm.py,sha256=k16jQL3wf1dYIDOcXSvHVfL0s97cu3QVLMmZmtTT3Gk,14741
185
+ langtrace_python_sdk/utils/llm.py,sha256=8ioCABHCEF4vuJyjgQFUBS4j_umSw-NWv02Y8URyO-I,14897
180
186
  langtrace_python_sdk/utils/misc.py,sha256=7PRJ45BwuwJ6fPAdy1OpBau8QERR2aWaVvzDvZ7JTkE,1729
181
187
  langtrace_python_sdk/utils/prompt_registry.py,sha256=n5dQMVLBw8aJZY8Utvf67bncc25ELf6AH9BYw8_hSzo,2619
182
- langtrace_python_sdk/utils/sdk_version_checker.py,sha256=FzjIWZjn53cX0LEVPdipQd1fO9lG8iGVUEVUs9Hyk6M,1713
188
+ langtrace_python_sdk/utils/sdk_version_checker.py,sha256=F-VVVH7Fmhr5LcY0IIe-34zIi5RQcx26uuxFpPzZesM,1782
183
189
  langtrace_python_sdk/utils/silently_fail.py,sha256=wzmvRDZppaRZgVP8C1xpq2GlWXYCwubhaeWvEbQP1SI,1196
184
190
  langtrace_python_sdk/utils/types.py,sha256=l-N6o7cnWUyrD6dBvW7W3Pf5CkPo5QaoT__k1XLbrQg,383
185
191
  langtrace_python_sdk/utils/with_root_span.py,sha256=2iWu8XD1NOFqSFgDZDJiMHZ1JB4HzmYPLr_F3Ugul2k,8480
@@ -225,8 +231,8 @@ tests/pinecone/cassettes/test_query.yaml,sha256=b5v9G3ssUy00oG63PlFUR3JErF2Js-5A
225
231
  tests/pinecone/cassettes/test_upsert.yaml,sha256=neWmQ1v3d03V8WoLl8FoFeeCYImb8pxlJBWnFd_lITU,38607
226
232
  tests/qdrant/conftest.py,sha256=9n0uHxxIjWk9fbYc4bx-uP8lSAgLBVx-cV9UjnsyCHM,381
227
233
  tests/qdrant/test_qdrant.py,sha256=pzjAjVY2kmsmGfrI2Gs2xrolfuaNHz7l1fqGQCjp5_o,3353
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,,
234
+ langtrace_python_sdk-2.3.14.dist-info/METADATA,sha256=nhW-bRxBdnutDeBV01jGWuJ6IdWhe0sreHYqUJRW1cc,15380
235
+ langtrace_python_sdk-2.3.14.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
236
+ langtrace_python_sdk-2.3.14.dist-info/entry_points.txt,sha256=1_b9-qvf2fE7uQNZcbUei9vLpFZBbbh9LrtGw95ssAo,70
237
+ langtrace_python_sdk-2.3.14.dist-info/licenses/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
238
+ langtrace_python_sdk-2.3.14.dist-info/RECORD,,