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.
Files changed (92) hide show
  1. openlit/__helpers.py +88 -0
  2. openlit/__init__.py +4 -3
  3. openlit/instrumentation/ag2/ag2.py +5 -5
  4. openlit/instrumentation/ai21/__init__.py +4 -4
  5. openlit/instrumentation/ai21/ai21.py +370 -319
  6. openlit/instrumentation/ai21/async_ai21.py +371 -319
  7. openlit/instrumentation/anthropic/__init__.py +4 -4
  8. openlit/instrumentation/anthropic/anthropic.py +321 -189
  9. openlit/instrumentation/anthropic/async_anthropic.py +323 -190
  10. openlit/instrumentation/assemblyai/__init__.py +1 -1
  11. openlit/instrumentation/assemblyai/assemblyai.py +59 -43
  12. openlit/instrumentation/astra/astra.py +9 -9
  13. openlit/instrumentation/astra/async_astra.py +9 -9
  14. openlit/instrumentation/azure_ai_inference/__init__.py +4 -4
  15. openlit/instrumentation/azure_ai_inference/async_azure_ai_inference.py +406 -252
  16. openlit/instrumentation/azure_ai_inference/azure_ai_inference.py +406 -252
  17. openlit/instrumentation/bedrock/__init__.py +1 -1
  18. openlit/instrumentation/bedrock/bedrock.py +115 -58
  19. openlit/instrumentation/chroma/chroma.py +9 -9
  20. openlit/instrumentation/cohere/__init__.py +33 -10
  21. openlit/instrumentation/cohere/async_cohere.py +610 -0
  22. openlit/instrumentation/cohere/cohere.py +410 -219
  23. openlit/instrumentation/controlflow/controlflow.py +5 -5
  24. openlit/instrumentation/crawl4ai/async_crawl4ai.py +5 -5
  25. openlit/instrumentation/crawl4ai/crawl4ai.py +5 -5
  26. openlit/instrumentation/crewai/crewai.py +6 -4
  27. openlit/instrumentation/dynamiq/dynamiq.py +5 -5
  28. openlit/instrumentation/elevenlabs/async_elevenlabs.py +71 -46
  29. openlit/instrumentation/elevenlabs/elevenlabs.py +71 -51
  30. openlit/instrumentation/embedchain/embedchain.py +9 -9
  31. openlit/instrumentation/firecrawl/firecrawl.py +5 -5
  32. openlit/instrumentation/google_ai_studio/__init__.py +9 -9
  33. openlit/instrumentation/google_ai_studio/async_google_ai_studio.py +183 -219
  34. openlit/instrumentation/google_ai_studio/google_ai_studio.py +183 -220
  35. openlit/instrumentation/gpt4all/__init__.py +2 -2
  36. openlit/instrumentation/gpt4all/gpt4all.py +345 -220
  37. openlit/instrumentation/gpu/__init__.py +5 -5
  38. openlit/instrumentation/groq/__init__.py +2 -2
  39. openlit/instrumentation/groq/async_groq.py +356 -240
  40. openlit/instrumentation/groq/groq.py +356 -240
  41. openlit/instrumentation/haystack/haystack.py +5 -5
  42. openlit/instrumentation/julep/async_julep.py +5 -5
  43. openlit/instrumentation/julep/julep.py +5 -5
  44. openlit/instrumentation/langchain/__init__.py +13 -7
  45. openlit/instrumentation/langchain/async_langchain.py +384 -0
  46. openlit/instrumentation/langchain/langchain.py +105 -492
  47. openlit/instrumentation/letta/letta.py +11 -9
  48. openlit/instrumentation/litellm/__init__.py +4 -5
  49. openlit/instrumentation/litellm/async_litellm.py +318 -247
  50. openlit/instrumentation/litellm/litellm.py +314 -243
  51. openlit/instrumentation/llamaindex/llamaindex.py +5 -5
  52. openlit/instrumentation/mem0/mem0.py +5 -5
  53. openlit/instrumentation/milvus/milvus.py +9 -9
  54. openlit/instrumentation/mistral/__init__.py +6 -6
  55. openlit/instrumentation/mistral/async_mistral.py +423 -250
  56. openlit/instrumentation/mistral/mistral.py +420 -246
  57. openlit/instrumentation/multion/async_multion.py +6 -4
  58. openlit/instrumentation/multion/multion.py +6 -4
  59. openlit/instrumentation/ollama/__init__.py +8 -30
  60. openlit/instrumentation/ollama/async_ollama.py +385 -417
  61. openlit/instrumentation/ollama/ollama.py +384 -417
  62. openlit/instrumentation/openai/__init__.py +11 -230
  63. openlit/instrumentation/openai/async_openai.py +433 -410
  64. openlit/instrumentation/openai/openai.py +414 -394
  65. openlit/instrumentation/phidata/phidata.py +6 -4
  66. openlit/instrumentation/pinecone/pinecone.py +9 -9
  67. openlit/instrumentation/premai/__init__.py +2 -2
  68. openlit/instrumentation/premai/premai.py +262 -213
  69. openlit/instrumentation/qdrant/async_qdrant.py +9 -9
  70. openlit/instrumentation/qdrant/qdrant.py +9 -9
  71. openlit/instrumentation/reka/__init__.py +2 -2
  72. openlit/instrumentation/reka/async_reka.py +90 -52
  73. openlit/instrumentation/reka/reka.py +90 -52
  74. openlit/instrumentation/together/__init__.py +4 -4
  75. openlit/instrumentation/together/async_together.py +278 -236
  76. openlit/instrumentation/together/together.py +278 -236
  77. openlit/instrumentation/transformers/__init__.py +1 -1
  78. openlit/instrumentation/transformers/transformers.py +76 -45
  79. openlit/instrumentation/vertexai/__init__.py +14 -64
  80. openlit/instrumentation/vertexai/async_vertexai.py +330 -987
  81. openlit/instrumentation/vertexai/vertexai.py +330 -987
  82. openlit/instrumentation/vllm/__init__.py +1 -1
  83. openlit/instrumentation/vllm/vllm.py +66 -36
  84. openlit/otel/metrics.py +98 -7
  85. openlit/semcov/__init__.py +113 -80
  86. {openlit-1.33.8.dist-info → openlit-1.33.10.dist-info}/METADATA +1 -1
  87. openlit-1.33.10.dist-info/RECORD +122 -0
  88. {openlit-1.33.8.dist-info → openlit-1.33.10.dist-info}/WHEEL +1 -1
  89. openlit/instrumentation/openai/async_azure_openai.py +0 -900
  90. openlit/instrumentation/openai/azure_openai.py +0 -898
  91. openlit-1.33.8.dist-info/RECORD +0 -122
  92. {openlit-1.33.8.dist-info → openlit-1.33.10.dist-info}/LICENSE +0 -0
