langtrace-python-sdk 1.1.2__py3-none-any.whl → 1.1.5__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 (42) hide show
  1. examples/anthropic_example/__init__.py +0 -0
  2. examples/anthropic_example/completion.py +29 -0
  3. examples/chroma_example/basic.py +2 -3
  4. examples/langchain_example/basic.py +2 -3
  5. examples/langchain_example/tool.py +2 -3
  6. examples/llamaindex_example/basic.py +2 -3
  7. examples/openai/chat_completion.py +2 -3
  8. examples/openai/embeddings_create.py +2 -3
  9. examples/openai/function_calling.py +2 -3
  10. examples/openai/images_generate.py +2 -3
  11. examples/pinecone_example/basic.py +2 -3
  12. langtrace_python_sdk/__init__.py +2 -3
  13. langtrace_python_sdk/constants/instrumentation/anthropic.py +6 -0
  14. langtrace_python_sdk/constants/instrumentation/common.py +5 -4
  15. langtrace_python_sdk/extensions/langtrace_exporter.py +2 -2
  16. langtrace_python_sdk/instrumentation/anthropic/__init__.py +0 -0
  17. langtrace_python_sdk/instrumentation/anthropic/instrumentation.py +39 -0
  18. langtrace_python_sdk/instrumentation/anthropic/patch.py +137 -0
  19. langtrace_python_sdk/instrumentation/chroma/instrumentation.py +2 -3
  20. langtrace_python_sdk/instrumentation/chroma/patch.py +2 -2
  21. langtrace_python_sdk/instrumentation/langchain/instrumentation.py +1 -2
  22. langtrace_python_sdk/instrumentation/langchain/patch.py +1 -1
  23. langtrace_python_sdk/instrumentation/langchain_community/instrumentation.py +1 -1
  24. langtrace_python_sdk/instrumentation/langchain_community/patch.py +1 -1
  25. langtrace_python_sdk/instrumentation/langchain_core/instrumentation.py +1 -1
  26. langtrace_python_sdk/instrumentation/langchain_core/patch.py +1 -1
  27. langtrace_python_sdk/instrumentation/llamaindex/instrumentation.py +1 -2
  28. langtrace_python_sdk/instrumentation/llamaindex/patch.py +1 -1
  29. langtrace_python_sdk/instrumentation/openai/instrumentation.py +1 -1
  30. langtrace_python_sdk/instrumentation/openai/patch.py +4 -4
  31. langtrace_python_sdk/instrumentation/pinecone/instrumentation.py +2 -3
  32. langtrace_python_sdk/instrumentation/pinecone/patch.py +2 -2
  33. langtrace_python_sdk/langtrace.py +12 -8
  34. langtrace_python_sdk/utils/llm.py +2 -2
  35. langtrace_python_sdk-1.1.5.dist-info/METADATA +83 -0
  36. langtrace_python_sdk-1.1.5.dist-info/RECORD +61 -0
  37. {langtrace_python_sdk-1.1.2.dist-info → langtrace_python_sdk-1.1.5.dist-info}/WHEEL +1 -1
  38. langtrace_python_sdk/instrumentation/chroma/apis.py +0 -40
  39. langtrace_python_sdk-1.1.2.dist-info/METADATA +0 -17
  40. langtrace_python_sdk-1.1.2.dist-info/RECORD +0 -56
  41. {langtrace_python_sdk-1.1.2.dist-info → langtrace_python_sdk-1.1.5.dist-info}/LICENSE +0 -0
  42. {langtrace_python_sdk-1.1.2.dist-info → langtrace_python_sdk-1.1.5.dist-info}/top_level.txt +0 -0
File without changes
@@ -0,0 +1,29 @@
1
+ """Example of using the anthropic API to create a message."""
2
+ import anthropic
3
+ from dotenv import find_dotenv, load_dotenv
4
+
5
+ from langtrace_python_sdk import langtrace
6
+
7
+ _ = load_dotenv(find_dotenv())
8
+
9
+ langtrace.init(batch=False, log_spans_to_console=True,
10
+ write_to_remote_url=False)
11
+
12
+
13
+ def messages_create():
14
+
15
+ client = anthropic.Anthropic()
16
+
17
+ message = client.messages.create(
18
+ model="claude-3-opus-20240229",
19
+ max_tokens=1000,
20
+ temperature=0.0,
21
+ system="Respond only in Yoda-speak.",
22
+ messages=[
23
+ {"role": "user", "content": "How are you today?"}
24
+ ],
25
+ stream=True
26
+ )
27
+
28
+ for response in message:
29
+ pass
@@ -2,9 +2,8 @@ import chromadb
2
2
  from chromadb.utils import embedding_functions
3
3
  from dotenv import find_dotenv, load_dotenv
4
4
 
5
- from src.langtrace_python_sdk import langtrace
6
- from src.langtrace_python_sdk.utils.with_root_span import \
7
- with_langtrace_root_span
5
+ from langtrace_python_sdk import langtrace
6
+ from langtrace_python_sdk.utils.with_root_span import with_langtrace_root_span
8
7
 
9
8
  _ = load_dotenv(find_dotenv())
10
9
 
@@ -7,9 +7,8 @@ from langchain_core.prompts.chat import ChatPromptTemplate
7
7
  from langchain_core.runnables import RunnablePassthrough
8
8
  from langchain_openai import ChatOpenAI, OpenAIEmbeddings
9
9
 
10
- from src.langtrace_python_sdk import langtrace
11
- from src.langtrace_python_sdk.utils.with_root_span import \
12
- with_langtrace_root_span
10
+ from langtrace_python_sdk import langtrace
11
+ from langtrace_python_sdk.utils.with_root_span import with_langtrace_root_span
13
12
 
14
13
  _ = load_dotenv(find_dotenv())
15
14
 
@@ -6,9 +6,8 @@ from langchain_core.pydantic_v1 import BaseModel, Field
6
6
  from langchain_core.tools import Tool
7
7
  from langchain_openai import ChatOpenAI
8
8
 
9
- from src.langtrace_python_sdk import langtrace
10
- from src.langtrace_python_sdk.utils.with_root_span import \
11
- with_langtrace_root_span
9
+ from langtrace_python_sdk import langtrace
10
+ from langtrace_python_sdk.utils.with_root_span import with_langtrace_root_span
12
11
 
13
12
  _ = load_dotenv(find_dotenv())
14
13
 
@@ -1,9 +1,8 @@
1
1
  from dotenv import find_dotenv, load_dotenv
2
2
  from llama_index.core import SimpleDirectoryReader, VectorStoreIndex
3
3
 
