openlit 1.33.9__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.
Files changed (77) hide show
  1. openlit/__helpers.py +5 -0
  2. openlit/__init__.py +3 -2
  3. openlit/instrumentation/ag2/ag2.py +3 -3
  4. openlit/instrumentation/ai21/ai21.py +1 -1
  5. openlit/instrumentation/ai21/async_ai21.py +1 -1
  6. openlit/instrumentation/anthropic/anthropic.py +1 -1
  7. openlit/instrumentation/anthropic/async_anthropic.py +1 -1
  8. openlit/instrumentation/astra/astra.py +5 -5
  9. openlit/instrumentation/astra/async_astra.py +5 -5
  10. openlit/instrumentation/azure_ai_inference/async_azure_ai_inference.py +3 -3
  11. openlit/instrumentation/azure_ai_inference/azure_ai_inference.py +3 -3
  12. openlit/instrumentation/chroma/chroma.py +5 -5
  13. openlit/instrumentation/cohere/async_cohere.py +1 -1
  14. openlit/instrumentation/cohere/cohere.py +2 -2
  15. openlit/instrumentation/controlflow/controlflow.py +3 -3
  16. openlit/instrumentation/crawl4ai/async_crawl4ai.py +3 -3
  17. openlit/instrumentation/crawl4ai/crawl4ai.py +3 -3
  18. openlit/instrumentation/crewai/crewai.py +4 -2
  19. openlit/instrumentation/dynamiq/dynamiq.py +3 -3
  20. openlit/instrumentation/elevenlabs/async_elevenlabs.py +1 -2
  21. openlit/instrumentation/elevenlabs/elevenlabs.py +1 -2
  22. openlit/instrumentation/embedchain/embedchain.py +5 -5
  23. openlit/instrumentation/firecrawl/firecrawl.py +3 -3
  24. openlit/instrumentation/gpt4all/__init__.py +2 -2
  25. openlit/instrumentation/gpt4all/gpt4all.py +345 -220
  26. openlit/instrumentation/gpu/__init__.py +5 -5
  27. openlit/instrumentation/groq/__init__.py +2 -2
  28. openlit/instrumentation/groq/async_groq.py +356 -240
  29. openlit/instrumentation/groq/groq.py +356 -240
  30. openlit/instrumentation/haystack/haystack.py +3 -3
  31. openlit/instrumentation/julep/async_julep.py +3 -3
  32. openlit/instrumentation/julep/julep.py +3 -3
  33. openlit/instrumentation/langchain/__init__.py +13 -7
  34. openlit/instrumentation/langchain/async_langchain.py +384 -0
  35. openlit/instrumentation/langchain/langchain.py +98 -490
  36. openlit/instrumentation/letta/letta.py +5 -3
  37. openlit/instrumentation/litellm/__init__.py +4 -5
  38. openlit/instrumentation/litellm/async_litellm.py +316 -245
  39. openlit/instrumentation/litellm/litellm.py +312 -241
  40. openlit/instrumentation/llamaindex/llamaindex.py +3 -3
  41. openlit/instrumentation/mem0/mem0.py +3 -3
  42. openlit/instrumentation/milvus/milvus.py +5 -5
  43. openlit/instrumentation/mistral/__init__.py +6 -6
  44. openlit/instrumentation/mistral/async_mistral.py +421 -248
  45. openlit/instrumentation/mistral/mistral.py +418 -244
  46. openlit/instrumentation/multion/async_multion.py +4 -2
  47. openlit/instrumentation/multion/multion.py +4 -2
  48. openlit/instrumentation/ollama/__init__.py +8 -30
  49. openlit/instrumentation/ollama/async_ollama.py +385 -417
  50. openlit/instrumentation/ollama/ollama.py +384 -417
  51. openlit/instrumentation/openai/async_openai.py +7 -9
  52. openlit/instrumentation/openai/openai.py +7 -9
  53. openlit/instrumentation/phidata/phidata.py +4 -2
  54. openlit/instrumentation/pinecone/pinecone.py +5 -5
  55. openlit/instrumentation/premai/__init__.py +2 -2
  56. openlit/instrumentation/premai/premai.py +262 -213
  57. openlit/instrumentation/qdrant/async_qdrant.py +5 -5
  58. openlit/instrumentation/qdrant/qdrant.py +5 -5
  59. openlit/instrumentation/reka/__init__.py +2 -2
  60. openlit/instrumentation/reka/async_reka.py +90 -52
  61. openlit/instrumentation/reka/reka.py +90 -52
  62. openlit/instrumentation/together/__init__.py +4 -4
  63. openlit/instrumentation/together/async_together.py +278 -236
  64. openlit/instrumentation/together/together.py +278 -236
  65. openlit/instrumentation/transformers/__init__.py +1 -1
  66. openlit/instrumentation/transformers/transformers.py +75 -44
  67. openlit/instrumentation/vertexai/__init__.py +14 -64
  68. openlit/instrumentation/vertexai/async_vertexai.py +329 -986
  69. openlit/instrumentation/vertexai/vertexai.py +329 -986
  70. openlit/instrumentation/vllm/__init__.py +1 -1
  71. openlit/instrumentation/vllm/vllm.py +62 -32
  72. openlit/semcov/__init__.py +3 -3
  73. {openlit-1.33.9.dist-info → openlit-1.33.10.dist-info}/METADATA +1 -1
  74. openlit-1.33.10.dist-info/RECORD +122 -0
  75. openlit-1.33.9.dist-info/RECORD +0 -121
  76. {openlit-1.33.9.dist-info → openlit-1.33.10.dist-info}/LICENSE +0 -0
  77. {openlit-1.33.9.dist-info → openlit-1.33.10.dist-info}/WHEEL +0 -0