@@ -5,7 +5,7 @@ Module for monitoring Phidata 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 phidata_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_PHIDATA)
61
- span.set_attribute(SemanticConvetion.GEN_AI_TYPE,
62
- SemanticConvetion.GEN_AI_TYPE_AGENT)
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(SemanticConvetion.GEN_AI_APPLICATION_NAME,
65
+ span.set_attribute(SERVICE_NAME,
66
66
  application_name)
67
+ span.set_attribute(DEPLOYMENT_ENVIRONMENT,
68
+ environment)
67
69
  span.set_attribute(SemanticConvetion.GEN_AI_AGENT_ID,
68
70
  getattr(instance, 'agent_id', '') or '')
69
71
  span.set_attribute(SemanticConvetion.GEN_AI_AGENT_ROLE,
@@ -5,7 +5,7 @@ Module for monitoring Pinecone.
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
 
@@ -72,12 +72,12 @@ def general_wrap(gen_ai_endpoint, version, environment, application_name,
72
72
  span.set_attribute(TELEMETRY_SDK_NAME, "openlit")
73
73
  span.set_attribute(SemanticConvetion.GEN_AI_ENDPOINT,
74
74
  gen_ai_endpoint)
75
- span.set_attribute(SemanticConvetion.GEN_AI_ENVIRONMENT,
75
+ span.set_attribute(DEPLOYMENT_ENVIRONMENT,
76
76
  environment)
77
- span.set_attribute(SemanticConvetion.GEN_AI_APPLICATION_NAME,
77
+ span.set_attribute(SERVICE_NAME,
78
78
  application_name)
79
- span.set_attribute(SemanticConvetion.GEN_AI_TYPE,
80
- SemanticConvetion.GEN_AI_TYPE_VECTORDB)
79
+ span.set_attribute(SemanticConvetion.GEN_AI_OPERATION,
80
+ SemanticConvetion.GEN_AI_OPERATION_TYPE_VECTORDB)
81
81
  span.set_attribute(SemanticConvetion.DB_SYSTEM,
82
82
  SemanticConvetion.DB_SYSTEM_PINECONE)
83
83
 
@@ -146,14 +146,14 @@ def general_wrap(gen_ai_endpoint, version, environment, application_name,
146
146
  attributes = {
147
147
  TELEMETRY_SDK_NAME:
148
148
  "openlit",
149
- SemanticConvetion.GEN_AI_APPLICATION_NAME:
149
+ SERVICE_NAME:
150
150
  application_name,
151
151
  SemanticConvetion.DB_SYSTEM:
152
152
  SemanticConvetion.DB_SYSTEM_PINECONE,
153
- SemanticConvetion.GEN_AI_ENVIRONMENT:
153
+ DEPLOYMENT_ENVIRONMENT:
154
154
  environment,
155
- SemanticConvetion.GEN_AI_TYPE:
156
- SemanticConvetion.GEN_AI_TYPE_VECTORDB,
155
+ SemanticConvetion.GEN_AI_OPERATION:
156
+ SemanticConvetion.GEN_AI_OPERATION_TYPE_VECTORDB,
157
157
  SemanticConvetion.DB_OPERATION:
158
158
  db_operation
159
159
  }
@@ -34,7 +34,7 @@ class PremAIInstrumentor(BaseInstrumentor):
34
34
  wrap_function_wrapper(
35
35
  "premai.api",
36
36
  "ChatCompletionsModule.create",
37
- chat("premai.chat.completions", version, environment, application_name,
37
+ chat(version, environment, application_name,
38
38
  tracer, pricing_info, trace_content, metrics, disable_metrics),
39
39
  )
40
40
 
@@ -42,7 +42,7 @@ class PremAIInstrumentor(BaseInstrumentor):
42
42
  wrap_function_wrapper(
43
43
  "premai.api",
44
44
  "EmbeddingsModule.create",
45
- embedding("premai.embeddings", version, environment, application_name,
45
+ embedding(version, environment, application_name,
46
46
  tracer, pricing_info, trace_content, metrics, disable_metrics),
47
47
  )
48
48