4
- from src.langtrace_python_sdk import langtrace
5
- from src.langtrace_python_sdk.utils.with_root_span import \
6
- with_langtrace_root_span
4
+ from langtrace_python_sdk import langtrace
5
+ from langtrace_python_sdk.utils.with_root_span import with_langtrace_root_span
7
6
 
8
7
  _ = load_dotenv(find_dotenv())
9
8
 
@@ -1,9 +1,8 @@
1
1
  from dotenv import find_dotenv, load_dotenv
2
2
  from openai import OpenAI
3
3
 
4
- from src.langtrace_python_sdk import langtrace
5
- from src.langtrace_python_sdk.utils.with_root_span import \
6
- with_langtrace_root_span
4
+ from langtrace_python_sdk import langtrace
5
+ from langtrace_python_sdk.utils.with_root_span import with_langtrace_root_span
7
6
 
8
7
  _ = load_dotenv(find_dotenv())
9
8
 
@@ -1,9 +1,8 @@
1
1
  from dotenv import find_dotenv, load_dotenv
2
2
  from openai import OpenAI
3
3
 
4
- from src.langtrace_python_sdk import langtrace
5
- from src.langtrace_python_sdk.utils.with_root_span import \
6
- with_langtrace_root_span
4
+ from langtrace_python_sdk import langtrace
5
+ from langtrace_python_sdk.utils.with_root_span import with_langtrace_root_span
7
6
 
8
7
  _ = load_dotenv(find_dotenv())
9
8
 
@@ -3,9 +3,8 @@ import json
3
3
  from dotenv import find_dotenv, load_dotenv
4
4
  from openai import OpenAI
5
5
 
6
- from src.langtrace_python_sdk import langtrace
7
- from src.langtrace_python_sdk.utils.with_root_span import \
8
- with_langtrace_root_span
6
+ from langtrace_python_sdk import langtrace
7
+ from langtrace_python_sdk.utils.with_root_span import with_langtrace_root_span
9
8
 
10
9
  _ = load_dotenv(find_dotenv())
11
10
 
@@ -1,9 +1,8 @@
1
1
  from dotenv import find_dotenv, load_dotenv
2
2
  from openai import OpenAI
3
3
 
4
- from src.langtrace_python_sdk import langtrace
5
- from src.langtrace_python_sdk.utils.with_root_span import \
6
- with_langtrace_root_span
4
+ from langtrace_python_sdk import langtrace
5
+ from langtrace_python_sdk.utils.with_root_span import with_langtrace_root_span
7
6
 
8
7
  _ = load_dotenv(find_dotenv())
9
8
 
@@ -5,9 +5,8 @@ from dotenv import find_dotenv, load_dotenv
5
5
  from openai import OpenAI
6
6
  from pinecone import Pinecone
7
7
 
8
- from src.langtrace_python_sdk import langtrace
9
- from src.langtrace_python_sdk.utils.with_root_span import \
10
- with_langtrace_root_span
8
+ from langtrace_python_sdk import langtrace
9
+ from langtrace_python_sdk.utils.with_root_span import with_langtrace_root_span
11
10
 
12
11
  _ = load_dotenv(find_dotenv())
13
12
 
@@ -1,7 +1,6 @@
1
1
  """
2
2
  This module is the entry point for the package. It exports the `init` function"""
3
- from src.langtrace_python_sdk import langtrace
4
- from src.langtrace_python_sdk.utils.with_root_span import \
5
- with_langtrace_root_span
3
+ from langtrace_python_sdk import langtrace
4
+ from langtrace_python_sdk.utils.with_root_span import with_langtrace_root_span
6
5
 
7
6
  __all__ = ['langtrace', 'with_langtrace_root_span']
@@ -0,0 +1,6 @@
1
+ APIS = {
2
+ "MESSAGES_CREATE": {
3
+ "METHOD": 'anthropic.messages.create',
4
+ "ENDPOINT": "/v1/messages",
5
+ },
6
+ }
@@ -7,12 +7,13 @@ TIKTOKEN_MODEL_MAPPING = {
7
7
  }
8
8
 
9
9
  SERVICE_PROVIDERS = {
10
- "OPENAI": "OpenAI",
10
+ "ANTHROPIC": "Anthropic",
11
11
  "AZURE": "Azure",
12
+ "CHROMA": "Chroma",
12
13
  "LANGCHAIN": "Langchain",
13
- "LANGCHAIN_CORE": "Langchain Core",
14
14
  "LANGCHAIN_COMMUNITY": "Langchain Community",
15
- "PINECONE": "Pinecone",
15
+ "LANGCHAIN_CORE": "Langchain Core",
16
16
  "LLAMAINDEX": "LlamaIndex",
17
- "CHROMA": "Chroma",
17
+ "OPENAI": "OpenAI",
18
+ "PINECONE": "Pinecone",
18
19
  }
@@ -6,7 +6,7 @@ import requests
6
6
  from opentelemetry.sdk.trace.export import (ReadableSpan, SpanExporter,
7
7
  SpanExportResult)
8
8
 
9
-
9
+ from opentelemetry.trace.span import format_trace_id
10
10
  class LangTraceExporter(SpanExporter):
11
11
  api_key: str
12
12
  url: str
@@ -37,7 +37,7 @@ class LangTraceExporter(SpanExporter):
37
37
 
