{
  "resourceSpans": [
    {
      "resource": {
        "attributes": [
          {
            "key": "telemetry.sdk.language",
            "value": {
              "stringValue": "python"
            }
          },
          {
            "key": "telemetry.sdk.name",
            "value": {
              "stringValue": "opentelemetry"
            }
          },
          {
            "key": "telemetry.sdk.version",
            "value": {
              "stringValue": "1.45.0"
            }
          },
          {
            "key": "service.instance.id",
            "value": {
              "stringValue": "a0099751-1cb1-40fa-ba17-33067333722f"
            }
          },
          {
            "key": "service.name",
            "value": {
              "stringValue": "aicostbudget-local-capture"
            }
          }
        ]
      },
      "scopeSpans": [
        {
          "scope": {
            "name": "openinference.instrumentation.openai",
            "version": "0.1.63"
          },
          "spans": [
            {
              "traceId": "570707e2b32e2ef533ff9a2e54adca91",
              "spanId": "72c41c0cd5d95a1a",
              "parentSpanId": "9fcba27ccff009ed",
              "flags": 256,
              "name": "ChatCompletion",
              "kind": 1,
              "startTimeUnixNano": "1791202364387868100",
              "endTimeUnixNano": "1791202364447976300",
              "attributes": [
                {
                  "key": "llm.system",
                  "value": {
                    "stringValue": "openai"
                  }
                },
                {
                  "key": "input.mime_type",
                  "value": {
                    "stringValue": "application/json"
                  }
                },
                {
                  "key": "output.mime_type",
                  "value": {
                    "stringValue": "application/json"
                  }
                },
                {
                  "key": "llm.invocation_parameters",
                  "value": {
                    "stringValue": "{\"model\": \"gpt-5.4-mini\", \"stream\": false}"
                  }
                },
                {
                  "key": "llm.input_messages.0.message.role",
                  "value": {
                    "stringValue": "user"
                  }
                },
                {
                  "key": "llm.model_name",
                  "value": {
                    "stringValue": "gpt-5.4-mini"
                  }
                },
                {
                  "key": "llm.token_count.total",
                  "value": {
                    "intValue": "1500"
                  }
                },
                {
                  "key": "llm.token_count.prompt",
                  "value": {
                    "intValue": "1000"
                  }
                },
                {
                  "key": "llm.token_count.completion",
                  "value": {
                    "intValue": "500"
                  }
                },
                {
                  "key": "llm.output_messages.0.message.role",
                  "value": {
                    "stringValue": "assistant"
                  }
                },
                {
                  "key": "llm.finish_reason",
                  "value": {
                    "stringValue": "stop"
                  }
                },
                {
                  "key": "openinference.span.kind",
                  "value": {
                    "stringValue": "LLM"
                  }
                }
              ],
              "status": {
                "code": 1
              }
            }
          ]
        },
        {
          "scope": {
            "name": "aicostbudget.capture",
            "version": "0"
          },
          "spans": [
            {
              "traceId": "570707e2b32e2ef533ff9a2e54adca91",
              "spanId": "9fcba27ccff009ed",
              "flags": 256,
              "name": "local serialization task",
              "kind": 1,
              "startTimeUnixNano": "1791202362398220200",
              "endTimeUnixNano": "1791202364447976300",
              "attributes": [
                {
                  "key": "openinference.span.kind",
                  "value": {
                    "stringValue": "AGENT"
                  }
                }
              ],
              "status": {}
            }
          ]
        }
      ]
    }
  ]
}
