diff --git a/src/backend/agents/group_chat_manager.py b/src/backend/agents/group_chat_manager.py index 101b643f..3591f0ef 100644 --- a/src/backend/agents/group_chat_manager.py +++ b/src/backend/agents/group_chat_manager.py @@ -305,12 +305,12 @@ async def _execute_step(self, session_id: str, step: Step): ) track_event_if_configured( - f"Group Chat Manager - Requesting {step.agent.value.title()} to perform the action and added into the cosmos", + f"Group Chat Manager - Requesting {formatted_agent} to perform the action and added into the cosmos", { "session_id": session_id, "user_id": self._user_id, "plan_id": step.plan_id, - "content": f"Requesting {step.agent.value.title()} to perform action: {step.action}", + "content": f"Requesting {formatted_agent} to perform action: {step.action}", "source": "GroupChatManager", "step_id": step.id, }, diff --git a/src/backend/app.py b/src/backend/app.py index bcde79b2..1e96822d 100644 --- a/src/backend/app.py +++ b/src/backend/app.py @@ -23,6 +23,7 @@ from event_utils import track_event_if_configured from fastapi.middleware.cors import CORSMiddleware from azure.monitor.opentelemetry import configure_azure_monitor +from opentelemetry.instrumentation.fastapi import FastAPIInstrumentor # Check if the Application Insights Instrumentation Key is set in the environment variables @@ -52,6 +53,8 @@ # Initialize the FastAPI app app = FastAPI() +FastAPIInstrumentor.instrument_app(app) + frontend_url = Config.FRONTEND_SITE_NAME # Add this near the top of your app.py, after initializing the app