@@ -5,7 +5,7 @@ Module for monitoring LlamaIndex applications.
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 handle_exception
10
10
  from openlit.semcov import SemanticConvetion
11
11
 
@@ -63,11 +63,11 @@ def load_data(gen_ai_endpoint, version, environment, application_name,
63
63
  SemanticConvetion.GEN_AI_SYSTEM_LLAMAINDEX)
64
64
  span.set_attribute(SemanticConvetion.GEN_AI_ENDPOINT,
65
65
  gen_ai_endpoint)
66
- span.set_attribute(SemanticConvetion.GEN_AI_ENVIRONMENT,
66
+ span.set_attribute(DEPLOYMENT_ENVIRONMENT,
67
67
  environment)
68
68
  span.set_attribute(SemanticConvetion.GEN_AI_OPERATION,
69
69
  SemanticConvetion.GEN_AI_OPERATION_TYPE_FRAMEWORK)
70
- span.set_attribute(SemanticConvetion.GEN_AI_APPLICATION_NAME,
70
+ span.set_attribute(SERVICE_NAME,
71
71
  application_name)
72
72
  span.set_attribute(SemanticConvetion.GEN_AI_RETRIEVAL_SOURCE,
73
73
  response[0].metadata["file_path"])
@@ -5,7 +5,7 @@ Module for monitoring mem0 applications.
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 handle_exception
10
10
  from openlit.semcov import SemanticConvetion
11
11
 
@@ -63,11 +63,11 @@ def mem0_wrap(gen_ai_endpoint, version, environment, application_name,
63
63
  SemanticConvetion.GEN_AI_SYSTEM_MEM0)
64
64
  span.set_attribute(SemanticConvetion.GEN_AI_ENDPOINT,
65
65
  gen_ai_endpoint)
66
- span.set_attribute(SemanticConvetion.GEN_AI_ENVIRONMENT,
66
+ span.set_attribute(DEPLOYMENT_ENVIRONMENT,
67
67
  environment)
68
68
  span.set_attribute(SemanticConvetion.GEN_AI_OPERATION,
69
69
  SemanticConvetion.GEN_AI_OPERATION_TYPE_FRAMEWORK)
70
- span.set_attribute(SemanticConvetion.GEN_AI_APPLICATION_NAME,
70
+ span.set_attribute(SERVICE_NAME,
71
71
  application_name)
72
72
 
73
73
  if gen_ai_endpoint == "mem0.memory_add":
@@ -5,7 +5,7 @@ Module for monitoring Milvus.
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 handle_exception
10
10
  from openlit.semcov import SemanticConvetion
11
11
 
@@ -73,9 +73,9 @@ def general_wrap(gen_ai_endpoint, version, environment, application_name,
73
73
  span.set_attribute(TELEMETRY_SDK_NAME, "openlit")
74
74
  span.set_attribute(SemanticConvetion.GEN_AI_ENDPOINT,
75
75
  gen_ai_endpoint)
76
- span.set_attribute(SemanticConvetion.GEN_AI_ENVIRONMENT,
76
+ span.set_attribute(DEPLOYMENT_ENVIRONMENT,
77
77
  environment)
78
- span.set_attribute(SemanticConvetion.GEN_AI_APPLICATION_NAME,
78
+ span.set_attribute(SERVICE_NAME,
79
79
  application_name)
80
80
  span.set_attribute(SemanticConvetion.GEN_AI_OPERATION,
81
81
  SemanticConvetion.GEN_AI_OPERATION_TYPE_VECTORDB)
@@ -153,11 +153,11 @@ def general_wrap(gen_ai_endpoint, version, environment, application_name,
153
153
  attributes = {
154
154
  TELEMETRY_SDK_NAME:
155
155
  "openlit",
156
- SemanticConvetion.GEN_AI_APPLICATION_NAME:
156
+ SERVICE_NAME:
157
157
  application_name,
158
158
  SemanticConvetion.DB_SYSTEM:
159
159
  SemanticConvetion.DB_SYSTEM_MILVUS,
160
- SemanticConvetion.GEN_AI_ENVIRONMENT:
160
+ DEPLOYMENT_ENVIRONMENT:
161
161
  environment,
162
162
  SemanticConvetion.GEN_AI_OPERATION:
163
163
  SemanticConvetion.GEN_AI_OPERATION_TYPE_VECTORDB,
@@ -31,7 +31,7 @@ class MistralInstrumentor(BaseInstrumentor):
31
31
  wrap_function_wrapper(
32
32
  "mistralai.chat",
33
33
  "Chat.complete",
34
- chat("mistral.chat", version, environment, application_name,
34
+ chat(version, environment, application_name,
35
35
  tracer, pricing_info, trace_content, metrics, disable_metrics),
36
36
  )
37
37
 
@@ -39,7 +39,7 @@ class MistralInstrumentor(BaseInstrumentor):
39
39
  wrap_function_wrapper(
40
40
  "mistralai.chat",
41
41
  "Chat.stream",
42
- chat_stream("mistral.chat", version, environment, application_name,
42
+ chat_stream(version, environment, application_name,
43
43
  tracer, pricing_info, trace_content, metrics, disable_metrics),
44
44
  )
45
45
 
@@ -47,7 +47,7 @@ class MistralInstrumentor(BaseInstrumentor):
47
47
  wrap_function_wrapper(
48
48
  "mistralai.embeddings",
49
49
  "Embeddings.create",
50
- embeddings("mistral.embeddings", version, environment, application_name,
50
+ embeddings(version, environment, application_name,
51
51
  tracer, pricing_info, trace_content, metrics, disable_metrics),
52
52
  )
53
53
 
@@ -55,7 +55,7 @@ class MistralInstrumentor(BaseInstrumentor):
55
55
  wrap_function_wrapper(
56
56
  "mistralai.chat",
57
57
  "Chat.complete_async",
58
- async_chat("mistral.chat", version, environment, application_name,
58
+ async_chat(version, environment, application_name,
59
59
  tracer, pricing_info, trace_content, metrics, disable_metrics),
60
60
  )
61
61
 
@@ -63,7 +63,7 @@ class MistralInstrumentor(BaseInstrumentor):
63
63
  wrap_function_wrapper(
64
64
  "mistralai.chat",
65
65
  "Chat.stream_async",
66
- async_chat_stream("mistral.chat", version, environment, application_name,
66
+ async_chat_stream(version, environment, application_name,
67
67
  tracer, pricing_info, trace_content, metrics, disable_metrics),
68
68
  )
69
69
 
@@ -71,7 +71,7 @@ class MistralInstrumentor(BaseInstrumentor):
71
71
  wrap_function_wrapper(
72
72
  "mistralai.embeddings",
73
73
  "Embeddings.create_async",
74
- async_embeddings("mistral.embeddings", version, environment, application_name,
74
+ async_embeddings(version, environment, application_name,
75
75
  tracer, pricing_info, trace_content, metrics, disable_metrics),
76
76
  )
77
77