openlit 1.33.8__py3-none-any.whl → 1.33.9__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 (78) hide show
  1. openlit/__helpers.py +83 -0
  2. openlit/__init__.py +1 -1
  3. openlit/instrumentation/ag2/ag2.py +2 -2
  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 +4 -4
  13. openlit/instrumentation/astra/async_astra.py +4 -4
  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 +4 -4
  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 +2 -2
  24. openlit/instrumentation/crawl4ai/async_crawl4ai.py +2 -2
  25. openlit/instrumentation/crawl4ai/crawl4ai.py +2 -2
  26. openlit/instrumentation/crewai/crewai.py +2 -2
  27. openlit/instrumentation/dynamiq/dynamiq.py +2 -2
  28. openlit/instrumentation/elevenlabs/async_elevenlabs.py +73 -47
  29. openlit/instrumentation/elevenlabs/elevenlabs.py +73 -52
  30. openlit/instrumentation/embedchain/embedchain.py +4 -4
  31. openlit/instrumentation/firecrawl/firecrawl.py +2 -2
  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/gpt4all.py +17 -17
  36. openlit/instrumentation/groq/async_groq.py +14 -14
  37. openlit/instrumentation/groq/groq.py +14 -14
  38. openlit/instrumentation/haystack/haystack.py +2 -2
  39. openlit/instrumentation/julep/async_julep.py +2 -2
  40. openlit/instrumentation/julep/julep.py +2 -2
  41. openlit/instrumentation/langchain/langchain.py +36 -31
  42. openlit/instrumentation/letta/letta.py +6 -6
  43. openlit/instrumentation/litellm/async_litellm.py +20 -20
  44. openlit/instrumentation/litellm/litellm.py +20 -20
  45. openlit/instrumentation/llamaindex/llamaindex.py +2 -2
  46. openlit/instrumentation/mem0/mem0.py +2 -2
  47. openlit/instrumentation/milvus/milvus.py +4 -4
  48. openlit/instrumentation/mistral/async_mistral.py +18 -18
  49. openlit/instrumentation/mistral/mistral.py +18 -18
  50. openlit/instrumentation/multion/async_multion.py +2 -2
  51. openlit/instrumentation/multion/multion.py +2 -2
  52. openlit/instrumentation/ollama/async_ollama.py +29 -29
  53. openlit/instrumentation/ollama/ollama.py +29 -29
  54. openlit/instrumentation/openai/__init__.py +11 -230
  55. openlit/instrumentation/openai/async_openai.py +434 -409
  56. openlit/instrumentation/openai/openai.py +415 -393
  57. openlit/instrumentation/phidata/phidata.py +2 -2
  58. openlit/instrumentation/pinecone/pinecone.py +4 -4
  59. openlit/instrumentation/premai/premai.py +20 -20
  60. openlit/instrumentation/qdrant/async_qdrant.py +4 -4
  61. openlit/instrumentation/qdrant/qdrant.py +4 -4
  62. openlit/instrumentation/reka/async_reka.py +6 -6
  63. openlit/instrumentation/reka/reka.py +6 -6
  64. openlit/instrumentation/together/async_together.py +18 -18
  65. openlit/instrumentation/together/together.py +18 -18
  66. openlit/instrumentation/transformers/transformers.py +6 -6
  67. openlit/instrumentation/vertexai/async_vertexai.py +53 -53
  68. openlit/instrumentation/vertexai/vertexai.py +53 -53
  69. openlit/instrumentation/vllm/vllm.py +6 -6
  70. openlit/otel/metrics.py +98 -7
  71. openlit/semcov/__init__.py +113 -80
  72. {openlit-1.33.8.dist-info → openlit-1.33.9.dist-info}/METADATA +1 -1
  73. openlit-1.33.9.dist-info/RECORD +121 -0
  74. {openlit-1.33.8.dist-info → openlit-1.33.9.dist-info}/WHEEL +1 -1
  75. openlit/instrumentation/openai/async_azure_openai.py +0 -900
  76. openlit/instrumentation/openai/azure_openai.py +0 -898
  77. openlit-1.33.8.dist-info/RECORD +0 -122
  78. {openlit-1.33.8.dist-info → openlit-1.33.9.dist-info}/LICENSE +0 -0
