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.
- openlit/__helpers.py +83 -0
- openlit/__init__.py +1 -1
- openlit/instrumentation/ag2/ag2.py +2 -2
- 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 +4 -4
- openlit/instrumentation/astra/async_astra.py +4 -4
- 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 +4 -4
- 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 +2 -2
- openlit/instrumentation/crawl4ai/async_crawl4ai.py +2 -2
- openlit/instrumentation/crawl4ai/crawl4ai.py +2 -2
- openlit/instrumentation/crewai/crewai.py +2 -2
- openlit/instrumentation/dynamiq/dynamiq.py +2 -2
- openlit/instrumentation/elevenlabs/async_elevenlabs.py +73 -47
- openlit/instrumentation/elevenlabs/elevenlabs.py +73 -52
- openlit/instrumentation/embedchain/embedchain.py +4 -4
- openlit/instrumentation/firecrawl/firecrawl.py +2 -2
- 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/gpt4all.py +17 -17
- openlit/instrumentation/groq/async_groq.py +14 -14
- openlit/instrumentation/groq/groq.py +14 -14
- openlit/instrumentation/haystack/haystack.py +2 -2
- openlit/instrumentation/julep/async_julep.py +2 -2
- openlit/instrumentation/julep/julep.py +2 -2
- openlit/instrumentation/langchain/langchain.py +36 -31
- openlit/instrumentation/letta/letta.py +6 -6
- openlit/instrumentation/litellm/async_litellm.py +20 -20
- openlit/instrumentation/litellm/litellm.py +20 -20
- openlit/instrumentation/llamaindex/llamaindex.py +2 -2
- openlit/instrumentation/mem0/mem0.py +2 -2
- openlit/instrumentation/milvus/milvus.py +4 -4
- openlit/instrumentation/mistral/async_mistral.py +18 -18
- openlit/instrumentation/mistral/mistral.py +18 -18
- openlit/instrumentation/multion/async_multion.py +2 -2
- openlit/instrumentation/multion/multion.py +2 -2
- openlit/instrumentation/ollama/async_ollama.py +29 -29
- openlit/instrumentation/ollama/ollama.py +29 -29
- openlit/instrumentation/openai/__init__.py +11 -230
- openlit/instrumentation/openai/async_openai.py +434 -409
- openlit/instrumentation/openai/openai.py +415 -393
- openlit/instrumentation/phidata/phidata.py +2 -2
- openlit/instrumentation/pinecone/pinecone.py +4 -4
- openlit/instrumentation/premai/premai.py +20 -20
- openlit/instrumentation/qdrant/async_qdrant.py +4 -4
- openlit/instrumentation/qdrant/qdrant.py +4 -4
- openlit/instrumentation/reka/async_reka.py +6 -6
- openlit/instrumentation/reka/reka.py +6 -6
- openlit/instrumentation/together/async_together.py +18 -18
- openlit/instrumentation/together/together.py +18 -18
- openlit/instrumentation/transformers/transformers.py +6 -6
- openlit/instrumentation/vertexai/async_vertexai.py +53 -53
- openlit/instrumentation/vertexai/vertexai.py +53 -53
- openlit/instrumentation/vllm/vllm.py +6 -6
- openlit/otel/metrics.py +98 -7
- openlit/semcov/__init__.py +113 -80
- {openlit-1.33.8.dist-info → openlit-1.33.9.dist-info}/METADATA +1 -1
- openlit-1.33.9.dist-info/RECORD +121 -0
- {openlit-1.33.8.dist-info → openlit-1.33.9.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.9.dist-info}/LICENSE +0 -0
@@ -82,8 +82,8 @@ def generate_content_async(gen_ai_endpoint, version, environment, application_na
|
|
82
82
|
span.set_attribute(TELEMETRY_SDK_NAME, "openlit")
|
83
83
|
span.set_attribute(SemanticConvetion.GEN_AI_SYSTEM,
|
84
84
|
SemanticConvetion.GEN_AI_SYSTEM_VERTEXAI)
|
85
|
-
span.set_attribute(SemanticConvetion.
|
86
|
-
SemanticConvetion.
|
85
|
+
span.set_attribute(SemanticConvetion.GEN_AI_OPERATION,
|
86
|
+
SemanticConvetion.GEN_AI_OPERATION_TYPE_CHAT)
|
87
87
|
span.set_attribute(SemanticConvetion.GEN_AI_ENDPOINT,
|
88
88
|
gen_ai_endpoint)
|
89
89
|
span.set_attribute(SemanticConvetion.GEN_AI_ENVIRONMENT,
|
@@ -94,9 +94,9 @@ def generate_content_async(gen_ai_endpoint, version, environment, application_na
|
|
94
94
|
model)
|
95
95
|
span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_IS_STREAM,
|
96
96
|
True)
|
97
|
-
span.set_attribute(SemanticConvetion.
|
97
|
+
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_INPUT_TOKENS,
|
98
98
|
prompt_tokens)
|
99
|
-
span.set_attribute(SemanticConvetion.
|
99
|
+
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_OUTPUT_TOKENS,
|
100
100
|
completion_tokens)
|
101
101
|
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_TOTAL_TOKENS,
|
102
102
|
total_tokens)
|
@@ -128,8 +128,8 @@ def generate_content_async(gen_ai_endpoint, version, environment, application_na
|
|
128
128
|
SemanticConvetion.GEN_AI_SYSTEM_VERTEXAI,
|
129
129
|
SemanticConvetion.GEN_AI_ENVIRONMENT:
|
130
130
|
environment,
|
131
|
-
SemanticConvetion.
|
132
|
-
SemanticConvetion.
|
131
|
+
SemanticConvetion.GEN_AI_OPERATION:
|
132
|
+
SemanticConvetion.GEN_AI_OPERATION_TYPE_CHAT,
|
133
133
|
SemanticConvetion.GEN_AI_REQUEST_MODEL:
|
134
134
|
model
|
135
135
|
}
|
@@ -168,8 +168,8 @@ def generate_content_async(gen_ai_endpoint, version, environment, application_na
|
|
168
168
|
span.set_attribute(TELEMETRY_SDK_NAME, "openlit")
|
169
169
|
span.set_attribute(SemanticConvetion.GEN_AI_SYSTEM,
|
170
170
|
SemanticConvetion.GEN_AI_SYSTEM_VERTEXAI)
|
171
|
-
span.set_attribute(SemanticConvetion.
|
172
|
-
SemanticConvetion.
|
171
|
+
span.set_attribute(SemanticConvetion.GEN_AI_OPERATION,
|
172
|
+
SemanticConvetion.GEN_AI_OPERATION_TYPE_CHAT)
|
173
173
|
span.set_attribute(SemanticConvetion.GEN_AI_ENDPOINT,
|
174
174
|
gen_ai_endpoint)
|
175
175
|
span.set_attribute(SemanticConvetion.GEN_AI_ENVIRONMENT,
|
@@ -180,9 +180,9 @@ def generate_content_async(gen_ai_endpoint, version, environment, application_na
|
|
180
180
|
model)
|
181
181
|
span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_IS_STREAM,
|
182
182
|
False)
|
183
|
-
span.set_attribute(SemanticConvetion.
|
183
|
+
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_INPUT_TOKENS,
|
184
184
|
response.usage_metadata.prompt_token_count)
|
185
|
-
span.set_attribute(SemanticConvetion.
|
185
|
+
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_OUTPUT_TOKENS,
|
186
186
|
response.usage_metadata.candidates_token_count)
|
187
187
|
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_TOTAL_TOKENS,
|
188
188
|
response.usage_metadata.total_token_count)
|
@@ -215,8 +215,8 @@ def generate_content_async(gen_ai_endpoint, version, environment, application_na
|
|
215
215
|
SemanticConvetion.GEN_AI_SYSTEM_VERTEXAI,
|
216
216
|
SemanticConvetion.GEN_AI_ENVIRONMENT:
|
217
217
|
environment,
|
218
|
-
SemanticConvetion.
|
219
|
-
SemanticConvetion.
|
218
|
+
SemanticConvetion.GEN_AI_OPERATION:
|
219
|
+
SemanticConvetion.GEN_AI_OPERATION_TYPE_CHAT,
|
220
220
|
SemanticConvetion.GEN_AI_REQUEST_MODEL:
|
221
221
|
model
|
222
222
|
}
|
@@ -312,8 +312,8 @@ def send_message_async(gen_ai_endpoint, version, environment, application_name,
|
|
312
312
|
span.set_attribute(TELEMETRY_SDK_NAME, "openlit")
|
313
313
|
span.set_attribute(SemanticConvetion.GEN_AI_SYSTEM,
|
314
314
|
SemanticConvetion.GEN_AI_SYSTEM_VERTEXAI)
|
315
|
-
span.set_attribute(SemanticConvetion.
|
316
|
-
SemanticConvetion.
|
315
|
+
span.set_attribute(SemanticConvetion.GEN_AI_OPERATION,
|
316
|
+
SemanticConvetion.GEN_AI_OPERATION_TYPE_CHAT)
|
317
317
|
span.set_attribute(SemanticConvetion.GEN_AI_ENDPOINT,
|
318
318
|
gen_ai_endpoint)
|
319
319
|
span.set_attribute(SemanticConvetion.GEN_AI_ENVIRONMENT,
|
@@ -324,9 +324,9 @@ def send_message_async(gen_ai_endpoint, version, environment, application_name,
|
|
324
324
|
model)
|
325
325
|
span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_IS_STREAM,
|
326
326
|
True)
|
327
|
-
span.set_attribute(SemanticConvetion.
|
327
|
+
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_INPUT_TOKENS,
|
328
328
|
prompt_tokens)
|
329
|
-
span.set_attribute(SemanticConvetion.
|
329
|
+
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_OUTPUT_TOKENS,
|
330
330
|
completion_tokens)
|
331
331
|
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_TOTAL_TOKENS,
|
332
332
|
total_tokens)
|
@@ -358,8 +358,8 @@ def send_message_async(gen_ai_endpoint, version, environment, application_name,
|
|
358
358
|
SemanticConvetion.GEN_AI_SYSTEM_VERTEXAI,
|
359
359
|
SemanticConvetion.GEN_AI_ENVIRONMENT:
|
360
360
|
environment,
|
361
|
-
SemanticConvetion.
|
362
|
-
SemanticConvetion.
|
361
|
+
SemanticConvetion.GEN_AI_OPERATION:
|
362
|
+
SemanticConvetion.GEN_AI_OPERATION_TYPE_CHAT,
|
363
363
|
SemanticConvetion.GEN_AI_REQUEST_MODEL:
|
364
364
|
model
|
365
365
|
}
|
@@ -398,8 +398,8 @@ def send_message_async(gen_ai_endpoint, version, environment, application_name,
|
|
398
398
|
span.set_attribute(TELEMETRY_SDK_NAME, "openlit")
|
399
399
|
span.set_attribute(SemanticConvetion.GEN_AI_SYSTEM,
|
400
400
|
SemanticConvetion.GEN_AI_SYSTEM_VERTEXAI)
|
401
|
-
span.set_attribute(SemanticConvetion.
|
402
|
-
SemanticConvetion.
|
401
|
+
span.set_attribute(SemanticConvetion.GEN_AI_OPERATION,
|
402
|
+
SemanticConvetion.GEN_AI_OPERATION_TYPE_CHAT)
|
403
403
|
span.set_attribute(SemanticConvetion.GEN_AI_ENDPOINT,
|
404
404
|
gen_ai_endpoint)
|
405
405
|
span.set_attribute(SemanticConvetion.GEN_AI_ENVIRONMENT,
|
@@ -410,9 +410,9 @@ def send_message_async(gen_ai_endpoint, version, environment, application_name,
|
|
410
410
|
model)
|
411
411
|
span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_IS_STREAM,
|
412
412
|
False)
|
413
|
-
span.set_attribute(SemanticConvetion.
|
413
|
+
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_INPUT_TOKENS,
|
414
414
|
response.usage_metadata.prompt_token_count)
|
415
|
-
span.set_attribute(SemanticConvetion.
|
415
|
+
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_OUTPUT_TOKENS,
|
416
416
|
response.usage_metadata.candidates_token_count)
|
417
417
|
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_TOTAL_TOKENS,
|
418
418
|
response.usage_metadata.total_token_count)
|
@@ -445,8 +445,8 @@ def send_message_async(gen_ai_endpoint, version, environment, application_name,
|
|
445
445
|
SemanticConvetion.GEN_AI_SYSTEM_VERTEXAI,
|
446
446
|
SemanticConvetion.GEN_AI_ENVIRONMENT:
|
447
447
|
environment,
|
448
|
-
SemanticConvetion.
|
449
|
-
SemanticConvetion.
|
448
|
+
SemanticConvetion.GEN_AI_OPERATION:
|
449
|
+
SemanticConvetion.GEN_AI_OPERATION_TYPE_CHAT,
|
450
450
|
SemanticConvetion.GEN_AI_REQUEST_MODEL:
|
451
451
|
model
|
452
452
|
}
|
@@ -528,8 +528,8 @@ def predict_async(gen_ai_endpoint, version, environment, application_name, trace
|
|
528
528
|
span.set_attribute(TELEMETRY_SDK_NAME, "openlit")
|
529
529
|
span.set_attribute(SemanticConvetion.GEN_AI_SYSTEM,
|
530
530
|
SemanticConvetion.GEN_AI_SYSTEM_VERTEXAI)
|
531
|
-
span.set_attribute(SemanticConvetion.
|
532
|
-
SemanticConvetion.
|
531
|
+
span.set_attribute(SemanticConvetion.GEN_AI_OPERATION,
|
532
|
+
SemanticConvetion.GEN_AI_OPERATION_TYPE_CHAT)
|
533
533
|
span.set_attribute(SemanticConvetion.GEN_AI_ENDPOINT,
|
534
534
|
gen_ai_endpoint)
|
535
535
|
span.set_attribute(SemanticConvetion.GEN_AI_ENVIRONMENT,
|
@@ -540,9 +540,9 @@ def predict_async(gen_ai_endpoint, version, environment, application_name, trace
|
|
540
540
|
model)
|
541
541
|
span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_IS_STREAM,
|
542
542
|
False)
|
543
|
-
span.set_attribute(SemanticConvetion.
|
543
|
+
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_INPUT_TOKENS,
|
544
544
|
prompt_tokens)
|
545
|
-
span.set_attribute(SemanticConvetion.
|
545
|
+
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_OUTPUT_TOKENS,
|
546
546
|
completion_tokens)
|
547
547
|
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_TOTAL_TOKENS,
|
548
548
|
total_tokens)
|
@@ -574,8 +574,8 @@ def predict_async(gen_ai_endpoint, version, environment, application_name, trace
|
|
574
574
|
SemanticConvetion.GEN_AI_SYSTEM_VERTEXAI,
|
575
575
|
SemanticConvetion.GEN_AI_ENVIRONMENT:
|
576
576
|
environment,
|
577
|
-
SemanticConvetion.
|
578
|
-
SemanticConvetion.
|
577
|
+
SemanticConvetion.GEN_AI_OPERATION:
|
578
|
+
SemanticConvetion.GEN_AI_OPERATION_TYPE_CHAT,
|
579
579
|
SemanticConvetion.GEN_AI_REQUEST_MODEL:
|
580
580
|
model
|
581
581
|
}
|
@@ -668,8 +668,8 @@ def predict_streaming_async(gen_ai_endpoint, version, environment, application_n
|
|
668
668
|
span.set_attribute(TELEMETRY_SDK_NAME, "openlit")
|
669
669
|
span.set_attribute(SemanticConvetion.GEN_AI_SYSTEM,
|
670
670
|
SemanticConvetion.GEN_AI_SYSTEM_VERTEXAI)
|
671
|
-
span.set_attribute(SemanticConvetion.
|
672
|
-
SemanticConvetion.
|
671
|
+
span.set_attribute(SemanticConvetion.GEN_AI_OPERATION,
|
672
|
+
SemanticConvetion.GEN_AI_OPERATION_TYPE_CHAT)
|
673
673
|
span.set_attribute(SemanticConvetion.GEN_AI_ENDPOINT,
|
674
674
|
gen_ai_endpoint)
|
675
675
|
span.set_attribute(SemanticConvetion.GEN_AI_ENVIRONMENT,
|
@@ -680,9 +680,9 @@ def predict_streaming_async(gen_ai_endpoint, version, environment, application_n
|
|
680
680
|
model)
|
681
681
|
span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_IS_STREAM,
|
682
682
|
True)
|
683
|
-
span.set_attribute(SemanticConvetion.
|
683
|
+
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_INPUT_TOKENS,
|
684
684
|
prompt_tokens)
|
685
|
-
span.set_attribute(SemanticConvetion.
|
685
|
+
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_OUTPUT_TOKENS,
|
686
686
|
completion_tokens)
|
687
687
|
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_TOTAL_TOKENS,
|
688
688
|
total_tokens)
|
@@ -714,8 +714,8 @@ def predict_streaming_async(gen_ai_endpoint, version, environment, application_n
|
|
714
714
|
SemanticConvetion.GEN_AI_SYSTEM_VERTEXAI,
|
715
715
|
SemanticConvetion.GEN_AI_ENVIRONMENT:
|
716
716
|
environment,
|
717
|
-
SemanticConvetion.
|
718
|
-
SemanticConvetion.
|
717
|
+
SemanticConvetion.GEN_AI_OPERATION:
|
718
|
+
SemanticConvetion.GEN_AI_OPERATION_TYPE_CHAT,
|
719
719
|
SemanticConvetion.GEN_AI_REQUEST_MODEL:
|
720
720
|
model
|
721
721
|
}
|
@@ -793,8 +793,8 @@ def start_chat_async(gen_ai_endpoint, version, environment, application_name, tr
|
|
793
793
|
span.set_attribute(TELEMETRY_SDK_NAME, "openlit")
|
794
794
|
span.set_attribute(SemanticConvetion.GEN_AI_SYSTEM,
|
795
795
|
SemanticConvetion.GEN_AI_SYSTEM_VERTEXAI)
|
796
|
-
span.set_attribute(SemanticConvetion.
|
797
|
-
SemanticConvetion.
|
796
|
+
span.set_attribute(SemanticConvetion.GEN_AI_OPERATION,
|
797
|
+
SemanticConvetion.GEN_AI_OPERATION_TYPE_CHAT)
|
798
798
|
span.set_attribute(SemanticConvetion.GEN_AI_ENDPOINT,
|
799
799
|
gen_ai_endpoint)
|
800
800
|
span.set_attribute(SemanticConvetion.GEN_AI_ENVIRONMENT,
|
@@ -805,9 +805,9 @@ def start_chat_async(gen_ai_endpoint, version, environment, application_name, tr
|
|
805
805
|
model)
|
806
806
|
span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_IS_STREAM,
|
807
807
|
False)
|
808
|
-
span.set_attribute(SemanticConvetion.
|
808
|
+
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_INPUT_TOKENS,
|
809
809
|
prompt_tokens)
|
810
|
-
span.set_attribute(SemanticConvetion.
|
810
|
+
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_OUTPUT_TOKENS,
|
811
811
|
completion_tokens)
|
812
812
|
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_TOTAL_TOKENS,
|
813
813
|
total_tokens)
|
@@ -839,8 +839,8 @@ def start_chat_async(gen_ai_endpoint, version, environment, application_name, tr
|
|
839
839
|
SemanticConvetion.GEN_AI_SYSTEM_VERTEXAI,
|
840
840
|
SemanticConvetion.GEN_AI_ENVIRONMENT:
|
841
841
|
environment,
|
842
|
-
SemanticConvetion.
|
843
|
-
SemanticConvetion.
|
842
|
+
SemanticConvetion.GEN_AI_OPERATION:
|
843
|
+
SemanticConvetion.GEN_AI_OPERATION_TYPE_CHAT,
|
844
844
|
SemanticConvetion.GEN_AI_REQUEST_MODEL:
|
845
845
|
model
|
846
846
|
}
|
@@ -931,8 +931,8 @@ def start_chat_streaming_async(gen_ai_endpoint, version, environment, applicatio
|
|
931
931
|
span.set_attribute(TELEMETRY_SDK_NAME, "openlit")
|
932
932
|
span.set_attribute(SemanticConvetion.GEN_AI_SYSTEM,
|
933
933
|
SemanticConvetion.GEN_AI_SYSTEM_VERTEXAI)
|
934
|
-
span.set_attribute(SemanticConvetion.
|
935
|
-
SemanticConvetion.
|
934
|
+
span.set_attribute(SemanticConvetion.GEN_AI_OPERATION,
|
935
|
+
SemanticConvetion.GEN_AI_OPERATION_TYPE_CHAT)
|
936
936
|
span.set_attribute(SemanticConvetion.GEN_AI_ENDPOINT,
|
937
937
|
gen_ai_endpoint)
|
938
938
|
span.set_attribute(SemanticConvetion.GEN_AI_ENVIRONMENT,
|
@@ -943,9 +943,9 @@ def start_chat_streaming_async(gen_ai_endpoint, version, environment, applicatio
|
|
943
943
|
model)
|
944
944
|
span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_IS_STREAM,
|
945
945
|
True)
|
946
|
-
span.set_attribute(SemanticConvetion.
|
946
|
+
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_INPUT_TOKENS,
|
947
947
|
prompt_tokens)
|
948
|
-
span.set_attribute(SemanticConvetion.
|
948
|
+
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_OUTPUT_TOKENS,
|
949
949
|
completion_tokens)
|
950
950
|
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_TOTAL_TOKENS,
|
951
951
|
total_tokens)
|
@@ -977,8 +977,8 @@ def start_chat_streaming_async(gen_ai_endpoint, version, environment, applicatio
|
|
977
977
|
SemanticConvetion.GEN_AI_SYSTEM_VERTEXAI,
|
978
978
|
SemanticConvetion.GEN_AI_ENVIRONMENT:
|
979
979
|
environment,
|
980
|
-
SemanticConvetion.
|
981
|
-
SemanticConvetion.
|
980
|
+
SemanticConvetion.GEN_AI_OPERATION:
|
981
|
+
SemanticConvetion.GEN_AI_OPERATION_TYPE_CHAT,
|
982
982
|
SemanticConvetion.GEN_AI_REQUEST_MODEL:
|
983
983
|
model
|
984
984
|
}
|
@@ -1052,8 +1052,8 @@ def embeddings_async(gen_ai_endpoint, version, environment, application_name, tr
|
|
1052
1052
|
span.set_attribute(TELEMETRY_SDK_NAME, "openlit")
|
1053
1053
|
span.set_attribute(SemanticConvetion.GEN_AI_SYSTEM,
|
1054
1054
|
SemanticConvetion.GEN_AI_SYSTEM_VERTEXAI)
|
1055
|
-
span.set_attribute(SemanticConvetion.
|
1056
|
-
SemanticConvetion.
|
1055
|
+
span.set_attribute(SemanticConvetion.GEN_AI_OPERATION,
|
1056
|
+
SemanticConvetion.GEN_AI_OPERATION_TYPE_EMBEDDING)
|
1057
1057
|
span.set_attribute(SemanticConvetion.GEN_AI_ENDPOINT,
|
1058
1058
|
gen_ai_endpoint)
|
1059
1059
|
span.set_attribute(SemanticConvetion.GEN_AI_ENVIRONMENT,
|
@@ -1064,7 +1064,7 @@ def embeddings_async(gen_ai_endpoint, version, environment, application_name, tr
|
|
1064
1064
|
model)
|
1065
1065
|
span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_IS_STREAM,
|
1066
1066
|
False)
|
1067
|
-
span.set_attribute(SemanticConvetion.
|
1067
|
+
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_INPUT_TOKENS,
|
1068
1068
|
prompt_tokens)
|
1069
1069
|
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_TOTAL_TOKENS,
|
1070
1070
|
prompt_tokens)
|
@@ -1090,8 +1090,8 @@ def embeddings_async(gen_ai_endpoint, version, environment, application_name, tr
|
|
1090
1090
|
SemanticConvetion.GEN_AI_SYSTEM_VERTEXAI,
|
1091
1091
|
SemanticConvetion.GEN_AI_ENVIRONMENT:
|
1092
1092
|
environment,
|
1093
|
-
SemanticConvetion.
|
1094
|
-
SemanticConvetion.
|
1093
|
+
SemanticConvetion.GEN_AI_OPERATION:
|
1094
|
+
SemanticConvetion.GEN_AI_OPERATION_TYPE_EMBEDDING,
|
1095
1095
|
SemanticConvetion.GEN_AI_REQUEST_MODEL:
|
1096
1096
|
model
|
1097
1097
|
}
|
@@ -82,8 +82,8 @@ def generate_content(gen_ai_endpoint, version, environment, application_name, tr
|
|
82
82
|
span.set_attribute(TELEMETRY_SDK_NAME, "openlit")
|
83
83
|
span.set_attribute(SemanticConvetion.GEN_AI_SYSTEM,
|
84
84
|
SemanticConvetion.GEN_AI_SYSTEM_VERTEXAI)
|
85
|
-
span.set_attribute(SemanticConvetion.
|
86
|
-
SemanticConvetion.
|
85
|
+
span.set_attribute(SemanticConvetion.GEN_AI_OPERATION,
|
86
|
+
SemanticConvetion.GEN_AI_OPERATION_TYPE_CHAT)
|
87
87
|
span.set_attribute(SemanticConvetion.GEN_AI_ENDPOINT,
|
88
88
|
gen_ai_endpoint)
|
89
89
|
span.set_attribute(SemanticConvetion.GEN_AI_ENVIRONMENT,
|
@@ -94,9 +94,9 @@ def generate_content(gen_ai_endpoint, version, environment, application_name, tr
|
|
94
94
|
model)
|
95
95
|
span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_IS_STREAM,
|
96
96
|
True)
|
97
|
-
span.set_attribute(SemanticConvetion.
|
97
|
+
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_INPUT_TOKENS,
|
98
98
|
prompt_tokens)
|
99
|
-
span.set_attribute(SemanticConvetion.
|
99
|
+
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_OUTPUT_TOKENS,
|
100
100
|
completion_tokens)
|
101
101
|
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_TOTAL_TOKENS,
|
102
102
|
total_tokens)
|
@@ -128,8 +128,8 @@ def generate_content(gen_ai_endpoint, version, environment, application_name, tr
|
|
128
128
|
SemanticConvetion.GEN_AI_SYSTEM_VERTEXAI,
|
129
129
|
SemanticConvetion.GEN_AI_ENVIRONMENT:
|
130
130
|
environment,
|
131
|
-
SemanticConvetion.
|
132
|
-
SemanticConvetion.
|
131
|
+
SemanticConvetion.GEN_AI_OPERATION:
|
132
|
+
SemanticConvetion.GEN_AI_OPERATION_TYPE_CHAT,
|
133
133
|
SemanticConvetion.GEN_AI_REQUEST_MODEL:
|
134
134
|
model
|
135
135
|
}
|
@@ -168,8 +168,8 @@ def generate_content(gen_ai_endpoint, version, environment, application_name, tr
|
|
168
168
|
span.set_attribute(TELEMETRY_SDK_NAME, "openlit")
|
169
169
|
span.set_attribute(SemanticConvetion.GEN_AI_SYSTEM,
|
170
170
|
SemanticConvetion.GEN_AI_SYSTEM_VERTEXAI)
|
171
|
-
span.set_attribute(SemanticConvetion.
|
172
|
-
SemanticConvetion.
|
171
|
+
span.set_attribute(SemanticConvetion.GEN_AI_OPERATION,
|
172
|
+
SemanticConvetion.GEN_AI_OPERATION_TYPE_CHAT)
|
173
173
|
span.set_attribute(SemanticConvetion.GEN_AI_ENDPOINT,
|
174
174
|
gen_ai_endpoint)
|
175
175
|
span.set_attribute(SemanticConvetion.GEN_AI_ENVIRONMENT,
|
@@ -180,9 +180,9 @@ def generate_content(gen_ai_endpoint, version, environment, application_name, tr
|
|
180
180
|
model)
|
181
181
|
span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_IS_STREAM,
|
182
182
|
False)
|
183
|
-
span.set_attribute(SemanticConvetion.
|
183
|
+
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_INPUT_TOKENS,
|
184
184
|
response.usage_metadata.prompt_token_count)
|
185
|
-
span.set_attribute(SemanticConvetion.
|
185
|
+
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_OUTPUT_TOKENS,
|
186
186
|
response.usage_metadata.candidates_token_count)
|
187
187
|
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_TOTAL_TOKENS,
|
188
188
|
response.usage_metadata.total_token_count)
|
@@ -215,8 +215,8 @@ def generate_content(gen_ai_endpoint, version, environment, application_name, tr
|
|
215
215
|
SemanticConvetion.GEN_AI_SYSTEM_VERTEXAI,
|
216
216
|
SemanticConvetion.GEN_AI_ENVIRONMENT:
|
217
217
|
environment,
|
218
|
-
SemanticConvetion.
|
219
|
-
SemanticConvetion.
|
218
|
+
SemanticConvetion.GEN_AI_OPERATION:
|
219
|
+
SemanticConvetion.GEN_AI_OPERATION_TYPE_CHAT,
|
220
220
|
SemanticConvetion.GEN_AI_REQUEST_MODEL:
|
221
221
|
model
|
222
222
|
}
|
@@ -312,8 +312,8 @@ def send_message(gen_ai_endpoint, version, environment, application_name, tracer
|
|
312
312
|
span.set_attribute(TELEMETRY_SDK_NAME, "openlit")
|
313
313
|
span.set_attribute(SemanticConvetion.GEN_AI_SYSTEM,
|
314
314
|
SemanticConvetion.GEN_AI_SYSTEM_VERTEXAI)
|
315
|
-
span.set_attribute(SemanticConvetion.
|
316
|
-
SemanticConvetion.
|
315
|
+
span.set_attribute(SemanticConvetion.GEN_AI_OPERATION,
|
316
|
+
SemanticConvetion.GEN_AI_OPERATION_TYPE_CHAT)
|
317
317
|
span.set_attribute(SemanticConvetion.GEN_AI_ENDPOINT,
|
318
318
|
gen_ai_endpoint)
|
319
319
|
span.set_attribute(SemanticConvetion.GEN_AI_ENVIRONMENT,
|
@@ -324,9 +324,9 @@ def send_message(gen_ai_endpoint, version, environment, application_name, tracer
|
|
324
324
|
model)
|
325
325
|
span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_IS_STREAM,
|
326
326
|
True)
|
327
|
-
span.set_attribute(SemanticConvetion.
|
327
|
+
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_INPUT_TOKENS,
|
328
328
|
prompt_tokens)
|
329
|
-
span.set_attribute(SemanticConvetion.
|
329
|
+
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_OUTPUT_TOKENS,
|
330
330
|
completion_tokens)
|
331
331
|
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_TOTAL_TOKENS,
|
332
332
|
total_tokens)
|
@@ -358,8 +358,8 @@ def send_message(gen_ai_endpoint, version, environment, application_name, tracer
|
|
358
358
|
SemanticConvetion.GEN_AI_SYSTEM_VERTEXAI,
|
359
359
|
SemanticConvetion.GEN_AI_ENVIRONMENT:
|
360
360
|
environment,
|
361
|
-
SemanticConvetion.
|
362
|
-
SemanticConvetion.
|
361
|
+
SemanticConvetion.GEN_AI_OPERATION:
|
362
|
+
SemanticConvetion.GEN_AI_OPERATION_TYPE_CHAT,
|
363
363
|
SemanticConvetion.GEN_AI_REQUEST_MODEL:
|
364
364
|
model
|
365
365
|
}
|
@@ -398,8 +398,8 @@ def send_message(gen_ai_endpoint, version, environment, application_name, tracer
|
|
398
398
|
span.set_attribute(TELEMETRY_SDK_NAME, "openlit")
|
399
399
|
span.set_attribute(SemanticConvetion.GEN_AI_SYSTEM,
|
400
400
|
SemanticConvetion.GEN_AI_SYSTEM_VERTEXAI)
|
401
|
-
span.set_attribute(SemanticConvetion.
|
402
|
-
SemanticConvetion.
|
401
|
+
span.set_attribute(SemanticConvetion.GEN_AI_OPERATION,
|
402
|
+
SemanticConvetion.GEN_AI_OPERATION_TYPE_CHAT)
|
403
403
|
span.set_attribute(SemanticConvetion.GEN_AI_ENDPOINT,
|
404
404
|
gen_ai_endpoint)
|
405
405
|
span.set_attribute(SemanticConvetion.GEN_AI_ENVIRONMENT,
|
@@ -410,9 +410,9 @@ def send_message(gen_ai_endpoint, version, environment, application_name, tracer
|
|
410
410
|
model)
|
411
411
|
span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_IS_STREAM,
|
412
412
|
False)
|
413
|
-
span.set_attribute(SemanticConvetion.
|
413
|
+
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_INPUT_TOKENS,
|
414
414
|
response.usage_metadata.prompt_token_count)
|
415
|
-
span.set_attribute(SemanticConvetion.
|
415
|
+
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_OUTPUT_TOKENS,
|
416
416
|
response.usage_metadata.candidates_token_count)
|
417
417
|
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_TOTAL_TOKENS,
|
418
418
|
response.usage_metadata.total_token_count)
|
@@ -445,8 +445,8 @@ def send_message(gen_ai_endpoint, version, environment, application_name, tracer
|
|
445
445
|
SemanticConvetion.GEN_AI_SYSTEM_VERTEXAI,
|
446
446
|
SemanticConvetion.GEN_AI_ENVIRONMENT:
|
447
447
|
environment,
|
448
|
-
SemanticConvetion.
|
449
|
-
SemanticConvetion.
|
448
|
+
SemanticConvetion.GEN_AI_OPERATION:
|
449
|
+
SemanticConvetion.GEN_AI_OPERATION_TYPE_CHAT,
|
450
450
|
SemanticConvetion.GEN_AI_REQUEST_MODEL:
|
451
451
|
model
|
452
452
|
}
|
@@ -528,8 +528,8 @@ def predict(gen_ai_endpoint, version, environment, application_name, tracer,
|
|
528
528
|
span.set_attribute(TELEMETRY_SDK_NAME, "openlit")
|
529
529
|
span.set_attribute(SemanticConvetion.GEN_AI_SYSTEM,
|
530
530
|
SemanticConvetion.GEN_AI_SYSTEM_VERTEXAI)
|
531
|
-
span.set_attribute(SemanticConvetion.
|
532
|
-
SemanticConvetion.
|
531
|
+
span.set_attribute(SemanticConvetion.GEN_AI_OPERATION,
|
532
|
+
SemanticConvetion.GEN_AI_OPERATION_TYPE_CHAT)
|
533
533
|
span.set_attribute(SemanticConvetion.GEN_AI_ENDPOINT,
|
534
534
|
gen_ai_endpoint)
|
535
535
|
span.set_attribute(SemanticConvetion.GEN_AI_ENVIRONMENT,
|
@@ -540,9 +540,9 @@ def predict(gen_ai_endpoint, version, environment, application_name, tracer,
|
|
540
540
|
model)
|
541
541
|
span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_IS_STREAM,
|
542
542
|
False)
|
543
|
-
span.set_attribute(SemanticConvetion.
|
543
|
+
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_INPUT_TOKENS,
|
544
544
|
prompt_tokens)
|
545
|
-
span.set_attribute(SemanticConvetion.
|
545
|
+
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_OUTPUT_TOKENS,
|
546
546
|
completion_tokens)
|
547
547
|
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_TOTAL_TOKENS,
|
548
548
|
total_tokens)
|
@@ -574,8 +574,8 @@ def predict(gen_ai_endpoint, version, environment, application_name, tracer,
|
|
574
574
|
SemanticConvetion.GEN_AI_SYSTEM_VERTEXAI,
|
575
575
|
SemanticConvetion.GEN_AI_ENVIRONMENT:
|
576
576
|
environment,
|
577
|
-
SemanticConvetion.
|
578
|
-
SemanticConvetion.
|
577
|
+
SemanticConvetion.GEN_AI_OPERATION:
|
578
|
+
SemanticConvetion.GEN_AI_OPERATION_TYPE_CHAT,
|
579
579
|
SemanticConvetion.GEN_AI_REQUEST_MODEL:
|
580
580
|
model
|
581
581
|
}
|
@@ -668,8 +668,8 @@ def predict_streaming(gen_ai_endpoint, version, environment, application_name, t
|
|
668
668
|
span.set_attribute(TELEMETRY_SDK_NAME, "openlit")
|
669
669
|
span.set_attribute(SemanticConvetion.GEN_AI_SYSTEM,
|
670
670
|
SemanticConvetion.GEN_AI_SYSTEM_VERTEXAI)
|
671
|
-
span.set_attribute(SemanticConvetion.
|
672
|
-
SemanticConvetion.
|
671
|
+
span.set_attribute(SemanticConvetion.GEN_AI_OPERATION,
|
672
|
+
SemanticConvetion.GEN_AI_OPERATION_TYPE_CHAT)
|
673
673
|
span.set_attribute(SemanticConvetion.GEN_AI_ENDPOINT,
|
674
674
|
gen_ai_endpoint)
|
675
675
|
span.set_attribute(SemanticConvetion.GEN_AI_ENVIRONMENT,
|
@@ -680,9 +680,9 @@ def predict_streaming(gen_ai_endpoint, version, environment, application_name, t
|
|
680
680
|
model)
|
681
681
|
span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_IS_STREAM,
|
682
682
|
True)
|
683
|
-
span.set_attribute(SemanticConvetion.
|
683
|
+
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_INPUT_TOKENS,
|
684
684
|
prompt_tokens)
|
685
|
-
span.set_attribute(SemanticConvetion.
|
685
|
+
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_OUTPUT_TOKENS,
|
686
686
|
completion_tokens)
|
687
687
|
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_TOTAL_TOKENS,
|
688
688
|
total_tokens)
|
@@ -714,8 +714,8 @@ def predict_streaming(gen_ai_endpoint, version, environment, application_name, t
|
|
714
714
|
SemanticConvetion.GEN_AI_SYSTEM_VERTEXAI,
|
715
715
|
SemanticConvetion.GEN_AI_ENVIRONMENT:
|
716
716
|
environment,
|
717
|
-
SemanticConvetion.
|
718
|
-
SemanticConvetion.
|
717
|
+
SemanticConvetion.GEN_AI_OPERATION:
|
718
|
+
SemanticConvetion.GEN_AI_OPERATION_TYPE_CHAT,
|
719
719
|
SemanticConvetion.GEN_AI_REQUEST_MODEL:
|
720
720
|
model
|
721
721
|
}
|
@@ -793,8 +793,8 @@ def start_chat(gen_ai_endpoint, version, environment, application_name, tracer,
|
|
793
793
|
span.set_attribute(TELEMETRY_SDK_NAME, "openlit")
|
794
794
|
span.set_attribute(SemanticConvetion.GEN_AI_SYSTEM,
|
795
795
|
SemanticConvetion.GEN_AI_SYSTEM_VERTEXAI)
|
796
|
-
span.set_attribute(SemanticConvetion.
|
797
|
-
SemanticConvetion.
|
796
|
+
span.set_attribute(SemanticConvetion.GEN_AI_OPERATION,
|
797
|
+
SemanticConvetion.GEN_AI_OPERATION_TYPE_CHAT)
|
798
798
|
span.set_attribute(SemanticConvetion.GEN_AI_ENDPOINT,
|
799
799
|
gen_ai_endpoint)
|
800
800
|
span.set_attribute(SemanticConvetion.GEN_AI_ENVIRONMENT,
|
@@ -805,9 +805,9 @@ def start_chat(gen_ai_endpoint, version, environment, application_name, tracer,
|
|
805
805
|
model)
|
806
806
|
span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_IS_STREAM,
|
807
807
|
False)
|
808
|
-
span.set_attribute(SemanticConvetion.
|
808
|
+
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_INPUT_TOKENS,
|
809
809
|
prompt_tokens)
|
810
|
-
span.set_attribute(SemanticConvetion.
|
810
|
+
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_OUTPUT_TOKENS,
|
811
811
|
completion_tokens)
|
812
812
|
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_TOTAL_TOKENS,
|
813
813
|
total_tokens)
|
@@ -839,8 +839,8 @@ def start_chat(gen_ai_endpoint, version, environment, application_name, tracer,
|
|
839
839
|
SemanticConvetion.GEN_AI_SYSTEM_VERTEXAI,
|
840
840
|
SemanticConvetion.GEN_AI_ENVIRONMENT:
|
841
841
|
environment,
|
842
|
-
SemanticConvetion.
|
843
|
-
SemanticConvetion.
|
842
|
+
SemanticConvetion.GEN_AI_OPERATION:
|
843
|
+
SemanticConvetion.GEN_AI_OPERATION_TYPE_CHAT,
|
844
844
|
SemanticConvetion.GEN_AI_REQUEST_MODEL:
|
845
845
|
model
|
846
846
|
}
|
@@ -931,8 +931,8 @@ def start_chat_streaming(gen_ai_endpoint, version, environment, application_name
|
|
931
931
|
span.set_attribute(TELEMETRY_SDK_NAME, "openlit")
|
932
932
|
span.set_attribute(SemanticConvetion.GEN_AI_SYSTEM,
|
933
933
|
SemanticConvetion.GEN_AI_SYSTEM_VERTEXAI)
|
934
|
-
span.set_attribute(SemanticConvetion.
|
935
|
-
SemanticConvetion.
|
934
|
+
span.set_attribute(SemanticConvetion.GEN_AI_OPERATION,
|
935
|
+
SemanticConvetion.GEN_AI_OPERATION_TYPE_CHAT)
|
936
936
|
span.set_attribute(SemanticConvetion.GEN_AI_ENDPOINT,
|
937
937
|
gen_ai_endpoint)
|
938
938
|
span.set_attribute(SemanticConvetion.GEN_AI_ENVIRONMENT,
|
@@ -943,9 +943,9 @@ def start_chat_streaming(gen_ai_endpoint, version, environment, application_name
|
|
943
943
|
model)
|
944
944
|
span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_IS_STREAM,
|
945
945
|
True)
|
946
|
-
span.set_attribute(SemanticConvetion.
|
946
|
+
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_INPUT_TOKENS,
|
947
947
|
prompt_tokens)
|
948
|
-
span.set_attribute(SemanticConvetion.
|
948
|
+
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_OUTPUT_TOKENS,
|
949
949
|
completion_tokens)
|
950
950
|
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_TOTAL_TOKENS,
|
951
951
|
total_tokens)
|
@@ -977,8 +977,8 @@ def start_chat_streaming(gen_ai_endpoint, version, environment, application_name
|
|
977
977
|
SemanticConvetion.GEN_AI_SYSTEM_VERTEXAI,
|
978
978
|
SemanticConvetion.GEN_AI_ENVIRONMENT:
|
979
979
|
environment,
|
980
|
-
SemanticConvetion.
|
981
|
-
SemanticConvetion.
|
980
|
+
SemanticConvetion.GEN_AI_OPERATION:
|
981
|
+
SemanticConvetion.GEN_AI_OPERATION_TYPE_CHAT,
|
982
982
|
SemanticConvetion.GEN_AI_REQUEST_MODEL:
|
983
983
|
model
|
984
984
|
}
|
@@ -1052,8 +1052,8 @@ def embeddings(gen_ai_endpoint, version, environment, application_name, tracer,
|
|
1052
1052
|
span.set_attribute(TELEMETRY_SDK_NAME, "openlit")
|
1053
1053
|
span.set_attribute(SemanticConvetion.GEN_AI_SYSTEM,
|
1054
1054
|
SemanticConvetion.GEN_AI_SYSTEM_VERTEXAI)
|
1055
|
-
span.set_attribute(SemanticConvetion.
|
1056
|
-
SemanticConvetion.
|
1055
|
+
span.set_attribute(SemanticConvetion.GEN_AI_OPERATION,
|
1056
|
+
SemanticConvetion.GEN_AI_OPERATION_TYPE_EMBEDDING)
|
1057
1057
|
span.set_attribute(SemanticConvetion.GEN_AI_ENDPOINT,
|
1058
1058
|
gen_ai_endpoint)
|
1059
1059
|
span.set_attribute(SemanticConvetion.GEN_AI_ENVIRONMENT,
|
@@ -1064,7 +1064,7 @@ def embeddings(gen_ai_endpoint, version, environment, application_name, tracer,
|
|
1064
1064
|
model)
|
1065
1065
|
span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_IS_STREAM,
|
1066
1066
|
False)
|
1067
|
-
span.set_attribute(SemanticConvetion.
|
1067
|
+
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_INPUT_TOKENS,
|
1068
1068
|
prompt_tokens)
|
1069
1069
|
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_TOTAL_TOKENS,
|
1070
1070
|
prompt_tokens)
|
@@ -1090,8 +1090,8 @@ def embeddings(gen_ai_endpoint, version, environment, application_name, tracer,
|
|
1090
1090
|
SemanticConvetion.GEN_AI_SYSTEM_VERTEXAI,
|
1091
1091
|
SemanticConvetion.GEN_AI_ENVIRONMENT:
|
1092
1092
|
environment,
|
1093
|
-
SemanticConvetion.
|
1094
|
-
SemanticConvetion.
|
1093
|
+
SemanticConvetion.GEN_AI_OPERATION:
|
1094
|
+
SemanticConvetion.GEN_AI_OPERATION_TYPE_EMBEDDING,
|
1095
1095
|
SemanticConvetion.GEN_AI_REQUEST_MODEL:
|
1096
1096
|
model
|
1097
1097
|
}
|
@@ -57,8 +57,8 @@ def generate(gen_ai_endpoint, version, environment, application_name,
|
|
57
57
|
span.set_attribute(TELEMETRY_SDK_NAME, "openlit")
|
58
58
|
span.set_attribute(SemanticConvetion.GEN_AI_SYSTEM,
|
59
59
|
SemanticConvetion.GEN_AI_SYSTEM_VLLM)
|
60
|
-
span.set_attribute(SemanticConvetion.
|
61
|
-
SemanticConvetion.
|
60
|
+
span.set_attribute(SemanticConvetion.GEN_AI_OPERATION,
|
61
|
+
SemanticConvetion.GEN_AI_OPERATION_TYPE_CHAT)
|
62
62
|
span.set_attribute(SemanticConvetion.GEN_AI_ENDPOINT,
|
63
63
|
gen_ai_endpoint)
|
64
64
|
span.set_attribute(SemanticConvetion.GEN_AI_ENVIRONMENT,
|
@@ -97,9 +97,9 @@ def generate(gen_ai_endpoint, version, environment, application_name,
|
|
97
97
|
|
98
98
|
total_tokens = input_tokens + output_tokens
|
99
99
|
|
100
|
-
span.set_attribute(SemanticConvetion.
|
100
|
+
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_INPUT_TOKENS,
|
101
101
|
input_tokens)
|
102
|
-
span.set_attribute(SemanticConvetion.
|
102
|
+
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_OUTPUT_TOKENS,
|
103
103
|
output_tokens)
|
104
104
|
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_TOTAL_TOKENS,
|
105
105
|
total_tokens)
|
@@ -118,8 +118,8 @@ def generate(gen_ai_endpoint, version, environment, application_name,
|
|
118
118
|
SemanticConvetion.GEN_AI_SYSTEM_VLLM,
|
119
119
|
SemanticConvetion.GEN_AI_ENVIRONMENT:
|
120
120
|
environment,
|
121
|
-
SemanticConvetion.
|
122
|
-
SemanticConvetion.
|
121
|
+
SemanticConvetion.GEN_AI_OPERATION:
|
122
|
+
SemanticConvetion.GEN_AI_OPERATION_TYPE_CHAT,
|
123
123
|
SemanticConvetion.GEN_AI_REQUEST_MODEL:
|
124
124
|
model
|
125
125
|
}
|