{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/logbrew/json-schema/logbrew-trace-span-response-schema.json",
  "title": "TraceSpanResponse",
  "description": "A native trace span returned to API clients.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/logbrew-traces-api-openapi.yml#/components/schemas/TraceSpanResponse",
  "properties": {
    "attributes": {
      "description": "Structured span attributes."
    },
    "duration_ms": {
      "description": "Span duration in milliseconds.",
      "format": "int64",
      "type": "integer"
    },
    "environment": {
      "description": "Deployment environment.",
      "type": "string"
    },
    "id": {
      "description": "Unique span row identifier.",
      "format": "uuid",
      "type": "string"
    },
    "name": {
      "description": "Human-readable span name.",
      "type": "string"
    },
    "operation": {
      "description": "Operation category.",
      "type": "string"
    },
    "parent_span_id": {
      "description": "Parent span ID.",
      "type": [
        "string",
        "null"
      ]
    },
    "project_id": {
      "description": "Owning project ID.",
      "format": "uuid",
      "type": "string"
    },
    "release": {
      "description": "Application release.",
      "type": "string"
    },
    "sdk_name": {
      "description": "SDK package name.",
      "type": "string"
    },
    "sdk_version": {
      "description": "SDK semantic version.",
      "type": "string"
    },
    "service_name": {
      "description": "Logical service name.",
      "type": "string"
    },
    "span_id": {
      "description": "Span ID unique within a trace.",
      "type": "string"
    },
    "started_at": {
      "description": "Span start timestamp.",
      "format": "date-time",
      "type": "string"
    },
    "status": {
      "description": "Span status.",
      "type": [
        "string",
        "null"
      ]
    },
    "trace_id": {
      "description": "Distributed trace ID.",
      "type": "string"
    }
  },
  "required": [
    "id",
    "project_id",
    "trace_id",
    "span_id",
    "parent_span_id",
    "name",
    "operation",
    "status",
    "started_at",
    "duration_ms",
    "attributes",
    "environment",
    "release",
    "service_name",
    "sdk_name",
    "sdk_version"
  ],
  "type": "object"
}