openlit 1.33.8__py3-none-any.whl → 1.33.10__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.
- openlit/__helpers.py +88 -0
- openlit/__init__.py +4 -3
- openlit/instrumentation/ag2/ag2.py +5 -5
- openlit/instrumentation/ai21/__init__.py +4 -4
- openlit/instrumentation/ai21/ai21.py +370 -319
- openlit/instrumentation/ai21/async_ai21.py +371 -319
- openlit/instrumentation/anthropic/__init__.py +4 -4
- openlit/instrumentation/anthropic/anthropic.py +321 -189
- openlit/instrumentation/anthropic/async_anthropic.py +323 -190
- openlit/instrumentation/assemblyai/__init__.py +1 -1
- openlit/instrumentation/assemblyai/assemblyai.py +59 -43
- openlit/instrumentation/astra/astra.py +9 -9
- openlit/instrumentation/astra/async_astra.py +9 -9
- openlit/instrumentation/azure_ai_inference/__init__.py +4 -4
- openlit/instrumentation/azure_ai_inference/async_azure_ai_inference.py +406 -252
- openlit/instrumentation/azure_ai_inference/azure_ai_inference.py +406 -252
- openlit/instrumentation/bedrock/__init__.py +1 -1
- openlit/instrumentation/bedrock/bedrock.py +115 -58
- openlit/instrumentation/chroma/chroma.py +9 -9
- openlit/instrumentation/cohere/__init__.py +33 -10
- openlit/instrumentation/cohere/async_cohere.py +610 -0
- openlit/instrumentation/cohere/cohere.py +410 -219
- openlit/instrumentation/controlflow/controlflow.py +5 -5
- openlit/instrumentation/crawl4ai/async_crawl4ai.py +5 -5
- openlit/instrumentation/crawl4ai/crawl4ai.py +5 -5
- openlit/instrumentation/crewai/crewai.py +6 -4
- openlit/instrumentation/dynamiq/dynamiq.py +5 -5
- openlit/instrumentation/elevenlabs/async_elevenlabs.py +71 -46
- openlit/instrumentation/elevenlabs/elevenlabs.py +71 -51
- openlit/instrumentation/embedchain/embedchain.py +9 -9
- openlit/instrumentation/firecrawl/firecrawl.py +5 -5
- openlit/instrumentation/google_ai_studio/__init__.py +9 -9
- openlit/instrumentation/google_ai_studio/async_google_ai_studio.py +183 -219
- openlit/instrumentation/google_ai_studio/google_ai_studio.py +183 -220
- openlit/instrumentation/gpt4all/__init__.py +2 -2
- openlit/instrumentation/gpt4all/gpt4all.py +345 -220
- openlit/instrumentation/gpu/__init__.py +5 -5
- openlit/instrumentation/groq/__init__.py +2 -2
- openlit/instrumentation/groq/async_groq.py +356 -240
- openlit/instrumentation/groq/groq.py +356 -240
- openlit/instrumentation/haystack/haystack.py +5 -5
- openlit/instrumentation/julep/async_julep.py +5 -5
- openlit/instrumentation/julep/julep.py +5 -5
- openlit/instrumentation/langchain/__init__.py +13 -7
- openlit/instrumentation/langchain/async_langchain.py +384 -0
- openlit/instrumentation/langchain/langchain.py +105 -492
- openlit/instrumentation/letta/letta.py +11 -9
- openlit/instrumentation/litellm/__init__.py +4 -5
- openlit/instrumentation/litellm/async_litellm.py +318 -247
- openlit/instrumentation/litellm/litellm.py +314 -243
- openlit/instrumentation/llamaindex/llamaindex.py +5 -5
- openlit/instrumentation/mem0/mem0.py +5 -5
- openlit/instrumentation/milvus/milvus.py +9 -9
- openlit/instrumentation/mistral/__init__.py +6 -6
- openlit/instrumentation/mistral/async_mistral.py +423 -250
- openlit/instrumentation/mistral/mistral.py +420 -246
- openlit/instrumentation/multion/async_multion.py +6 -4
- openlit/instrumentation/multion/multion.py +6 -4
- openlit/instrumentation/ollama/__init__.py +8 -30
- openlit/instrumentation/ollama/async_ollama.py +385 -417
- openlit/instrumentation/ollama/ollama.py +384 -417
- openlit/instrumentation/openai/__init__.py +11 -230
- openlit/instrumentation/openai/async_openai.py +433 -410
- openlit/instrumentation/openai/openai.py +414 -394
- openlit/instrumentation/phidata/phidata.py +6 -4
- openlit/instrumentation/pinecone/pinecone.py +9 -9
- openlit/instrumentation/premai/__init__.py +2 -2
- openlit/instrumentation/premai/premai.py +262 -213
- openlit/instrumentation/qdrant/async_qdrant.py +9 -9
- openlit/instrumentation/qdrant/qdrant.py +9 -9
- openlit/instrumentation/reka/__init__.py +2 -2
- openlit/instrumentation/reka/async_reka.py +90 -52
- openlit/instrumentation/reka/reka.py +90 -52
- openlit/instrumentation/together/__init__.py +4 -4
- openlit/instrumentation/together/async_together.py +278 -236
- openlit/instrumentation/together/together.py +278 -236
- openlit/instrumentation/transformers/__init__.py +1 -1
- openlit/instrumentation/transformers/transformers.py +76 -45
- openlit/instrumentation/vertexai/__init__.py +14 -64
- openlit/instrumentation/vertexai/async_vertexai.py +330 -987
- openlit/instrumentation/vertexai/vertexai.py +330 -987
- openlit/instrumentation/vllm/__init__.py +1 -1
- openlit/instrumentation/vllm/vllm.py +66 -36
- openlit/otel/metrics.py +98 -7
- openlit/semcov/__init__.py +113 -80
- {openlit-1.33.8.dist-info → openlit-1.33.10.dist-info}/METADATA +1 -1
- openlit-1.33.10.dist-info/RECORD +122 -0
- {openlit-1.33.8.dist-info → openlit-1.33.10.dist-info}/WHEEL +1 -1
- openlit/instrumentation/openai/async_azure_openai.py +0 -900
- openlit/instrumentation/openai/azure_openai.py +0 -898
- openlit-1.33.8.dist-info/RECORD +0 -122
- {openlit-1.33.8.dist-info → openlit-1.33.10.dist-info}/LICENSE +0 -0
@@ -5,7 +5,7 @@ Module for monitoring multion calls.
|
|
5
5
|
|
6
6
|
import logging
|
7
7
|
from opentelemetry.trace import SpanKind, Status, StatusCode
|
8
|
-
from opentelemetry.sdk.resources import TELEMETRY_SDK_NAME
|
8
|
+
from opentelemetry.sdk.resources import SERVICE_NAME, TELEMETRY_SDK_NAME, DEPLOYMENT_ENVIRONMENT
|
9
9
|
from openlit.__helpers import (
|
10
10
|
handle_exception,
|
11
11
|
)
|
@@ -58,12 +58,14 @@ def async_multion_wrap(gen_ai_endpoint, version, environment, application_name,
|
|
58
58
|
span.set_attribute(TELEMETRY_SDK_NAME, "openlit")
|
59
59
|
span.set_attribute(SemanticConvetion.GEN_AI_SYSTEM,
|
60
60
|
SemanticConvetion.GEN_AI_SYSTEM_MULTION)
|
61
|
-
span.set_attribute(SemanticConvetion.
|
62
|
-
SemanticConvetion.
|
61
|
+
span.set_attribute(SemanticConvetion.GEN_AI_OPERATION,
|
62
|
+
SemanticConvetion.GEN_AI_OPERATION_TYPE_AGENT)
|
63
63
|
span.set_attribute(SemanticConvetion.GEN_AI_ENDPOINT,
|
64
64
|
gen_ai_endpoint)
|
65
|
-
span.set_attribute(
|
65
|
+
span.set_attribute(SERVICE_NAME,
|
66
66
|
application_name)
|
67
|
+
span.set_attribute(DEPLOYMENT_ENVIRONMENT,
|
68
|
+
environment)
|
67
69
|
|
68
70
|
if gen_ai_endpoint == "multion.browse":
|
69
71
|
span.set_attribute(SemanticConvetion.GEN_AI_AGENT_BROWSE_URL,
|
@@ -5,7 +5,7 @@ Module for monitoring multion calls.
|
|
5
5
|
|
6
6
|
import logging
|
7
7
|
from opentelemetry.trace import SpanKind, Status, StatusCode
|
8
|
-
from opentelemetry.sdk.resources import TELEMETRY_SDK_NAME
|
8
|
+
from opentelemetry.sdk.resources import SERVICE_NAME, TELEMETRY_SDK_NAME, DEPLOYMENT_ENVIRONMENT
|
9
9
|
from openlit.__helpers import (
|
10
10
|
handle_exception,
|
11
11
|
)
|
@@ -58,12 +58,14 @@ def multion_wrap(gen_ai_endpoint, version, environment, application_name,
|
|
58
58
|
span.set_attribute(TELEMETRY_SDK_NAME, "openlit")
|
59
59
|
span.set_attribute(SemanticConvetion.GEN_AI_SYSTEM,
|
60
60
|
SemanticConvetion.GEN_AI_SYSTEM_MULTION)
|
61
|
-
span.set_attribute(SemanticConvetion.
|
62
|
-
SemanticConvetion.
|
61
|
+
span.set_attribute(SemanticConvetion.GEN_AI_OPERATION,
|
62
|
+
SemanticConvetion.GEN_AI_OPERATION_TYPE_AGENT)
|
63
63
|
span.set_attribute(SemanticConvetion.GEN_AI_ENDPOINT,
|
64
64
|
gen_ai_endpoint)
|
65
|
-
span.set_attribute(
|
65
|
+
span.set_attribute(SERVICE_NAME,
|
66
66
|
application_name)
|
67
|
+
span.set_attribute(DEPLOYMENT_ENVIRONMENT,
|
68
|
+
environment)
|
67
69
|
|
68
70
|
if gen_ai_endpoint == "multion.browse":
|
69
71
|
span.set_attribute(SemanticConvetion.GEN_AI_AGENT_BROWSE_URL,
|
@@ -7,10 +7,10 @@ from opentelemetry.instrumentation.instrumentor import BaseInstrumentor
|
|
7
7
|
from wrapt import wrap_function_wrapper
|
8
8
|
|
9
9
|
from openlit.instrumentation.ollama.ollama import (
|
10
|
-
chat, embeddings
|
10
|
+
chat, embeddings
|
11
11
|
)
|
12
12
|
from openlit.instrumentation.ollama.async_ollama import (
|
13
|
-
async_chat, async_embeddings
|
13
|
+
async_chat, async_embeddings
|
14
14
|
)
|
15
15
|
|
16
16
|
_instruments = ("ollama >= 0.2.0",)
|
@@ -37,13 +37,13 @@ class OllamaInstrumentor(BaseInstrumentor):
|
|
37
37
|
wrap_function_wrapper(
|
38
38
|
"ollama",
|
39
39
|
"chat",
|
40
|
-
chat(
|
40
|
+
chat(version, environment, application_name,
|
41
41
|
tracer, pricing_info, trace_content, metrics, disable_metrics),
|
42
42
|
)
|
43
43
|
wrap_function_wrapper(
|
44
44
|
"ollama",
|
45
45
|
"Client.chat",
|
46
|
-
chat(
|
46
|
+
chat(version, environment, application_name,
|
47
47
|
tracer, pricing_info, trace_content, metrics, disable_metrics),
|
48
48
|
)
|
49
49
|
|
@@ -51,27 +51,13 @@ class OllamaInstrumentor(BaseInstrumentor):
|
|
51
51
|
wrap_function_wrapper(
|
52
52
|
"ollama",
|
53
53
|
"embeddings",
|
54
|
-
embeddings(
|
54
|
+
embeddings(version, environment, application_name,
|
55
55
|
tracer, pricing_info, trace_content, metrics, disable_metrics),
|
56
56
|
)
|
57
57
|
wrap_function_wrapper(
|
58
58
|
"ollama",
|
59
59
|
"Client.embeddings",
|
60
|
-
embeddings(
|
61
|
-
tracer, pricing_info, trace_content, metrics, disable_metrics),
|
62
|
-
)
|
63
|
-
|
64
|
-
# sync generate
|
65
|
-
wrap_function_wrapper(
|
66
|
-
"ollama",
|
67
|
-
"generate",
|
68
|
-
generate("ollama.generate", version, environment, application_name,
|
69
|
-
tracer, pricing_info, trace_content, metrics, disable_metrics),
|
70
|
-
)
|
71
|
-
wrap_function_wrapper(
|
72
|
-
"ollama",
|
73
|
-
"Client.generate",
|
74
|
-
generate("ollama.generate", version, environment, application_name,
|
60
|
+
embeddings(version, environment, application_name,
|
75
61
|
tracer, pricing_info, trace_content, metrics, disable_metrics),
|
76
62
|
)
|
77
63
|
|
@@ -79,7 +65,7 @@ class OllamaInstrumentor(BaseInstrumentor):
|
|
79
65
|
wrap_function_wrapper(
|
80
66
|
"ollama",
|
81
67
|
"AsyncClient.chat",
|
82
|
-
async_chat(
|
68
|
+
async_chat(version, environment, application_name,
|
83
69
|
tracer, pricing_info, trace_content, metrics, disable_metrics),
|
84
70
|
)
|
85
71
|
|
@@ -87,15 +73,7 @@ class OllamaInstrumentor(BaseInstrumentor):
|
|
87
73
|
wrap_function_wrapper(
|
88
74
|
"ollama",
|
89
75
|
"AsyncClient.embeddings",
|
90
|
-
async_embeddings(
|
91
|
-
tracer, pricing_info, trace_content, metrics, disable_metrics),
|
92
|
-
)
|
93
|
-
|
94
|
-
# aync generate
|
95
|
-
wrap_function_wrapper(
|
96
|
-
"ollama",
|
97
|
-
"AsyncClient.generate",
|
98
|
-
async_generate("ollama.generate", version, environment, application_name,
|
76
|
+
async_embeddings(version, environment, application_name,
|
99
77
|
tracer, pricing_info, trace_content, metrics, disable_metrics),
|
100
78
|
)
|
101
79
|
|