Skip to content

The only tool you need to know what is happening and how to fix it.

2.4 KB
Raw Blame
{
  "resourceSpans": [
    {
      "resource": {
        "attributes": [
          {"key": "service.name", "value": {"stringValue": "agent-service"}},
          {"key": "service.version", "value": {"stringValue": "2.1.0"}}
        ]
      },
      "scopeSpans": [
        {
          "scope": {"name": "agent-service"},
          "spans": [
            {
              "attributes": [
                {"key": "trace.name", "value": {"stringValue": "Weather Agent"}},
                {"key": "user.id", "value": {"stringValue": "customer-42"}},
                {"key": "gen_ai.conversation.id", "value": {"stringValue": "conv-2024-abc"}},
                {"key": "gen_ai.operation.name", "value": {"stringValue": "chat"}},
                {"key": "gen_ai.system", "value": {"stringValue": "openai"}},
                {"key": "gen_ai.request.model", "value": {"stringValue": "gpt-4o"}},
                {"key": "gen_ai.response.model", "value": {"stringValue": "gpt-4o-2024-08-06"}},
                {"key": "gen_ai.usage.input_tokens", "value": {"intValue": 120}},
                {"key": "gen_ai.usage.output_tokens", "value": {"intValue": 40}},
                {"key": "gen_ai.usage.input_cost", "value": {"doubleValue": 0.0012}},
                {"key": "gen_ai.usage.output_cost", "value": {"doubleValue": 0.0008}},
                {"key": "gen_ai.response.finish_reason", "value": {"stringValue": "tool_calls"}},
                {"key": "gen_ai.prompt", "value": {"stringValue": "{\"messages\":[{\"role\":\"user\",\"content\":\"What's the weather in Paris and what time is it there?\"}]}"}},
                {"key": "gen_ai.completion", "value": {"stringValue": "{\"choices\":[{\"message\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"id\":\"call_1\",\"type\":\"function\",\"function\":{\"name\":\"get_weather\",\"arguments\":\"{\\\"city\\\":\\\"Paris\\\"}\"}},{\"id\":\"call_2\",\"type\":\"function\",\"function\":{\"name\":\"get_time\",\"arguments\":\"{\\\"tz\\\":\\\"Europe/Paris\\\"}\"}}]}}]}"}}
              ],
              "endTimeUnixNano": "1774926644373000000",
              "kind": 3,
              "name": "chat gpt-4o",
              "spanId": "1a06f22e9f134e7f",
              "startTimeUnixNano": "1774926642873000000",
              "status": {"code": 1},
              "traceId": "aa5ad7a3070fecf76bc3180145d97600"
            }
          ]
        }
      ]
    }
  ]
}