Same agent Smaller bill. The tools and infrastructure to get more work from your AI. Fewer tokens. Less compute. Lower cost.
TypeScript agent-harnessagent-harness-engineeringai-engineeringai-observabilityamd-gpuclaude-codeclickhousecodexcoding-agentcoding-agentscursorgenaigpu-monitoringllm-observabilityllmopsnvidia-smiobservabilityopen-sourceopenaiopentelemetry
[Fix]: Semantic convention attributes in OpenAI and Agno (#900)
Ben Mezger10b2cd70cffd
diff --git a/sdk/python/pyproject.toml b/sdk/python/pyproject.tomlindex 03c797a2..80b9826a 100644--- a/sdk/python/pyproject.toml+++ b/sdk/python/pyproject.toml@@ -1,6 +1,6 @@[tool.poetry]name = "openlit"-version = "1.35.5"+version = "1.35.6"description = "OpenTelemetry-native Auto instrumentation library for monitoring LLM Applications and GPUs, facilitating the integration of observability into your GenAI-driven projects"authors = ["OpenLIT"]license = "Apache-2.0"diff --git a/sdk/python/src/openlit/instrumentation/agno/async_agno.py b/sdk/python/src/openlit/instrumentation/agno/async_agno.pyindex 4b721b81..8d6d57ae 100644--- a/sdk/python/src/openlit/instrumentation/agno/async_agno.py+++ b/sdk/python/src/openlit/instrumentation/agno/async_agno.py@@ -818,7 +818,7 @@ def async_workflow_run_wrap(capture_message_content,disable_metrics,version,- SemanticConvention.GEN_AI_OPERATION_TYPE_WORKFLOW,+ SemanticConvention.GEN_AI_OPERATION_TYPE_FRAMEWORK,)span.set_status(Status(StatusCode.OK))diff --git a/sdk/python/src/openlit/instrumentation/agno/utils.py b/sdk/python/src/openlit/instrumentation/agno/utils.pyindex af5dbf0c..27d60da5 100644--- a/sdk/python/src/openlit/instrumentation/agno/utils.py+++ b/sdk/python/src/openlit/instrumentation/agno/utils.py@@ -683,7 +683,7 @@ def process_workflow_request(# Use common span attributes for workflow operationscommon_span_attributes(scope,- SemanticConvention.GEN_AI_OPERATION_TYPE_WORKFLOW,+ SemanticConvention.GEN_AI_OPERATION_TYPE_FRAMEWORK,SemanticConvention.GEN_AI_SYSTEM_AGNO,"localhost", # server_address80, # server_portdiff --git a/sdk/python/src/openlit/instrumentation/openai_agents/processor.py b/sdk/python/src/openlit/instrumentation/openai_agents/processor.pyindex 10302dd6..3c8fd0b9 100644--- a/sdk/python/src/openlit/instrumentation/openai_agents/processor.py+++ b/sdk/python/src/openlit/instrumentation/openai_agents/processor.py@@ -101,7 +101,7 @@ class OpenLITTracingProcessor(TracingProcessor):kind=SpanKind.CLIENT,attributes={SemanticConvention.GEN_AI_SYSTEM: "openai_agents",- SemanticConvention.GEN_AI_OPERATION: SemanticConvention.GEN_AI_OPERATION_TYPE_WORKFLOW,+ SemanticConvention.GEN_AI_OPERATION: SemanticConvention.GEN_AI_OPERATION_TYPE_FRAMEWORK,"trace.id": trace_id,"trace.name": name,},@@ -258,10 +258,10 @@ class OpenLITTracingProcessor(TracingProcessor):"""Get operation type based on span characteristics."""type_mapping = {"agent": SemanticConvention.GEN_AI_OPERATION_TYPE_AGENT,- "generation": SemanticConvention.GEN_AI_OPERATION_CHAT,- "function": SemanticConvention.GEN_AI_OPERATION_CHAT,- "tool": SemanticConvention.GEN_AI_OPERATION_CHAT,- "handoff": SemanticConvention.GEN_AI_OPERATION_TYPE_AGENT,+ "generation": SemanticConvention.GEN_AI_OPERATION_TYPE_CHAT,+ "function": SemanticConvention.GEN_AI_OPERATION_TYPE_CHAT,+ "tool": SemanticConvention.GEN_AI_OPERATION_TYPE_CHAT,+ "handoff": SemanticConvention.GEN_AI_OPERATION_TYPE_CHAT,}# Check span type first@@ -274,7 +274,7 @@ class OpenLITTracingProcessor(TracingProcessor):if key in span_name.lower():return operation- return SemanticConvention.GEN_AI_OPERATION_CHAT+ return SemanticConvention.GEN_AI_OPERATION_TYPE_CHATdef _process_span_attributes(self, span, span_data, span_type: str):"""Process and set span attributes based on span type."""