Skip to content

SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.

fix: update attribute mappings for ai (#12925)

Nityananda Gohaindd3b99f19cef
diff --git a/pkg/modules/spanmapper/implspanmapper/fs/definitions/gen_ai.llm.json b/pkg/modules/spanmapper/implspanmapper/fs/definitions/gen_ai.llm.json
index deb2c1af11..7612814872 100644
--- a/pkg/modules/spanmapper/implspanmapper/fs/definitions/gen_ai.llm.json
+++ b/pkg/modules/spanmapper/implspanmapper/fs/definitions/gen_ai.llm.json
@@ -1,5 +1,5 @@
{
- "version": 1,
+ "version": 2,
"definition": {
"name": "gen_ai.llm",
"condition": {
@@ -114,20 +114,6 @@
]
}
},
- {
- "name": "gen_ai.operation.name",
- "fieldContext": "attribute",
- "config": {
- "sources": [
- {
- "key": "llm.request.type",
- "context": "attribute",
- "operation": "copy",
- "priority": 10
- }
- ]
- }
- },
{
"name": "gen_ai.usage.input_tokens",
"fieldContext": "attribute",
@@ -293,6 +279,12 @@
"operation": "copy",
"priority": 30
},
+ {
+ "key": "ai.response.toolCalls",
+ "context": "attribute",
+ "operation": "copy",
+ "priority": 25
+ },
{
"key": "ai.response.text",
"context": "attribute",
@@ -329,7 +321,7 @@
}
},
{
- "name": "gen_ai.response.finish_reason",
+ "name": "gen_ai.response.finish_reasons",
"fieldContext": "attribute",
"config": {
"sources": [
diff --git a/pkg/modules/spanmapper/implspanmapper/fs/definitions/gen_ai.tool.json b/pkg/modules/spanmapper/implspanmapper/fs/definitions/gen_ai.tool.json
index 2c8be4f7fc..3318f5a053 100644
--- a/pkg/modules/spanmapper/implspanmapper/fs/definitions/gen_ai.tool.json
+++ b/pkg/modules/spanmapper/implspanmapper/fs/definitions/gen_ai.tool.json
@@ -1,11 +1,20 @@
{
- "version": 1,
+ "version": 2,
"definition": {
"name": "gen_ai.tool",
"condition": {
"attributes": [
{
- "value": "tool"
+ "value": "tool.name"
+ },
+ {
+ "value": "ai.toolCall."
+ },
+ {
+ "value": "tool_call_args"
+ },
+ {
+ "value": "tool_response"
}
],
"resource": []