@@ -104,8 +104,8 @@ def chat(gen_ai_endpoint, version, environment, application_name,
104
104
  span.set_attribute(TELEMETRY_SDK_NAME, "openlit")
105
105
  span.set_attribute(SemanticConvetion.GEN_AI_SYSTEM,
106
106
  SemanticConvetion.GEN_AI_SYSTEM_GROQ)
107
- span.set_attribute(SemanticConvetion.GEN_AI_TYPE,
108
- SemanticConvetion.GEN_AI_TYPE_CHAT)
107
+ span.set_attribute(SemanticConvetion.GEN_AI_OPERATION,
108
+ SemanticConvetion.GEN_AI_OPERATION_TYPE_CHAT)
109
109
  span.set_attribute(SemanticConvetion.GEN_AI_ENDPOINT,
110
110
  gen_ai_endpoint)
111
111
  span.set_attribute(SemanticConvetion.GEN_AI_RESPONSE_ID,
@@ -132,9 +132,9 @@ def chat(gen_ai_endpoint, version, environment, application_name,
132
132
  kwargs.get("seed", ""))
133
133
  span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_IS_STREAM,
134
134
  True)
135
- span.set_attribute(SemanticConvetion.GEN_AI_USAGE_PROMPT_TOKENS,
135
+ span.set_attribute(SemanticConvetion.GEN_AI_USAGE_INPUT_TOKENS,
136
136
  prompt_tokens)
137
- span.set_attribute(SemanticConvetion.GEN_AI_USAGE_COMPLETION_TOKENS,
137
+ span.set_attribute(SemanticConvetion.GEN_AI_USAGE_OUTPUT_TOKENS,
138
138
  completion_tokens)
139
139
  span.set_attribute(SemanticConvetion.GEN_AI_USAGE_TOTAL_TOKENS,
140
140
  prompt_tokens + completion_tokens)
@@ -166,8 +166,8 @@ def chat(gen_ai_endpoint, version, environment, application_name,
166
166
  SemanticConvetion.GEN_AI_SYSTEM_GROQ,
167
167
  SemanticConvetion.GEN_AI_ENVIRONMENT:
168
168
  environment,
169
- SemanticConvetion.GEN_AI_TYPE:
170
- SemanticConvetion.GEN_AI_TYPE_CHAT,
169
+ SemanticConvetion.GEN_AI_OPERATION:
170
+ SemanticConvetion.GEN_AI_OPERATION_TYPE_CHAT,
171
171
  SemanticConvetion.GEN_AI_REQUEST_MODEL:
172
172
  kwargs.get("model", "gpt-3.5-turbo")
173
173
  }
@@ -216,8 +216,8 @@ def chat(gen_ai_endpoint, version, environment, application_name,
216
216
  span.set_attribute(TELEMETRY_SDK_NAME, "openlit")
217
217
  span.set_attribute(SemanticConvetion.GEN_AI_SYSTEM,
218
218
  SemanticConvetion.GEN_AI_SYSTEM_GROQ)
219
- span.set_attribute(SemanticConvetion.GEN_AI_TYPE,
220
- SemanticConvetion.GEN_AI_TYPE_CHAT)
219
+ span.set_attribute(SemanticConvetion.GEN_AI_OPERATION,
220
+ SemanticConvetion.GEN_AI_OPERATION_TYPE_CHAT)
221
221
  span.set_attribute(SemanticConvetion.GEN_AI_ENDPOINT,
222
222
  gen_ai_endpoint)
223
223
  span.set_attribute(SemanticConvetion.GEN_AI_RESPONSE_ID,
@@ -259,9 +259,9 @@ def chat(gen_ai_endpoint, version, environment, application_name,
259
259
  pricing_info, response.usage.prompt_tokens,
260
260
  response.usage.completion_tokens)
261
261
 
262
- span.set_attribute(SemanticConvetion.GEN_AI_USAGE_PROMPT_TOKENS,
262
+ span.set_attribute(SemanticConvetion.GEN_AI_USAGE_INPUT_TOKENS,
263
263
  response.usage.prompt_tokens)
264
- span.set_attribute(SemanticConvetion.GEN_AI_USAGE_COMPLETION_TOKENS,
264
+ span.set_attribute(SemanticConvetion.GEN_AI_USAGE_OUTPUT_TOKENS,
265
265
  response.usage.completion_tokens)
266
266
  span.set_attribute(SemanticConvetion.GEN_AI_USAGE_TOTAL_TOKENS,
267
267
  response.usage.total_tokens)
@@ -305,9 +305,9 @@ def chat(gen_ai_endpoint, version, environment, application_name,
305
305
 
306
306
  span.set_attribute(SemanticConvetion.GEN_AI_CONTENT_COMPLETION,
307
307
  "Function called with tools")
308
- span.set_attribute(SemanticConvetion.GEN_AI_USAGE_PROMPT_TOKENS,
308
+ span.set_attribute(SemanticConvetion.GEN_AI_USAGE_INPUT_TOKENS,
309
309
  response.usage.prompt_tokens)
310
- span.set_attribute(SemanticConvetion.GEN_AI_USAGE_COMPLETION_TOKENS,
310
+ span.set_attribute(SemanticConvetion.GEN_AI_USAGE_OUTPUT_TOKENS,
311
311
  response.usage.completion_tokens)
312
312
  span.set_attribute(SemanticConvetion.GEN_AI_USAGE_TOTAL_TOKENS,
313
313
  response.usage.total_tokens)
@@ -326,8 +326,8 @@ def chat(gen_ai_endpoint, version, environment, application_name,
326
326
  SemanticConvetion.GEN_AI_SYSTEM_GROQ,
327
327
  SemanticConvetion.GEN_AI_ENVIRONMENT:
328
328
  environment,
329
- SemanticConvetion.GEN_AI_TYPE:
330
- SemanticConvetion.GEN_AI_TYPE_CHAT,
329
+ SemanticConvetion.GEN_AI_OPERATION:
330
+ SemanticConvetion.GEN_AI_OPERATION_TYPE_CHAT,
331
331
  SemanticConvetion.GEN_AI_REQUEST_MODEL:
332
332
  kwargs.get("model", "gpt-3.5-turbo")
333
333
  }
@@ -65,8 +65,8 @@ def join_data(gen_ai_endpoint, version, environment, application_name,
65
65
  gen_ai_endpoint)
66
66
  span.set_attribute(SemanticConvetion.GEN_AI_ENVIRONMENT,
67
67
  environment)
68
- span.set_attribute(SemanticConvetion.GEN_AI_TYPE,
69
- SemanticConvetion.GEN_AI_TYPE_FRAMEWORK)
68
+ span.set_attribute(SemanticConvetion.GEN_AI_OPERATION,
69
+ SemanticConvetion.GEN_AI_OPERATION_TYPE_FRAMEWORK)
70
70
  span.set_attribute(SemanticConvetion.GEN_AI_APPLICATION_NAME,
71
71
  application_name)
72
72
  span.set_status(Status(StatusCode.OK))
@@ -68,8 +68,8 @@ def async_wrap_julep(gen_ai_endpoint, version, environment, application_name,
68
68
  environment)
69
69
  span.set_attribute(SemanticConvetion.GEN_AI_APPLICATION_NAME,
70
70
  application_name)
71
- span.set_attribute(SemanticConvetion.GEN_AI_TYPE,
72
- SemanticConvetion.GEN_AI_TYPE_AGENT)
71
+ span.set_attribute(SemanticConvetion.GEN_AI_OPERATION,
72
+ SemanticConvetion.GEN_AI_OPERATION_TYPE_AGENT)
73
73
 
74
74
  if gen_ai_endpoint == "julep.agents_create":
75
75
  span.set_attribute(SemanticConvetion.GEN_AI_AGENT_ID,
@@ -68,8 +68,8 @@ def wrap_julep(gen_ai_endpoint, version, environment, application_name,
68
68
  environment)
69
69
  span.set_attribute(SemanticConvetion.GEN_AI_APPLICATION_NAME,
70
70
  application_name)
71
- span.set_attribute(SemanticConvetion.GEN_AI_TYPE,
72
- SemanticConvetion.GEN_AI_TYPE_AGENT)
71
+ span.set_attribute(SemanticConvetion.GEN_AI_OPERATION,
72
+ SemanticConvetion.GEN_AI_OPERATION_TYPE_AGENT)
73
73
 
74
74
  if gen_ai_endpoint == "julep.agents_create":
75
75
  span.set_attribute(SemanticConvetion.GEN_AI_AGENT_ID,
@@ -85,8 +85,8 @@ def general_wrap(gen_ai_endpoint, version, environment, application_name,
85
85
  gen_ai_endpoint)
86
86
  span.set_attribute(SemanticConvetion.GEN_AI_ENVIRONMENT,
87
87
  environment)
88
- span.set_attribute(SemanticConvetion.GEN_AI_TYPE,
89
- SemanticConvetion.GEN_AI_TYPE_FRAMEWORK)
88
+ span.set_attribute(SemanticConvetion.GEN_AI_OPERATION,
89
+ SemanticConvetion.GEN_AI_OPERATION_TYPE_FRAMEWORK)
90
90
  span.set_attribute(SemanticConvetion.GEN_AI_APPLICATION_NAME,
91
91
  application_name)
92
92
  span.set_attribute(SemanticConvetion.GEN_AI_RETRIEVAL_SOURCE,
@@ -159,8 +159,8 @@ def hub(gen_ai_endpoint, version, environment, application_name, tracer,
159
159
  gen_ai_endpoint)
160
160
  span.set_attribute(SemanticConvetion.GEN_AI_ENVIRONMENT,
161
161
  environment)
162
- span.set_attribute(SemanticConvetion.GEN_AI_TYPE,
163
- SemanticConvetion.GEN_AI_TYPE_FRAMEWORK)
162
+ span.set_attribute(SemanticConvetion.GEN_AI_OPERATION,
163
+ SemanticConvetion.GEN_AI_OPERATION_TYPE_FRAMEWORK)
164
164
  span.set_attribute(SemanticConvetion.GEN_AI_APPLICATION_NAME,
165
165
  application_name)
166
166
  span.set_attribute(SemanticConvetion.GEN_AI_HUB_OWNER,
@@ -247,8 +247,8 @@ def allm(gen_ai_endpoint, version, environment, application_name,
247
247
  gen_ai_endpoint)
248
248
  span.set_attribute(SemanticConvetion.GEN_AI_ENVIRONMENT,
249
249
  environment)
250
- span.set_attribute(SemanticConvetion.GEN_AI_TYPE,
251
- SemanticConvetion.GEN_AI_TYPE_FRAMEWORK)
250
+ span.set_attribute(SemanticConvetion.GEN_AI_OPERATION,
251
+ SemanticConvetion.GEN_AI_OPERATION_TYPE_FRAMEWORK)
252
252
  span.set_attribute(SemanticConvetion.GEN_AI_APPLICATION_NAME,
253
253
  application_name)
254
254
  span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_MODEL,
@@ -261,9 +261,9 @@ def allm(gen_ai_endpoint, version, environment, application_name,
261
261
  str(get_attribute_from_instance_or_kwargs(instance, 'top_p')))
262
262
  span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_IS_STREAM,
263
263
  False)
264
- span.set_attribute(SemanticConvetion.GEN_AI_USAGE_PROMPT_TOKENS,
264
+ span.set_attribute(SemanticConvetion.GEN_AI_USAGE_INPUT_TOKENS,
265
265
  input_tokens)
266
- span.set_attribute(SemanticConvetion.GEN_AI_USAGE_COMPLETION_TOKENS,
266
+ span.set_attribute(SemanticConvetion.GEN_AI_USAGE_OUTPUT_TOKENS,
267
267
  output_tokens)
268
268
  span.set_attribute(SemanticConvetion.GEN_AI_USAGE_TOTAL_TOKENS,
269
269
  input_tokens + output_tokens)
@@ -295,8 +295,8 @@ def allm(gen_ai_endpoint, version, environment, application_name,
295
295
  SemanticConvetion.GEN_AI_SYSTEM_LANGCHAIN,
296
296
  SemanticConvetion.GEN_AI_ENVIRONMENT:
297
297
  environment,
298
- SemanticConvetion.GEN_AI_TYPE:
299
- SemanticConvetion.GEN_AI_TYPE_CHAT,
298
+ SemanticConvetion.GEN_AI_OPERATION:
299
+ SemanticConvetion.GEN_AI_OPERATION_TYPE_CHAT,
300
300
  SemanticConvetion.GEN_AI_REQUEST_MODEL:
301
301
  str(get_attribute_from_instance_or_kwargs(instance, 'model'))
302
302
  }
@@ -387,8 +387,8 @@ def llm(gen_ai_endpoint, version, environment, application_name,
387
387
  gen_ai_endpoint)
388
388
  span.set_attribute(SemanticConvetion.GEN_AI_ENVIRONMENT,
389
389
  environment)
390
- span.set_attribute(SemanticConvetion.GEN_AI_TYPE,
391
- SemanticConvetion.GEN_AI_TYPE_FRAMEWORK)
390
+ span.set_attribute(SemanticConvetion.GEN_AI_OPERATION,
391
+ SemanticConvetion.GEN_AI_OPERATION_TYPE_FRAMEWORK)
392
392
  span.set_attribute(SemanticConvetion.GEN_AI_APPLICATION_NAME,
393
393
  application_name)
394
394
  span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_MODEL,
@@ -401,9 +401,9 @@ def llm(gen_ai_endpoint, version, environment, application_name,
401
401
  str(get_attribute_from_instance_or_kwargs(instance, 'top_p')))
402
402
  span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_IS_STREAM,
403
403
  False)
404
- span.set_attribute(SemanticConvetion.GEN_AI_USAGE_PROMPT_TOKENS,
404
+ span.set_attribute(SemanticConvetion.GEN_AI_USAGE_INPUT_TOKENS,
405
405
  input_tokens)
406
- span.set_attribute(SemanticConvetion.GEN_AI_USAGE_COMPLETION_TOKENS,
406
+ span.set_attribute(SemanticConvetion.GEN_AI_USAGE_OUTPUT_TOKENS,
407
407
  output_tokens)
408
408
  span.set_attribute(SemanticConvetion.GEN_AI_USAGE_TOTAL_TOKENS,
409
409
  input_tokens + output_tokens)
@@ -435,8 +435,8 @@ def llm(gen_ai_endpoint, version, environment, application_name,
435
435
  SemanticConvetion.GEN_AI_SYSTEM_LANGCHAIN,
436
436
  SemanticConvetion.GEN_AI_ENVIRONMENT:
437
437
  environment,
438
- SemanticConvetion.GEN_AI_TYPE:
439
- SemanticConvetion.GEN_AI_TYPE_CHAT,
438
+ SemanticConvetion.GEN_AI_OPERATION:
439
+ SemanticConvetion.GEN_AI_OPERATION_TYPE_CHAT,
440
440
  SemanticConvetion.GEN_AI_REQUEST_MODEL:
441
441
  str(get_attribute_from_instance_or_kwargs(instance, 'model'))
442
442
  }
@@ -512,7 +512,10 @@ def chat(gen_ai_endpoint, version, environment, application_name,
512
512
  token_usage = response.usage_metadata
513
513
  input_tokens = token_usage.get("input_tokens", 0)
514
514
  output_tokens = token_usage.get("output_tokens", 0)
515
- model = instance.model_id
515
+ if hasattr(instance, "model_id"):
516
+ model = instance.model_id
517
+ else:
518
+ model = instance.model_name
516
519
  prompt = "" if isinstance(args[0], list) else args[0]
517
520
  else:
518
521
  if not isinstance(response, dict) or "output_text" not in response:
@@ -540,8 +543,8 @@ def chat(gen_ai_endpoint, version, environment, application_name,
540
543
  gen_ai_endpoint)
541
544
  span.set_attribute(SemanticConvetion.GEN_AI_ENVIRONMENT,
542
545
  environment)
543
- span.set_attribute(SemanticConvetion.GEN_AI_TYPE,
544
- SemanticConvetion.GEN_AI_TYPE_CHAT)
546
+ span.set_attribute(SemanticConvetion.GEN_AI_OPERATION,
547
+ SemanticConvetion.GEN_AI_OPERATION_TYPE_CHAT)
545
548
  span.set_attribute(SemanticConvetion.GEN_AI_APPLICATION_NAME,
546
549
  application_name)
547
550
  span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_MODEL,
@@ -554,9 +557,9 @@ def chat(gen_ai_endpoint, version, environment, application_name,
554
557
  str(getattr(instance, 'top_p', 1)))
555
558
  span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_IS_STREAM,
556
559
  False)
557
- span.set_attribute(SemanticConvetion.GEN_AI_USAGE_PROMPT_TOKENS,
560
+ span.set_attribute(SemanticConvetion.GEN_AI_USAGE_INPUT_TOKENS,
558
561
  input_tokens)
559
- span.set_attribute(SemanticConvetion.GEN_AI_USAGE_COMPLETION_TOKENS,
562
+ span.set_attribute(SemanticConvetion.GEN_AI_USAGE_OUTPUT_TOKENS,
560
563
  output_tokens)
561
564
  span.set_attribute(SemanticConvetion.GEN_AI_USAGE_TOTAL_TOKENS,
562
565
  input_tokens + output_tokens)
@@ -589,8 +592,8 @@ def chat(gen_ai_endpoint, version, environment, application_name,
589
592
  SemanticConvetion.GEN_AI_SYSTEM_LANGCHAIN,
590
593
  SemanticConvetion.GEN_AI_ENVIRONMENT:
591
594
  environment,
592
- SemanticConvetion.GEN_AI_TYPE:
593
- SemanticConvetion.GEN_AI_TYPE_CHAT,
595
+ SemanticConvetion.GEN_AI_OPERATION:
596
+ SemanticConvetion.GEN_AI_OPERATION_TYPE_CHAT,
594
597
  SemanticConvetion.GEN_AI_REQUEST_MODEL:
595
598
  model
596
599
  }
@@ -666,9 +669,11 @@ def achat(gen_ai_endpoint, version, environment, application_name,
666
669
  token_usage = response.usage_metadata
667
670
  input_tokens = token_usage.get("input_tokens", 0)
668
671
  output_tokens = token_usage.get("output_tokens", 0)
669
- model = instance.model_id
672
+ if hasattr(instance, "model_id"):
673
+ model = instance.model_id
674
+ else:
675
+ model = instance.model_name
670
676
  prompt = "" if isinstance(args[0], list) else args[0]
671
-
672
677
  else:
673
678
  if not isinstance(response, dict) or "output_text" not in response:
674
679
  return response
@@ -695,8 +700,8 @@ def achat(gen_ai_endpoint, version, environment, application_name,
695
700
  gen_ai_endpoint)
696
701
  span.set_attribute(SemanticConvetion.GEN_AI_ENVIRONMENT,
697
702
  environment)
698
- span.set_attribute(SemanticConvetion.GEN_AI_TYPE,
699
- SemanticConvetion.GEN_AI_TYPE_CHAT)
703
+ span.set_attribute(SemanticConvetion.GEN_AI_OPERATION,
704
+ SemanticConvetion.GEN_AI_OPERATION_TYPE_CHAT)
700
705
  span.set_attribute(SemanticConvetion.GEN_AI_APPLICATION_NAME,
701
706
  application_name)
702
707
  span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_MODEL,
@@ -709,9 +714,9 @@ def achat(gen_ai_endpoint, version, environment, application_name,
709
714
  str(getattr(instance, 'top_p',1)))
710
715
  span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_IS_STREAM,
711
716
  False)
712
- span.set_attribute(SemanticConvetion.GEN_AI_USAGE_PROMPT_TOKENS,
717
+ span.set_attribute(SemanticConvetion.GEN_AI_USAGE_INPUT_TOKENS,
713
718
  input_tokens)
714
- span.set_attribute(SemanticConvetion.GEN_AI_USAGE_COMPLETION_TOKENS,
719
+ span.set_attribute(SemanticConvetion.GEN_AI_USAGE_OUTPUT_TOKENS,
715
720
  output_tokens)
716
721
  span.set_attribute(SemanticConvetion.GEN_AI_USAGE_TOTAL_TOKENS,
717
722
  input_tokens + output_tokens)
@@ -743,8 +748,8 @@ def achat(gen_ai_endpoint, version, environment, application_name,
743
748
  SemanticConvetion.GEN_AI_SYSTEM_LANGCHAIN,
744
749
  SemanticConvetion.GEN_AI_ENVIRONMENT:
745
750
  environment,
746
- SemanticConvetion.GEN_AI_TYPE:
747
- SemanticConvetion.GEN_AI_TYPE_CHAT,
751
+ SemanticConvetion.GEN_AI_OPERATION:
752
+ SemanticConvetion.GEN_AI_OPERATION_TYPE_CHAT,
748
753
  SemanticConvetion.GEN_AI_REQUEST_MODEL:
749
754
  model
750
755
  }
@@ -58,8 +58,8 @@ def create_agent(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_LETTA)
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
65
  span.set_attribute(SemanticConvetion.GEN_AI_APPLICATION_NAME,
@@ -139,17 +139,17 @@ def send_message(gen_ai_endpoint, version, environment, application_name,
139
139
  span.set_attribute(TELEMETRY_SDK_NAME, "openlit")
140
140
  span.set_attribute(SemanticConvetion.GEN_AI_SYSTEM,
141
141
  SemanticConvetion.GEN_AI_SYSTEM_LETTA)
142
- span.set_attribute(SemanticConvetion.GEN_AI_TYPE,
143
- SemanticConvetion.GEN_AI_TYPE_AGENT)
142
+ span.set_attribute(SemanticConvetion.GEN_AI_OPERATION,
143
+ SemanticConvetion.GEN_AI_OPERATION_TYPE_AGENT)
144
144
  span.set_attribute(SemanticConvetion.GEN_AI_ENDPOINT,
145
145
  gen_ai_endpoint)
146
146
  span.set_attribute(SemanticConvetion.GEN_AI_APPLICATION_NAME,
147
147
  application_name)
148
148
  span.set_attribute(SemanticConvetion.GEN_AI_AGENT_STEP_COUNT,
149
149
  response.usage.step_count)
150
- span.set_attribute(SemanticConvetion.GEN_AI_USAGE_PROMPT_TOKENS,
150
+ span.set_attribute(SemanticConvetion.GEN_AI_USAGE_INPUT_TOKENS,
151
151
  response.usage.prompt_tokens)
152
- span.set_attribute(SemanticConvetion.GEN_AI_USAGE_COMPLETION_TOKENS,
152
+ span.set_attribute(SemanticConvetion.GEN_AI_USAGE_OUTPUT_TOKENS,
153
153
  response.usage.completion_tokens)
154
154
  span.set_attribute(SemanticConvetion.GEN_AI_USAGE_TOTAL_TOKENS,
155
155
  response.usage.total_tokens)
@@ -126,8 +126,8 @@ def acompletion(gen_ai_endpoint, version, environment, application_name,
126
126
  self._span.set_attribute(TELEMETRY_SDK_NAME, "openlit")
127
127
  self._span.set_attribute(SemanticConvetion.GEN_AI_SYSTEM,
128
128
  SemanticConvetion.GEN_AI_SYSTEM_LITELLM)
129
- self._span.set_attribute(SemanticConvetion.GEN_AI_TYPE,
130
- SemanticConvetion.GEN_AI_TYPE_CHAT)
129
+ self._span.set_attribute(SemanticConvetion.GEN_AI_OPERATION,
130
+ SemanticConvetion.GEN_AI_OPERATION_TYPE_CHAT)
131
131
  self._span.set_attribute(SemanticConvetion.GEN_AI_ENDPOINT,
132
132
  gen_ai_endpoint)
133
133
  self._span.set_attribute(SemanticConvetion.GEN_AI_RESPONSE_ID,
@@ -154,9 +154,9 @@ def acompletion(gen_ai_endpoint, version, environment, application_name,
154
154
  self._kwargs.get("seed", ""))
155
155
  self._span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_IS_STREAM,
156
156
  True)
157
- self._span.set_attribute(SemanticConvetion.GEN_AI_USAGE_PROMPT_TOKENS,
157
+ self._span.set_attribute(SemanticConvetion.GEN_AI_USAGE_INPUT_TOKENS,
158
158
  prompt_tokens)
159
- self._span.set_attribute(SemanticConvetion.GEN_AI_USAGE_COMPLETION_TOKENS,
159
+ self._span.set_attribute(SemanticConvetion.GEN_AI_USAGE_OUTPUT_TOKENS,
160
160
  completion_tokens)
161
161
  self._span.set_attribute(SemanticConvetion.GEN_AI_USAGE_TOTAL_TOKENS,
162
162
  prompt_tokens + completion_tokens)
@@ -188,8 +188,8 @@ def acompletion(gen_ai_endpoint, version, environment, application_name,
188
188
  SemanticConvetion.GEN_AI_SYSTEM_LITELLM,
189
189
  SemanticConvetion.GEN_AI_ENVIRONMENT:
190
190
  environment,
191
- SemanticConvetion.GEN_AI_TYPE:
192
- SemanticConvetion.GEN_AI_TYPE_CHAT,
191
+ SemanticConvetion.GEN_AI_OPERATION:
192
+ SemanticConvetion.GEN_AI_OPERATION_TYPE_CHAT,
193
193
  SemanticConvetion.GEN_AI_REQUEST_MODEL:
194
194
  self._kwargs.get("model", "gpt-3.5-turbo")
195
195
  }
@@ -269,8 +269,8 @@ def acompletion(gen_ai_endpoint, version, environment, application_name,
269
269
  span.set_attribute(TELEMETRY_SDK_NAME, "openlit")
270
270
  span.set_attribute(SemanticConvetion.GEN_AI_SYSTEM,
271
271
  SemanticConvetion.GEN_AI_SYSTEM_LITELLM)
272
- span.set_attribute(SemanticConvetion.GEN_AI_TYPE,
273
- SemanticConvetion.GEN_AI_TYPE_CHAT)
272
+ span.set_attribute(SemanticConvetion.GEN_AI_OPERATION,
273
+ SemanticConvetion.GEN_AI_OPERATION_TYPE_CHAT)
274
274
  span.set_attribute(SemanticConvetion.GEN_AI_ENDPOINT,
275
275
  gen_ai_endpoint)
276
276
  span.set_attribute(SemanticConvetion.GEN_AI_RESPONSE_ID,
@@ -312,9 +312,9 @@ def acompletion(gen_ai_endpoint, version, environment, application_name,
312
312
  pricing_info, response_dict.get('usage', {}).get('prompt_tokens', None),
313
313
  response_dict.get('usage', {}).get('completion_tokens', None))
314
314
 
315
- span.set_attribute(SemanticConvetion.GEN_AI_USAGE_PROMPT_TOKENS,
315
+ span.set_attribute(SemanticConvetion.GEN_AI_USAGE_INPUT_TOKENS,
316
316
  response_dict.get('usage', {}).get('prompt_tokens', None))
317
- span.set_attribute(SemanticConvetion.GEN_AI_USAGE_COMPLETION_TOKENS,
317
+ span.set_attribute(SemanticConvetion.GEN_AI_USAGE_OUTPUT_TOKENS,
318
318
  response_dict.get('usage', {}).get('completion_tokens', None))
319
319
  span.set_attribute(SemanticConvetion.GEN_AI_USAGE_TOTAL_TOKENS,
320
320
  response_dict.get('usage', {}).get('total_tokens', None))
@@ -361,9 +361,9 @@ def acompletion(gen_ai_endpoint, version, environment, application_name,
361
361
  SemanticConvetion.GEN_AI_CONTENT_COMPLETION: "Function called with tools",
362
362
  },
363
363
  )
364
- span.set_attribute(SemanticConvetion.GEN_AI_USAGE_PROMPT_TOKENS,
364
+ span.set_attribute(SemanticConvetion.GEN_AI_USAGE_INPUT_TOKENS,
365
365
  response_dict.get('usage').get('prompt_tokens'))
366
- span.set_attribute(SemanticConvetion.GEN_AI_USAGE_COMPLETION_TOKENS,
366
+ span.set_attribute(SemanticConvetion.GEN_AI_USAGE_OUTPUT_TOKENS,
367
367
  response_dict.get('usage').get('completion_tokens'))
368
368
  span.set_attribute(SemanticConvetion.GEN_AI_USAGE_TOTAL_TOKENS,
369
369
  response_dict.get('usage').get('total_tokens'))
@@ -382,8 +382,8 @@ def acompletion(gen_ai_endpoint, version, environment, application_name,
382
382
  SemanticConvetion.GEN_AI_SYSTEM_LITELLM,
383
383
  SemanticConvetion.GEN_AI_ENVIRONMENT:
384
384
  environment,
385
- SemanticConvetion.GEN_AI_TYPE:
386
- SemanticConvetion.GEN_AI_TYPE_CHAT,
385
+ SemanticConvetion.GEN_AI_OPERATION:
386
+ SemanticConvetion.GEN_AI_OPERATION_TYPE_CHAT,
387
387
  SemanticConvetion.GEN_AI_REQUEST_MODEL:
388
388
  kwargs.get("model", "gpt-3.5-turbo")
389
389
  }
@@ -453,8 +453,8 @@ def aembedding(gen_ai_endpoint, version, environment, application_name,
453
453
  span.set_attribute(TELEMETRY_SDK_NAME, "openlit")
454
454
  span.set_attribute(SemanticConvetion.GEN_AI_SYSTEM,
455
455
  SemanticConvetion.GEN_AI_SYSTEM_OPENAI)
456
- span.set_attribute(SemanticConvetion.GEN_AI_TYPE,
457
- SemanticConvetion.GEN_AI_TYPE_EMBEDDING)
456
+ span.set_attribute(SemanticConvetion.GEN_AI_OPERATION,
457
+ SemanticConvetion.GEN_AI_OPERATION_TYPE_EMBEDDING)
458
458
  span.set_attribute(SemanticConvetion.GEN_AI_ENDPOINT,
459
459
  gen_ai_endpoint)
460
460
  span.set_attribute(SemanticConvetion.GEN_AI_ENVIRONMENT,
@@ -463,13 +463,13 @@ def aembedding(gen_ai_endpoint, version, environment, application_name,
463
463
  application_name)
464
464
  span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_MODEL,
465
465
  kwargs.get("model", "text-embedding-ada-002"))
466
- span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_EMBEDDING_FORMAT,
466
+ span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_ENCODING_FORMATS,
467
467
  kwargs.get("encoding_format", "float"))
468
468
  # span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_EMBEDDING_DIMENSION,
469
469
  # kwargs.get("dimensions", "null"))
470
470
  span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_USER,
471
471
  kwargs.get("user", ""))
472
- span.set_attribute(SemanticConvetion.GEN_AI_USAGE_PROMPT_TOKENS,
472
+ span.set_attribute(SemanticConvetion.GEN_AI_USAGE_INPUT_TOKENS,
473
473
  response_dict.get('usage').get('prompt_tokens'))
474
474
  span.set_attribute(SemanticConvetion.GEN_AI_USAGE_TOTAL_TOKENS,
475
475
  response_dict.get('usage').get('total_tokens'))
@@ -495,8 +495,8 @@ def aembedding(gen_ai_endpoint, version, environment, application_name,
495
495
  SemanticConvetion.GEN_AI_SYSTEM_OPENAI,
496
496
  SemanticConvetion.GEN_AI_ENVIRONMENT:
497
497
  environment,
498
- SemanticConvetion.GEN_AI_TYPE:
499
- SemanticConvetion.GEN_AI_TYPE_EMBEDDING,
498
+ SemanticConvetion.GEN_AI_OPERATION:
499
+ SemanticConvetion.GEN_AI_OPERATION_TYPE_EMBEDDING,
500
500
  SemanticConvetion.GEN_AI_REQUEST_MODEL:
501
501
  kwargs.get("model", "text-embedding-ada-002")
502
502
  }
@@ -126,8 +126,8 @@ def completion(gen_ai_endpoint, version, environment, application_name,
126
126
  self._span.set_attribute(TELEMETRY_SDK_NAME, "openlit")
127
127
  self._span.set_attribute(SemanticConvetion.GEN_AI_SYSTEM,
128
128
  SemanticConvetion.GEN_AI_SYSTEM_LITELLM)
129
- self._span.set_attribute(SemanticConvetion.GEN_AI_TYPE,
130
- SemanticConvetion.GEN_AI_TYPE_CHAT)
129
+ self._span.set_attribute(SemanticConvetion.GEN_AI_OPERATION,
130
+ SemanticConvetion.GEN_AI_OPERATION_TYPE_CHAT)
131
131
  self._span.set_attribute(SemanticConvetion.GEN_AI_ENDPOINT,
132
132
  gen_ai_endpoint)
133
133
  self._span.set_attribute(SemanticConvetion.GEN_AI_RESPONSE_ID,
@@ -154,9 +154,9 @@ def completion(gen_ai_endpoint, version, environment, application_name,
154
154
  self._kwargs.get("seed", ""))
155
155
  self._span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_IS_STREAM,
156
156
  True)
157
- self._span.set_attribute(SemanticConvetion.GEN_AI_USAGE_PROMPT_TOKENS,
157
+ self._span.set_attribute(SemanticConvetion.GEN_AI_USAGE_INPUT_TOKENS,
158
158
  prompt_tokens)
159
- self._span.set_attribute(SemanticConvetion.GEN_AI_USAGE_COMPLETION_TOKENS,
159
+ self._span.set_attribute(SemanticConvetion.GEN_AI_USAGE_OUTPUT_TOKENS,
160
160
  completion_tokens)
161
161
  self._span.set_attribute(SemanticConvetion.GEN_AI_USAGE_TOTAL_TOKENS,
162
162
  prompt_tokens + completion_tokens)
@@ -188,8 +188,8 @@ def completion(gen_ai_endpoint, version, environment, application_name,
188
188
  SemanticConvetion.GEN_AI_SYSTEM_LITELLM,
189
189
  SemanticConvetion.GEN_AI_ENVIRONMENT:
190
190
  environment,
191
- SemanticConvetion.GEN_AI_TYPE:
192
- SemanticConvetion.GEN_AI_TYPE_CHAT,
191
+ SemanticConvetion.GEN_AI_OPERATION:
192
+ SemanticConvetion.GEN_AI_OPERATION_TYPE_CHAT,
193
193
  SemanticConvetion.GEN_AI_REQUEST_MODEL:
194
194
  self._kwargs.get("model", "gpt-3.5-turbo")
195
195
  }
@@ -269,8 +269,8 @@ def completion(gen_ai_endpoint, version, environment, application_name,
269
269
  span.set_attribute(TELEMETRY_SDK_NAME, "openlit")
270
270
  span.set_attribute(SemanticConvetion.GEN_AI_SYSTEM,
271
271
  SemanticConvetion.GEN_AI_SYSTEM_LITELLM)
272
- span.set_attribute(SemanticConvetion.GEN_AI_TYPE,
273
- SemanticConvetion.GEN_AI_TYPE_CHAT)
272
+ span.set_attribute(SemanticConvetion.GEN_AI_OPERATION,
273
+ SemanticConvetion.GEN_AI_OPERATION_TYPE_CHAT)
274
274
  span.set_attribute(SemanticConvetion.GEN_AI_ENDPOINT,
275
275
  gen_ai_endpoint)
276
276
  span.set_attribute(SemanticConvetion.GEN_AI_RESPONSE_ID,
@@ -312,9 +312,9 @@ def completion(gen_ai_endpoint, version, environment, application_name,
312
312
  pricing_info, response_dict.get('usage', {}).get('prompt_tokens', None),
313
313
  response_dict.get('usage', {}).get('completion_tokens', None))
314
314
 
315
- span.set_attribute(SemanticConvetion.GEN_AI_USAGE_PROMPT_TOKENS,
315
+ span.set_attribute(SemanticConvetion.GEN_AI_USAGE_INPUT_TOKENS,
316
316
  response_dict.get('usage', {}).get('prompt_tokens', None))
317
- span.set_attribute(SemanticConvetion.GEN_AI_USAGE_COMPLETION_TOKENS,
317
+ span.set_attribute(SemanticConvetion.GEN_AI_USAGE_OUTPUT_TOKENS,
318
318
  response_dict.get('usage', {}).get('completion_tokens', None))
319
319
  span.set_attribute(SemanticConvetion.GEN_AI_USAGE_TOTAL_TOKENS,
320
320
  response_dict.get('usage', {}).get('total_tokens', None))
@@ -361,9 +361,9 @@ def completion(gen_ai_endpoint, version, environment, application_name,
361
361
  SemanticConvetion.GEN_AI_CONTENT_COMPLETION: "Function called with tools",
362
362
  },
363
363
  )
364
- span.set_attribute(SemanticConvetion.GEN_AI_USAGE_PROMPT_TOKENS,
364
+ span.set_attribute(SemanticConvetion.GEN_AI_USAGE_INPUT_TOKENS,
365
365
  response_dict.get('usage').get('prompt_tokens'))
366
- span.set_attribute(SemanticConvetion.GEN_AI_USAGE_COMPLETION_TOKENS,
366
+ span.set_attribute(SemanticConvetion.GEN_AI_USAGE_OUTPUT_TOKENS,
367
367
  response_dict.get('usage').get('completion_tokens'))
368
368
  span.set_attribute(SemanticConvetion.GEN_AI_USAGE_TOTAL_TOKENS,
369
369
  response_dict.get('usage').get('total_tokens'))
@@ -382,8 +382,8 @@ def completion(gen_ai_endpoint, version, environment, application_name,
382
382
  SemanticConvetion.GEN_AI_SYSTEM_LITELLM,
383
383
  SemanticConvetion.GEN_AI_ENVIRONMENT:
384
384
  environment,
385
- SemanticConvetion.GEN_AI_TYPE:
386
- SemanticConvetion.GEN_AI_TYPE_CHAT,
385
+ SemanticConvetion.GEN_AI_OPERATION:
386
+ SemanticConvetion.GEN_AI_OPERATION_TYPE_CHAT,
387
387
  SemanticConvetion.GEN_AI_REQUEST_MODEL:
388
388
  kwargs.get("model", "gpt-3.5-turbo")
389
389
  }
@@ -453,8 +453,8 @@ def embedding(gen_ai_endpoint, version, environment, application_name,
453
453
  span.set_attribute(TELEMETRY_SDK_NAME, "openlit")
454
454
  span.set_attribute(SemanticConvetion.GEN_AI_SYSTEM,
455
455
  SemanticConvetion.GEN_AI_SYSTEM_OPENAI)
456
- span.set_attribute(SemanticConvetion.GEN_AI_TYPE,
457
- SemanticConvetion.GEN_AI_TYPE_EMBEDDING)
456
+ span.set_attribute(SemanticConvetion.GEN_AI_OPERATION,
457
+ SemanticConvetion.GEN_AI_OPERATION_TYPE_EMBEDDING)
458
458
  span.set_attribute(SemanticConvetion.GEN_AI_ENDPOINT,
459
459
  gen_ai_endpoint)
460
460
  span.set_attribute(SemanticConvetion.GEN_AI_ENVIRONMENT,
@@ -463,13 +463,13 @@ def embedding(gen_ai_endpoint, version, environment, application_name,
463
463
  application_name)
464
464
  span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_MODEL,
465
465
  kwargs.get("model", "text-embedding-ada-002"))
466
- span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_EMBEDDING_FORMAT,
466
+ span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_ENCODING_FORMATS,
467
467
  kwargs.get("encoding_format", "float"))
468
468
  # span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_EMBEDDING_DIMENSION,
469
469
  # kwargs.get("dimensions", "null"))
470
470
  span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_USER,
471
471
  kwargs.get("user", ""))
472
- span.set_attribute(SemanticConvetion.GEN_AI_USAGE_PROMPT_TOKENS,
472
+ span.set_attribute(SemanticConvetion.GEN_AI_USAGE_INPUT_TOKENS,
473
473
  response_dict.get('usage').get('prompt_tokens'))
474
474
  span.set_attribute(SemanticConvetion.GEN_AI_USAGE_TOTAL_TOKENS,
475
475
  response_dict.get('usage').get('total_tokens'))
@@ -495,8 +495,8 @@ def embedding(gen_ai_endpoint, version, environment, application_name,
495
495
  SemanticConvetion.GEN_AI_SYSTEM_OPENAI,
496
496
  SemanticConvetion.GEN_AI_ENVIRONMENT:
497
497
  environment,
498
- SemanticConvetion.GEN_AI_TYPE:
499
- SemanticConvetion.GEN_AI_TYPE_EMBEDDING,
498
+ SemanticConvetion.GEN_AI_OPERATION:
499
+ SemanticConvetion.GEN_AI_OPERATION_TYPE_EMBEDDING,
500
500
  SemanticConvetion.GEN_AI_REQUEST_MODEL:
501
501
  kwargs.get("model", "text-embedding-ada-002")
502
502
  }
@@ -65,8 +65,8 @@ def load_data(gen_ai_endpoint, version, environment, application_name,
65
65
  gen_ai_endpoint)
66
66
  span.set_attribute(SemanticConvetion.GEN_AI_ENVIRONMENT,
67
67
  environment)
68
- span.set_attribute(SemanticConvetion.GEN_AI_TYPE,
69
- SemanticConvetion.GEN_AI_TYPE_FRAMEWORK)
68
+ span.set_attribute(SemanticConvetion.GEN_AI_OPERATION,
69
+ SemanticConvetion.GEN_AI_OPERATION_TYPE_FRAMEWORK)
70
70
  span.set_attribute(SemanticConvetion.GEN_AI_APPLICATION_NAME,
71
71
  application_name)
72
72
  span.set_attribute(SemanticConvetion.GEN_AI_RETRIEVAL_SOURCE,
@@ -65,8 +65,8 @@ def mem0_wrap(gen_ai_endpoint, version, environment, application_name,
65
65
  gen_ai_endpoint)
66
66
  span.set_attribute(SemanticConvetion.GEN_AI_ENVIRONMENT,
67
67
  environment)
68
- span.set_attribute(SemanticConvetion.GEN_AI_TYPE,
69
- SemanticConvetion.GEN_AI_TYPE_FRAMEWORK)
68
+ span.set_attribute(SemanticConvetion.GEN_AI_OPERATION,
69
+ SemanticConvetion.GEN_AI_OPERATION_TYPE_FRAMEWORK)
70
70
  span.set_attribute(SemanticConvetion.GEN_AI_APPLICATION_NAME,
71
71
  application_name)
72
72
 
@@ -77,8 +77,8 @@ def general_wrap(gen_ai_endpoint, version, environment, application_name,
77
77
  environment)
78
78
  span.set_attribute(SemanticConvetion.GEN_AI_APPLICATION_NAME,
79
79
  application_name)
80
- span.set_attribute(SemanticConvetion.GEN_AI_TYPE,
81
- SemanticConvetion.GEN_AI_TYPE_VECTORDB)
80
+ span.set_attribute(SemanticConvetion.GEN_AI_OPERATION,
81
+ SemanticConvetion.GEN_AI_OPERATION_TYPE_VECTORDB)
82
82
  span.set_attribute(SemanticConvetion.DB_SYSTEM,
83
83
  SemanticConvetion.DB_SYSTEM_MILVUS)
84
84
 
@@ -159,8 +159,8 @@ def general_wrap(gen_ai_endpoint, version, environment, application_name,
159
159
  SemanticConvetion.DB_SYSTEM_MILVUS,
160
160
  SemanticConvetion.GEN_AI_ENVIRONMENT:
161
161
  environment,
162
- SemanticConvetion.GEN_AI_TYPE:
163
- SemanticConvetion.GEN_AI_TYPE_VECTORDB,
162
+ SemanticConvetion.GEN_AI_OPERATION:
163
+ SemanticConvetion.GEN_AI_OPERATION_TYPE_VECTORDB,
164
164
  SemanticConvetion.DB_OPERATION:
165
165
  db_operation
166
166
  }