38
38
  data = [
39
39
  {
40
- 'traceId': span.get_span_context().trace_id,
40
+ 'traceId': format_trace_id(span.get_span_context().trace_id),
41
41
  'instrumentationLibrary': span.instrumentation_info.__repr__(),
42
42
  'droppedEventsCount': span.dropped_events,
43
43
  'droppedAttributesCount': span.dropped_attributes,
@@ -0,0 +1,39 @@
1
+ """
2
+ Instrumentation for Anthropic
3
+ """
4
+ import importlib.metadata
5
+ from typing import Collection
6
+
7
+ from opentelemetry.instrumentation.instrumentor import BaseInstrumentor
8
+ from opentelemetry.trace import get_tracer
9
+ from wrapt import wrap_function_wrapper
10
+
11
+ from langtrace_python_sdk.instrumentation.anthropic.patch import \
12
+ messages_create
13
+
14
+
15
+ class AnthropicInstrumentation(BaseInstrumentor):
16
+ """
17
+ The AnthropicInstrumentation class represents the Anthropic instrumentation
18
+ """
19
+
20
+ def instrumentation_dependencies(self) -> Collection[str]:
21
+ return ["anthropic >= 0.19.1"]
22
+
23
+ def _instrument(self, **kwargs):
24
+ tracer_provider = kwargs.get("tracer_provider")
25
+ tracer = get_tracer(__name__, "", tracer_provider)
26
+ version = importlib.metadata.version('anthropic')
27
+
28
+ wrap_function_wrapper(
29
+ 'anthropic.resources.messages',
30
+ 'Messages.create',
31
+ messages_create(
32
+ 'anthropic.messages.create', version, tracer)
33
+ )
34
+
35
+ def _instrument_module(self, module_name):
36
+ pass
37
+
38
+ def _uninstrument(self, **kwargs):
39
+ pass
@@ -0,0 +1,137 @@
1
+ """
2
+ This module contains the patching logic for the Anthropic library."""
3
+ import json
4
+
5
+ from langtrace.trace_attributes import Event, LLMSpanAttributes
6
+ from opentelemetry.trace import SpanKind
7
+ from opentelemetry.trace.status import Status, StatusCode
8
+
9
+ from langtrace_python_sdk.constants.instrumentation.anthropic import APIS
10
+ from langtrace_python_sdk.constants.instrumentation.common import \
11
+ SERVICE_PROVIDERS
12
+ from langtrace_python_sdk.utils.llm import estimate_tokens
13
+
14
+
15
+ def messages_create(original_method, version, tracer):
16
+ """Wrap the `messages_create` method."""
17
+ def traced_method(wrapped, instance, args, kwargs):
18
+ base_url = str(instance._client._base_url) if hasattr(
19
+ instance, '_client') and hasattr(instance._client, '_base_url') else ""
20
+ service_provider = SERVICE_PROVIDERS['ANTHROPIC']
21
+ span_attributes = {
22
+ "langtrace.service.name": service_provider,
23
+ "langtrace.service.type": "llm",
24
+ "langtrace.service.version": version,
25
+ "langtrace.version": "1.0.0",
26
+ "url.full": base_url,
27
+ "llm.api": APIS["MESSAGES_CREATE"]["ENDPOINT"],
28
+ "llm.model": kwargs.get('model'),
29
+ "llm.prompts": json.dumps(kwargs.get('messages', [])),
30
+ "llm.stream": kwargs.get('stream'),
31
+ }
32
+
33
+ attributes = LLMSpanAttributes(**span_attributes)
34
+
35
+ if kwargs.get('temperature') is not None:
36
+ attributes.llm_temperature = kwargs.get('temperature')
37
+ if kwargs.get('top_p') is not None:
38
+ attributes.llm_top_p = kwargs.get('top_p')
39
+ if kwargs.get('top_k') is not None:
40
+ attributes.llm_top_p = kwargs.get('top_k')
41
+ if kwargs.get('user') is not None:
42
+ attributes.llm_user = kwargs.get('user')
43
+
44
+ span = tracer.start_span(
45
+ APIS["MESSAGES_CREATE"]["METHOD"], kind=SpanKind.CLIENT)
46
+ for field, value in attributes.model_dump(by_alias=True).items():
47
+ if value is not None:
48
+ span.set_attribute(field, value)
49
+ try:
50
+ # Attempt to call the original method
51
+ result = wrapped(*args, **kwargs)
52
+ if kwargs.get('stream') is False:
53
+ if hasattr(result, 'content') and result.content is not None:
54
+ span.set_attribute(
55
+ "llm.responses", json.dumps([{
56
+ "text": result.content[0].text,
57
+ "type": result.content[0].type
58
+ }]))
59
+ else:
60
+ responses = []
61
+ span.set_attribute(
62
+ "llm.responses", json.dumps(responses))
63
+ if hasattr(result, 'system_fingerprint') and \
64
+ result.system_fingerprint is not None:
65
+ span.set_attribute(
66
+ "llm.system.fingerprint", result.system_fingerprint)
67
+ # Get the usage
68
+ if hasattr(result, 'usage') and result.usage is not None:
69
+ usage = result.usage
70
+ if usage is not None:
71
+ usage_dict = {
72
+ "input_tokens": usage.input_tokens,
73
+ "output_tokens": usage.output_tokens,
74
+ "total_tokens": usage.input_tokens + usage.output_tokens
75
+ }
76
+ span.set_attribute(
77
+ "llm.token.counts", json.dumps(usage_dict))
78
+ span.set_status(StatusCode.OK)
79
+ span.end()
80
+ return result
81
+ else:
82
+ return handle_streaming_response(result, span)
83
+ except Exception as e:
84
+ # Record the exception in the span
85
+ span.record_exception(e)
86
+ # Set the span status to indicate an error
87
+ span.set_status(Status(StatusCode.ERROR, str(e)))
88
+ # Reraise the exception to ensure it's not swallowed
89
+ span.end()
90
+ raise
91
+
92
+ def handle_streaming_response(result, span):
93
+ """Process and yield streaming response chunks."""
94
+ result_content = []
95
+ span.add_event(Event.STREAM_START.value)
96
+ input_tokens = 0
97
+ output_tokens = 0
98
+ try:
99
+ for chunk in result:
100
+ content = ""
101
+ if hasattr(chunk, 'delta') and chunk.delta is not None:
102
+ content = chunk.delta.text if hasattr(
103
+ chunk.delta, 'text') else ""
104
+ # Assuming content needs to be aggregated before processing
105
+ result_content.append(content if len(content) > 0 else "")
106
+
107
+ if hasattr(chunk, 'message') and hasattr(chunk.message, 'usage'):
108
+ input_tokens += chunk.message.usage.input_tokens if hasattr(
109
+ chunk.message.usage, 'input_tokens') else 0
110
+ output_tokens += chunk.message.usage.output_tokens if hasattr(
111
+ chunk.message.usage, 'output_tokens') else 0
112
+
113
+ # Assuming span.add_event is part of a larger logging or event system
114
+ # Add event for each chunk of content
115
+ if content:
116
+ span.add_event(Event.STREAM_OUTPUT.value, {
117
+ "response": "".join(content)
118
+ })
119
+
120
+ # Assuming this is part of a generator, yield chunk or aggregated content
121
+ yield content
122
+ finally:
123
+
124
+ # Finalize span after processing all chunks
125
+ span.add_event(Event.STREAM_END.value)
126
+ span.set_attribute("llm.token.counts", json.dumps({
127
+ "input_tokens": input_tokens,
128
+ "output_tokens": output_tokens,
129
+ "total_tokens": input_tokens + output_tokens
130
+ }))
131
+ span.set_attribute("llm.responses", json.dumps(
132
+ [{"text": "".join(result_content)}]))
133
+ span.set_status(StatusCode.OK)
134
+ span.end()
135
+
136
+ # return the wrapped method
137
+ return traced_method
@@ -8,9 +8,8 @@ from opentelemetry.instrumentation.instrumentor import BaseInstrumentor
8
8
  from opentelemetry.trace import get_tracer
9
9
  from wrapt import wrap_function_wrapper
10
10
 
11
- from src.langtrace_python_sdk.constants.instrumentation.chroma import APIS
12
- from src.langtrace_python_sdk.instrumentation.chroma.patch import \
13
- collection_patch
11
+ from langtrace_python_sdk.constants.instrumentation.chroma import APIS
12
+ from langtrace_python_sdk.instrumentation.chroma.patch import collection_patch
14
13
 
15
14
 
16
15
  class ChromaInstrumentation(BaseInstrumentor):
@@ -5,8 +5,8 @@ from langtrace.trace_attributes import DatabaseSpanAttributes
5
5
  from opentelemetry.trace import SpanKind
6
6
  from opentelemetry.trace.status import Status, StatusCode
7
7
 
8
- from src.langtrace_python_sdk.constants.instrumentation.chroma import APIS
9
- from src.langtrace_python_sdk.constants.instrumentation.common import \
8
+ from langtrace_python_sdk.constants.instrumentation.chroma import APIS
9
+ from langtrace_python_sdk.constants.instrumentation.common import \
10
10
  SERVICE_PROVIDERS
11
11
 
12
12
 
@@ -9,8 +9,7 @@ from opentelemetry.instrumentation.instrumentor import BaseInstrumentor
9
9
  from opentelemetry.trace import get_tracer
10
10
  from wrapt import wrap_function_wrapper
11
11
 
12
- from src.langtrace_python_sdk.instrumentation.langchain.patch import \
13
- generic_patch
12
+ from langtrace_python_sdk.instrumentation.langchain.patch import generic_patch
14
13
 
15
14
 
16
15
  def patch_module_classes(module_name, tracer, version, task, trace_output=True, trace_input=True):
@@ -7,7 +7,7 @@ from langtrace.trace_attributes import FrameworkSpanAttributes
7
7
  from opentelemetry.trace import SpanKind, StatusCode
8
8
  from opentelemetry.trace.status import Status
9
9
 
10
- from src.langtrace_python_sdk.constants.instrumentation.common import \
10
+ from langtrace_python_sdk.constants.instrumentation.common import \
11
11
  SERVICE_PROVIDERS
12
12
 
13
13
 
@@ -9,7 +9,7 @@ from opentelemetry.instrumentation.instrumentor import BaseInstrumentor
9
9
  from opentelemetry.trace import get_tracer
10
10
  from wrapt import wrap_function_wrapper
11
11
 
12
- from src.langtrace_python_sdk.instrumentation.langchain_community.patch import \
12
+ from langtrace_python_sdk.instrumentation.langchain_community.patch import \
13
13
  generic_patch
14
14
 
15
15
 
@@ -4,7 +4,7 @@ from langtrace.trace_attributes import FrameworkSpanAttributes
4
4
  from opentelemetry.trace import SpanKind
5
5
  from opentelemetry.trace.status import Status, StatusCode
6
6
 
7
- from src.langtrace_python_sdk.constants.instrumentation.common import \
7
+ from langtrace_python_sdk.constants.instrumentation.common import \
8
8
  SERVICE_PROVIDERS
9
9
 
10
10
 
@@ -9,7 +9,7 @@ from opentelemetry.instrumentation.instrumentor import BaseInstrumentor
9
9
  from opentelemetry.trace import get_tracer
10
10
  from wrapt import wrap_function_wrapper
11
11
 
12
- from src.langtrace_python_sdk.instrumentation.langchain_core.patch import (
12
+ from langtrace_python_sdk.instrumentation.langchain_core.patch import (
13
13
  generic_patch, runnable_patch)
14
14
 
15
15
 
@@ -7,7 +7,7 @@ from langtrace.trace_attributes import FrameworkSpanAttributes
7
7
  from opentelemetry.trace import SpanKind, StatusCode
8
8
  from opentelemetry.trace.status import Status
9
9
 
10
- from src.langtrace_python_sdk.constants.instrumentation.common import \
10
+ from langtrace_python_sdk.constants.instrumentation.common import \
11
11
  SERVICE_PROVIDERS
12
12
 
13
13
 
@@ -9,8 +9,7 @@ from opentelemetry.instrumentation.instrumentor import BaseInstrumentor
9
9
  from opentelemetry.trace import get_tracer
10
10
  from wrapt import wrap_function_wrapper
11
11
 
12
- from src.langtrace_python_sdk.instrumentation.llamaindex.patch import \
13
- generic_patch
12
+ from langtrace_python_sdk.instrumentation.llamaindex.patch import generic_patch
14
13
 
15
14
 
16
15
  class LlamaindexInstrumentation(BaseInstrumentor):
@@ -5,7 +5,7 @@ from langtrace.trace_attributes import FrameworkSpanAttributes
5
5
  from opentelemetry.trace import SpanKind
6
6
  from opentelemetry.trace.status import Status, StatusCode
7
7
 
8
- from src.langtrace_python_sdk.constants.instrumentation.common import \
8
+ from langtrace_python_sdk.constants.instrumentation.common import \
9
9
  SERVICE_PROVIDERS
10
10
 
11
11
 
@@ -6,7 +6,7 @@ from opentelemetry.instrumentation.instrumentor import BaseInstrumentor
6
6
  from opentelemetry.trace import get_tracer
7
7
  from wrapt import wrap_function_wrapper
8
8
 
9
- from src.langtrace_python_sdk.instrumentation.openai.patch import (
9
+ from langtrace_python_sdk.instrumentation.openai.patch import (
10
10
  chat_completions_create, embeddings_create, images_generate)
11
11
 
12
12
 
@@ -6,11 +6,11 @@ from langtrace.trace_attributes import Event, LLMSpanAttributes
6
6
  from opentelemetry.trace import SpanKind
7
7
  from opentelemetry.trace.status import Status, StatusCode
8
8
 
9
- from src.langtrace_python_sdk.constants.instrumentation.common import \
9
+ from langtrace_python_sdk.constants.instrumentation.common import \
10
10
  SERVICE_PROVIDERS
11
- from src.langtrace_python_sdk.constants.instrumentation.openai import APIS
12
- from src.langtrace_python_sdk.utils.llm import (calculate_prompt_tokens,
13
- estimate_tokens)
11
+ from langtrace_python_sdk.constants.instrumentation.openai import APIS
12
+ from langtrace_python_sdk.utils.llm import (calculate_prompt_tokens,
13
+ estimate_tokens)
14
14
 
15
15
 
16
16
  def images_generate(original_method, version, tracer):
@@ -11,9 +11,8 @@ from opentelemetry.instrumentation.instrumentor import BaseInstrumentor
11
11
  from opentelemetry.trace import get_tracer
12
12
  from wrapt import wrap_function_wrapper
13
13
 
14
- from src.langtrace_python_sdk.constants.instrumentation.pinecone import APIS
15
- from src.langtrace_python_sdk.instrumentation.pinecone.patch import \
16
- generic_patch
14
+ from langtrace_python_sdk.constants.instrumentation.pinecone import APIS
15
+ from langtrace_python_sdk.instrumentation.pinecone.patch import generic_patch
17
16
 
18
17
 
19
18
  class PineconeInstrumentation(BaseInstrumentor):
@@ -4,9 +4,9 @@ from langtrace.trace_attributes import DatabaseSpanAttributes
4
4
  from opentelemetry.trace import SpanKind
5
5
  from opentelemetry.trace.status import Status, StatusCode
6
6
 
7
- from src.langtrace_python_sdk.constants.instrumentation.common import \
7
+ from langtrace_python_sdk.constants.instrumentation.common import \
8
8
  SERVICE_PROVIDERS
9
- from src.langtrace_python_sdk.constants.instrumentation.pinecone import APIS
9
+ from langtrace_python_sdk.constants.instrumentation.pinecone import APIS
10
10
 
11
11
 
12
12
  def generic_patch(original_method, method, version, tracer):
@@ -4,21 +4,23 @@ from opentelemetry.sdk.trace.export import (BatchSpanProcessor,
4
4
  ConsoleSpanExporter,
5
5
  SimpleSpanProcessor)
6
6
 
7
- from src.langtrace_python_sdk.extensions.langtrace_exporter import \
7
+ from langtrace_python_sdk.extensions.langtrace_exporter import \
8
8
  LangTraceExporter
9
- from src.langtrace_python_sdk.instrumentation.chroma.instrumentation import \
9
+ from langtrace_python_sdk.instrumentation.anthropic.instrumentation import \
10
+ AnthropicInstrumentation
11
+ from langtrace_python_sdk.instrumentation.chroma.instrumentation import \
10
12
  ChromaInstrumentation
11
- from src.langtrace_python_sdk.instrumentation.langchain.instrumentation import \
13
+ from langtrace_python_sdk.instrumentation.langchain.instrumentation import \
12
14
  LangchainInstrumentation
13
- from src.langtrace_python_sdk.instrumentation.langchain_community.instrumentation import \
15
+ from langtrace_python_sdk.instrumentation.langchain_community.instrumentation import \
14
16
  LangchainCommunityInstrumentation
15
- from src.langtrace_python_sdk.instrumentation.langchain_core.instrumentation import \
17
+ from langtrace_python_sdk.instrumentation.langchain_core.instrumentation import \
16
18
  LangchainCoreInstrumentation
17
- from src.langtrace_python_sdk.instrumentation.llamaindex.instrumentation import \
19
+ from langtrace_python_sdk.instrumentation.llamaindex.instrumentation import \
18
20
  LlamaindexInstrumentation
19
- from src.langtrace_python_sdk.instrumentation.openai.instrumentation import \
21
+ from langtrace_python_sdk.instrumentation.openai.instrumentation import \
20
22
  OpenAIInstrumentation
21
- from src.langtrace_python_sdk.instrumentation.pinecone.instrumentation import \
23
+ from langtrace_python_sdk.instrumentation.pinecone.instrumentation import \
22
24
  PineconeInstrumentation
23
25
 
24
26
 
@@ -61,6 +63,7 @@ def init(
61
63
  langchain_instrumentation = LangchainInstrumentation()
62
64
  langchain_core_instrumentation = LangchainCoreInstrumentation()
63
65
  langchain_community_instrumentation = LangchainCommunityInstrumentation()
66
+ anthropic_instrumentation = AnthropicInstrumentation()
64
67
 
65
68
  # Call the instrument method with some arguments
66
69
  openai_instrumentation.instrument()
@@ -70,3 +73,4 @@ def init(
70
73
  langchain_instrumentation.instrument()
71
74
  langchain_core_instrumentation.instrument()
72
75
  langchain_community_instrumentation.instrument()
76
+ anthropic_instrumentation.instrument()
@@ -5,9 +5,9 @@ to calculate the price of a model based on its usage.
5
5
 
6
6
  from tiktoken import get_encoding
7
7
 
8
- from src.langtrace_python_sdk.constants.instrumentation.common import \
8
+ from langtrace_python_sdk.constants.instrumentation.common import \
9
9
  TIKTOKEN_MODEL_MAPPING
10
- from src.langtrace_python_sdk.constants.instrumentation.openai import \
10
+ from langtrace_python_sdk.constants.instrumentation.openai import \
11
11
  OPENAI_COST_TABLE
12
12
 
13
13
 
@@ -0,0 +1,83 @@
1
+ Metadata-Version: 2.1
2
+ Name: langtrace-python-sdk
3
+ Version: 1.1.5
4
+ Summary: Python SDK for LangTrace
5
+ Home-page: https://github.com/Scale3-Labs/langtrace-python-sdk
6
+ Author: Scale3 Labs
7
+ Author-email: engineering@scale3labs.com
8
+ Maintainer: ['Ali Waleed', 'Darshit Suratwala', 'Dylan Zuber', 'Karthik Kalyanaraman', 'Obinna Okafor', 'Rohit Kadhe', 'Yemi Adejumobi']
9
+ License: AGPL-3.0-or-later
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
12
+ Classifier: Operating System :: OS Independent
13
+ Requires-Python: >=3.6
14
+ Description-Content-Type: text/markdown
15
+ License-File: LICENSE
16
+
17
+ <h1 align="center">LangTrace</h1>
18
+
19
+ Looking for the Typescript version? Check out [langtrace-typescript](https://github.com/Scale3-Labs/langtrace-typescript-sdk).
20
+
21
+ LangTrace is a set of extensions built on top of [OpenTelemetry](https://opentelemetry.io/) that gives you complete observability over your LLM application. Because it uses OpenTelemetry under the hood.
22
+
23
+
24
+ The repo contains standard OpenTelemetry instrumentations for LLM providers and Vector DBs, while still outputting standard OpenTelemetry data that can be connected to your observability stack.
25
+ If you already have OpenTelemetry instrumented, you can just add any of our instrumentations directly.
26
+
27
+ ## 🚀 Getting Started
28
+
29
+ The easiest way to get started is to use our SDK.
30
+
31
+ Install the SDK:
32
+
33
+ ```bash
34
+ pip install langtrace-python-sdk
35
+ ```
36
+
37
+ Then, to start instrumenting your code, just add this line to your code:
38
+
39
+ ```python
40
+ from langtrace_python_sdk import langtrace
41
+
42
+ langtrace.init()
43
+ ```
44
+
45
+ That's it. You're now tracing your code with LangTrace!
46
+ If you want to see the traces you can enable logging
47
+
48
+ ```python
49
+ langtrace.init(log_spans_to_console=True)
50
+ ```
51
+
52
+ If you want to export traces to an external endpoint, you will need to add ```LANGTRACE_URL``` to ```.env``` file.
53
+ ```python
54
+ langtrace.init(write_to_remote_url=True)
55
+ ```
56
+
57
+
58
+
59
+ ## 🪗 What do we instrument?
60
+
61
+ OpenLLMetry can instrument everything that [OpenTelemetry already instruments](https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation) - so things like your DB, API calls, and more. On top of that, we built a set of custom extensions that instrument things like your calls to OpenAI or Anthropic, or your Vector DB like Chroma, Pinecone, Qdrant or Weaviate.
62
+
63
+ ### LLM Providers
64
+
65
+ - ✅ OpenAI / Azure OpenAI
66
+ - ✅ Anthropic
67
+
68
+
69
+
70
+
71
+ ### Vector DBs
72
+
73
+ - ✅ Chroma
74
+ - ✅ Pinecone
75
+
76
+ ### Frameworks
77
+
78
+ - ✅ LangChain
79
+ - ✅ [LlamaIndex](https://docs.llamaindex.ai/en/stable/module_guides/observability/observability.html#openllmetry)
80
+
81
+
82
+
83
+
@@ -0,0 +1,61 @@
1
+ examples/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ examples/anthropic_example/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
+ examples/anthropic_example/completion.py,sha256=xsKxC56G3wPxtpNDpgcQ7qYGZdA2aQgLUIGPC1hWeO8,694
4
+ examples/chroma_example/__init__.py,sha256=ktveH9U1bkZwKUIqwGSJy_fPmIQ0dYwUuDRPUSY_s-k,24
5
+ examples/chroma_example/basic.py,sha256=1slK44Rekkrri1FQeiKdXsQ0femj0o90RwtYewkRroU,914
6
+ examples/langchain_example/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
+ examples/langchain_example/basic.py,sha256=SaeeGlwO-mr3_avp6PgVXVDh-cEcWqx9HYHlrKhDcIs,2070
8
+ examples/langchain_example/tool.py,sha256=VVN14Ve-BN51LNMDqhS2z-oD5nYXgl7mF7V9TAUg06k,2571
9
+ examples/llamaindex_example/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
+ examples/llamaindex_example/basic.py,sha256=yVQiVuBfD42BrsN7plE6LaDjsU4IsDQB8XuazySMx10,698
11
+ examples/openai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
+ examples/openai/chat_completion.py,sha256=_CBbIajQGfwiLOl8BiMhy3rkpHT-5oiQnRtoP7vhPXc,1346
13
+ examples/openai/embeddings_create.py,sha256=gK5fxAlG02qFdrvXVJxLUVFq43PjkkdsxAwMmF-Sjsg,533
14
+ examples/openai/function_calling.py,sha256=c9oj7c2MW9uCIb2Ug82ussBOVLPPIxEB_KBXlXDjNDI,2552
15
+ examples/openai/images_generate.py,sha256=kEtUF84xd4bz4G8sr239wNwLlKnxu0erVC-DRtcdgEc,521
16
+ examples/pinecone_example/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
+ examples/pinecone_example/basic.py,sha256=L4DappjWPPqwhmgtS3XhtV6Byga5iXaLh4Tv-zcT62U,940
18
+ langtrace_python_sdk/__init__.py,sha256=xgrb8Ep5gfiJUyKG6WPFh0n5jFthvn6sjgFD2Ib5aNg,261
19
+ langtrace_python_sdk/langtrace.py,sha256=Y1MGiC3DLuB9NtQGCplNit9-QQ6-V1DSEhEotghMzR0,3201
20
+ langtrace_python_sdk/constants/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
+ langtrace_python_sdk/constants/instrumentation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
22
+ langtrace_python_sdk/constants/instrumentation/anthropic.py,sha256=fRkdAf0E-JRCZFNJLaobUqaZ8yLjY3i6iTjwGleo2Ls,126
23
+ langtrace_python_sdk/constants/instrumentation/chroma.py,sha256=hiPGYdHS0Yj4Kh3eaYBbuCAl_swqIygu80yFqkOgdak,955
24
+ langtrace_python_sdk/constants/instrumentation/common.py,sha256=6sy6Am2sd-yJ-3ZI5P2UhmdF4PCvhYxLvhnZnTmZaiU,524
25
+ langtrace_python_sdk/constants/instrumentation/openai.py,sha256=wQ3vb7C3Okt7XJyxDfo9LWwtEggx8s9DzQ1JKPJ7pw8,1050
26
+ langtrace_python_sdk/constants/instrumentation/pinecone.py,sha256=8RZpXA1Qs2aQd8L_1qpevloPGMdY-IIr_hjz3jVK3PY,471
27
+ langtrace_python_sdk/extensions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
28
+ langtrace_python_sdk/extensions/langtrace_exporter.py,sha256=XSRoq1CHTcfUMQvCDaB_mJOMiLMJmWggyYz7daOUvn4,2370
29
+ langtrace_python_sdk/instrumentation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
30
+ langtrace_python_sdk/instrumentation/anthropic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
31
+ langtrace_python_sdk/instrumentation/anthropic/instrumentation.py,sha256=VAyKVEcKTivF-nciA-kgS5Mo1MfoMdE_gSEFQU9Ufzw,1122
32
+ langtrace_python_sdk/instrumentation/anthropic/patch.py,sha256=OGxh8G1vnbEzIrf1CUWvPhWj88dK4-77OB9Y2p7AzeM,6102
33
+ langtrace_python_sdk/instrumentation/chroma/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
34
+ langtrace_python_sdk/instrumentation/chroma/instrumentation.py,sha256=wHSEl902OeadlPw6qF_3UWx8VETtecknpEjTy5UYF-g,1221
35
+ langtrace_python_sdk/instrumentation/chroma/patch.py,sha256=GAM74FNxzXxlrxVo1uQ4OsPdFPFI6ltKcgPRB5zHopY,2003
36
+ langtrace_python_sdk/instrumentation/langchain/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
37
+ langtrace_python_sdk/instrumentation/langchain/instrumentation.py,sha256=1Nv2QR6x79qeJ0RhXHh8R0veN7KNfMuXT6W4M-WGePc,2871
38
+ langtrace_python_sdk/instrumentation/langchain/patch.py,sha256=ka-yJ8AalH3zMTHotFYKy9P_s-weRUV_8wNsWnEP1k8,3013
39
+ langtrace_python_sdk/instrumentation/langchain_community/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
40
+ langtrace_python_sdk/instrumentation/langchain_community/instrumentation.py,sha256=TVjHYbcd768iJjeBQ51AIlV-7lb4IDtO6KSFjkY1Qh4,4343
41
+ langtrace_python_sdk/instrumentation/langchain_community/patch.py,sha256=VrReRRie_bfQ-QXk_px3zaY82wFH_ZRB63ur3Sdozsg,2894
42
+ langtrace_python_sdk/instrumentation/langchain_core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
43
+ langtrace_python_sdk/instrumentation/langchain_core/instrumentation.py,sha256=vtpPO_IGRcmMLFsnRgLBsEVdIuFYC0Ga19Sbt8I74M0,4767
44
+ langtrace_python_sdk/instrumentation/langchain_core/patch.py,sha256=XNbv0-QIXuGvfQGzX7teNlU_dbwhJ43FEQrIpO-ih_8,7570
45
+ langtrace_python_sdk/instrumentation/llamaindex/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
46
+ langtrace_python_sdk/instrumentation/llamaindex/instrumentation.py,sha256=eNsLGN9-t-uTdnFj3PAY1hxq02inTx2o5VFsMuMxuBI,2249
47
+ langtrace_python_sdk/instrumentation/llamaindex/patch.py,sha256=1omgVUE9Vde0F2IkZXPZIKdvgYsAoLamCBbT0AHfi94,1743
48
+ langtrace_python_sdk/instrumentation/openai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
49
+ langtrace_python_sdk/instrumentation/openai/instrumentation.py,sha256=mxasb-AaJwnVP8PgV1M0VtZ0HQd5q6AJb3FlkWj4QKo,1392
50
+ langtrace_python_sdk/instrumentation/openai/patch.py,sha256=shWhrkzCnOoBuOvUT7flzgt--tV8M7dzMUNmyF9FZbs,12276
51
+ langtrace_python_sdk/instrumentation/pinecone/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
52
+ langtrace_python_sdk/instrumentation/pinecone/instrumentation.py,sha256=aLDugv8_8K0vmv0N2Bgfl8mFiOQSgnZtF46j-Mjl9W4,1755
53
+ langtrace_python_sdk/instrumentation/pinecone/patch.py,sha256=t5s2y_sj_gyVSFPcarED4mDmatdem4as6bRptftAc-s,1900
54
+ langtrace_python_sdk/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
55
+ langtrace_python_sdk/utils/llm.py,sha256=lXzaySV3BC-_ZuhMbDhbuAlI1jP-TlcFHewUfFxQoOg,1599
56
+ langtrace_python_sdk/utils/with_root_span.py,sha256=CRie2ljHhnHN8bUGDwBM-F18-c6xyoI_238KP8BEO-U,969
57
+ langtrace_python_sdk-1.1.5.dist-info/LICENSE,sha256=VD-pauwiiia-Xi2zgKvalKRIFSJJjqRCQw6aIpK2T9U,33892
58
+ langtrace_python_sdk-1.1.5.dist-info/METADATA,sha256=7_ai6S61MjUeLzW6LV-Pg6VyXiPO3DK2hofdEhyivzk,2647
59
+ langtrace_python_sdk-1.1.5.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
60
+ langtrace_python_sdk-1.1.5.dist-info/top_level.txt,sha256=rwET8cHATJvDBti7Dm6pwWIrNAT8DvqCXgRPWdu7_Hs,30
61
+ langtrace_python_sdk-1.1.5.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.42.0)
2
+ Generator: bdist_wheel (0.43.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,40 +0,0 @@
1
- from langtrace.trace_attributes import ChromaDBMethods
2
-
3
- APIS = {
4
- "ADD": {
5
- "METHOD": ChromaDBMethods.ADD.value,
6
- "OPERATION": "add",
7
- },
8
- "GET": {
9
- "METHOD": ChromaDBMethods.GET.value,
10
- "OPERATION": "get",
11
- },
12
- "QUERY": {
13
- "METHOD": ChromaDBMethods.QUERY.value,
14
- "OPERATION": "query",
15
- },
16
- "DELETE": {
17
- "METHOD": ChromaDBMethods.DELETE.value,
18
- "OPERATION": "delete",
19
- },
20
- "PEEK": {
21
- "METHOD": ChromaDBMethods.PEEK.value,
22
- "OPERATION": "peek",
23
- },
24
- "UPDATE": {
25
- "METHOD": ChromaDBMethods.UPDATE.value,
26
- "OPERATION": "update",
27
- },
28
- "UPSERT": {
29
- "METHOD": ChromaDBMethods.UPSERT.value,
30
- "OPERATION": "upsert",
31
- },
32
- "MODIFY": {
33
- "METHOD": ChromaDBMethods.MODIFY.value,
34
- "OPERATION": "modify",
35
- },
36
- "COUNT": {
37
- "METHOD": ChromaDBMethods.COUNT.value,
38
- "OPERATION": "count",
39
- },
40
- }
@@ -1,17 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: langtrace-python-sdk
3
- Version: 1.1.2
4
- Summary: Python SDK for LangTrace
5
- Home-page: https://github.com/Scale3-Labs/langtrace-python-sdk
6
- Author: Scale3 Labs
7
- Author-email: engineering@scale3labs.com
8
- Maintainer: ['Ali Waleed', 'Darshit Suratwala', 'Dylan Zuber', 'Karthik Kalyanaraman', 'Obinna Okafor', 'Rohit Kadhe', 'Yemi Adejumobi']
9
- License: AGPL-3.0-or-later
10
- Classifier: Programming Language :: Python :: 3
11
- Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
12
- Classifier: Operating System :: OS Independent
13
- Requires-Python: >=3.6
14
- Description-Content-Type: text/markdown
15
- License-File: LICENSE
16
-
17
- LangTrace - Python SDK
@@ -1,56 +0,0 @@
1
- examples/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- examples/chroma_example/__init__.py,sha256=ktveH9U1bkZwKUIqwGSJy_fPmIQ0dYwUuDRPUSY_s-k,24
3
- examples/chroma_example/basic.py,sha256=Rj0eQDsxkjBII48duGt55yByInty-TnLkQhu5eDYaTk,928
4
- examples/langchain_example/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
- examples/langchain_example/basic.py,sha256=8kqmSz5sdcqSnYUaTTBxL_EGqqKAKHF2y00BH-7f4aA,2084
6
- examples/langchain_example/tool.py,sha256=_DHj-lLQxxM9U6ESdfpEYm0KCPJHglLTUV6K4RwA69Y,2585
7
- examples/llamaindex_example/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
- examples/llamaindex_example/basic.py,sha256=3sfxZCb1bfPl_Qivl55AkAOt8jZ62KiGlRgXjMsLAj4,712
9
- examples/openai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
- examples/openai/chat_completion.py,sha256=LJYWysR0wCNHEh3e-3naRVNis87KKraH-niD9CKxF1w,1360
11
- examples/openai/embeddings_create.py,sha256=z9MqeJywjJcu6K3_RxMx9f_u35lFJ1qAl5A0F60BnPg,547
12
- examples/openai/function_calling.py,sha256=BJLmGRXGkqoEmccO4keyENRMgODkRad6agnGtxalQeI,2566
13
- examples/openai/images_generate.py,sha256=JUXbuS9S2z7_sGVsSV3lyXYMI-17qDFy6K40r19edZE,535
14
- examples/pinecone_example/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
- examples/pinecone_example/basic.py,sha256=JHMUUOjwGUp1BHAjNkr-CEK0ikLdRaL_spZPVGlLG04,954
16
- langtrace_python_sdk/__init__.py,sha256=K2gwjDGD828cb99-LH5JcAebOzQMx8kRk3WEzFpeJ2I,275
17
- langtrace_python_sdk/langtrace.py,sha256=rQ3r_RyIFVN9jLgjIbaDnhxusmw5b9EDIfkT-0HMEc4,3025
18
- langtrace_python_sdk/constants/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
- langtrace_python_sdk/constants/instrumentation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
20
- langtrace_python_sdk/constants/instrumentation/chroma.py,sha256=hiPGYdHS0Yj4Kh3eaYBbuCAl_swqIygu80yFqkOgdak,955
21
- langtrace_python_sdk/constants/instrumentation/common.py,sha256=pmTfUyZ_SnaDF2gzJMvXk0x48VijaKOLSk3SoZc1vrc,494
22
- langtrace_python_sdk/constants/instrumentation/openai.py,sha256=wQ3vb7C3Okt7XJyxDfo9LWwtEggx8s9DzQ1JKPJ7pw8,1050
23
- langtrace_python_sdk/constants/instrumentation/pinecone.py,sha256=8RZpXA1Qs2aQd8L_1qpevloPGMdY-IIr_hjz3jVK3PY,471
24
- langtrace_python_sdk/extensions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
25
- langtrace_python_sdk/extensions/langtrace_exporter.py,sha256=hzSXL1p0I85YoQ1PfJtCsNSzgOib4JiM9HSm_TI8YP8,2301
26
- langtrace_python_sdk/instrumentation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
27
- langtrace_python_sdk/instrumentation/chroma/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
28
- langtrace_python_sdk/instrumentation/chroma/apis.py,sha256=hiPGYdHS0Yj4Kh3eaYBbuCAl_swqIygu80yFqkOgdak,955
29
- langtrace_python_sdk/instrumentation/chroma/instrumentation.py,sha256=T7DW74wGoBh5xTgi8jGhlatrHuelgX8K7gbSFrAAC14,1235
30
- langtrace_python_sdk/instrumentation/chroma/patch.py,sha256=DYkFPoVzEffNJ6Tw6oqDLWYKS_s3xrRj3SEc_xvgkaA,2011
31
- langtrace_python_sdk/instrumentation/langchain/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
32
- langtrace_python_sdk/instrumentation/langchain/instrumentation.py,sha256=pJHyX-28aSDSNTkw_gS7PhxxEC-_S4zrZaTJpYJjhrI,2881
33
- langtrace_python_sdk/instrumentation/langchain/patch.py,sha256=_Kpor3k62rJyfTR9ZgQP3RWf9ivTtVi5hxRDVcaCvM0,3017
34
- langtrace_python_sdk/instrumentation/langchain_community/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
35
- langtrace_python_sdk/instrumentation/langchain_community/instrumentation.py,sha256=Uu4lfr38e02uI3wR1aM1ISeXC2GrA1hLv57X7d9gcQc,4347
36
- langtrace_python_sdk/instrumentation/langchain_community/patch.py,sha256=DiCbeqKqIN680M6zRVDcl_zA0lPjPWEZftvwMr14GrY,2898
37
- langtrace_python_sdk/instrumentation/langchain_core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
38
- langtrace_python_sdk/instrumentation/langchain_core/instrumentation.py,sha256=2RrpKYC6mbBobRk25nrP07fVAf8SvzDad3zASHiDvmU,4771
39
- langtrace_python_sdk/instrumentation/langchain_core/patch.py,sha256=nqYgT1OyNcQa8jA2IDSIEPODJkIib1JPbAl0Y_ZnFAc,7574
40
- langtrace_python_sdk/instrumentation/llamaindex/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
41
- langtrace_python_sdk/instrumentation/llamaindex/instrumentation.py,sha256=q6RJJn-r8x2qgUFgOj7SohyyP_QxXx1uleszFngPjtM,2259
42
- langtrace_python_sdk/instrumentation/llamaindex/patch.py,sha256=2XTuw1ylKgguBayDMypZdQtJmWVdOAofOJfGDaGlcVo,1747
43
- langtrace_python_sdk/instrumentation/openai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
44
- langtrace_python_sdk/instrumentation/openai/instrumentation.py,sha256=mcAPxOY_4j_ArlniWlgyXgwW8UONj36DDGAOh8uxmps,1396
45
- langtrace_python_sdk/instrumentation/openai/patch.py,sha256=Z9fJBkXc56an_z5MWfS5ijBR5raOMhIa-adkwqlob7k,12292
46
- langtrace_python_sdk/instrumentation/pinecone/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
47
- langtrace_python_sdk/instrumentation/pinecone/instrumentation.py,sha256=D_rTLpizH05nP-cL75NZ-wdg0PKj92qj0OufJ0oBhf0,1769
48
- langtrace_python_sdk/instrumentation/pinecone/patch.py,sha256=-ab9Yt4eA6Tg6Wu45rD4LsJuKZ9iKUT3m3tAkfyrKAU,1908
49
- langtrace_python_sdk/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
50
- langtrace_python_sdk/utils/llm.py,sha256=44TlUVv0JPneM6aG1Nozq4fJ9fKWFcPwJ772C87R87E,1607
51
- langtrace_python_sdk/utils/with_root_span.py,sha256=CRie2ljHhnHN8bUGDwBM-F18-c6xyoI_238KP8BEO-U,969
52
- langtrace_python_sdk-1.1.2.dist-info/LICENSE,sha256=VD-pauwiiia-Xi2zgKvalKRIFSJJjqRCQw6aIpK2T9U,33892
53
- langtrace_python_sdk-1.1.2.dist-info/METADATA,sha256=gT_VjTL9vUA97sL0F8mh9HohZRbD0DIcsm4LuCAqAOs,685
54
- langtrace_python_sdk-1.1.2.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
55
- langtrace_python_sdk-1.1.2.dist-info/top_level.txt,sha256=rwET8cHATJvDBti7Dm6pwWIrNAT8DvqCXgRPWdu7_Hs,30
56
- langtrace_python_sdk-1.1.2.dist-info/RECORD,,