{
  "spec_version": "1.4.0-otel",
  "timestamp": "2026-04-24T00:13:03.355457Z",
  "trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
  "span_id": "00f067aa0ba902b7",
  "severity_text": "WARN",
  "severity_number": 13,
  "event_name": "swarm.agent.lifecycle.deprecated",
  "resource": {
    "service.name": "swarm-orchestrator",
    "service.version": "4.2.0",
    "deployment.environment": "production",
    "node.id": "worker-node-aws-us-east-1a-04"
  },
  "attributes": {
    "agent.id": "FinancialNewsSubAgent",
    "agent.previous_version": "v29.x",
    "agent.target_version": "v30",
    "deprecation.reason": "Transitioning to v30 architecture.",
    "deprecation.action_required": true
  },
  "metrics": {
    "agent.core_logic.function_count": 4,
    "agent.capabilities.count": 0
  },
  "artifacts": {
    "provenance": {
      "repository": "git+ssh://repo/core/agents/sub_agents/financial_news_sub_agent.py",
      "commit_sha": "a1b2c3d4e5f6g7h8i9j0",
      "docstring_hash": "sha256:d8c4b12389a..."
    },
    "extracted_capabilities": [],
    "core_logic_signatures": [
      {
        "name": "__init__",
        "ast_hash": "sha256:13f90c53c568b95d",
        "loc": 4,
        "source": "def __init__(self, config):\n        super().__init__(config)\n        self.api_key = self.config.get(\"api_key\")\n        self.base_url = self.config.get(\"base_url\")"
      },
      {
        "name": "execute",
        "ast_hash": "sha256:ca95a8a6f82c9d91",
        "loc": 13,
        "source": "def execute(self, query):\n        params = {\n            \"q\": query,\n            \"apiKey\": self.api_key,\n        }\n        try:\n            response = requests.get(self.base_url, params=params, timeout=10)\n            response.raise_for_status()  # Raise an exception for bad status codes\n            data = response.json()\n            return self._to_structured_output(data)\n        except requests.exceptions.RequestException as e:\n            self.log_error(f\"Error fetching financial news: {e}\")\n            return self._to_error_output(e)"
      },
      {
        "name": "_to_structured_output",
        "ast_hash": "sha256:fc9dc8dc60b001d9",
        "loc": 14,
        "source": "def _to_structured_output(self, data):\n        # Convert the raw API response to the standard metadata schema\n        articles = []\n        for article in data.get(\"articles\", []):\n            articles.append({\n                \"title\": article.get(\"title\"),\n                \"url\": article.get(\"url\"),\n                \"source\": article.get(\"source\", {}).get(\"name\"),\n            })\n        return {\n            \"source_agent\": self.__class__.__name__,\n            \"confidence_score\": 0.9,\n            \"data\": articles,\n        }"
      },
      {
        "name": "_to_error_output",
        "ast_hash": "sha256:6e34b7c471b15c9e",
        "loc": 6,
        "source": "def _to_error_output(self, error):\n        return {\n            \"source_agent\": self.__class__.__name__,\n            \"confidence_score\": 0.0,\n            \"error\": str(error),\n        }"
      }
    ]
  }
}