Skip to content

Commit d6e8cf6

Browse files
fix: operation id field of custom events showing as zero on the server (#49)
* fix: operation id issue on server * lint issue fixed --------- Co-authored-by: Roopan-Microsoft <[email protected]> Co-authored-by: Roopan P M <[email protected]>
1 parent 4f8f7ce commit d6e8cf6

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/backend/agents/group_chat_manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,12 +305,12 @@ async def _execute_step(self, session_id: str, step: Step):
305305
)
306306

307307
track_event_if_configured(
308-
f"Group Chat Manager - Requesting {step.agent.value.title()} to perform the action and added into the cosmos",
308+
f"Group Chat Manager - Requesting {formatted_agent} to perform the action and added into the cosmos",
309309
{
310310
"session_id": session_id,
311311
"user_id": self._user_id,
312312
"plan_id": step.plan_id,
313-
"content": f"Requesting {step.agent.value.title()} to perform action: {step.action}",
313+
"content": f"Requesting {formatted_agent} to perform action: {step.action}",
314314
"source": "GroupChatManager",
315315
"step_id": step.id,
316316
},

src/backend/app.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
from event_utils import track_event_if_configured
2424
from fastapi.middleware.cors import CORSMiddleware
2525
from azure.monitor.opentelemetry import configure_azure_monitor
26+
from opentelemetry.instrumentation.fastapi import FastAPIInstrumentor
2627

2728

2829
# Check if the Application Insights Instrumentation Key is set in the environment variables
@@ -52,6 +53,8 @@
5253
# Initialize the FastAPI app
5354
app = FastAPI()
5455

56+
FastAPIInstrumentor.instrument_app(app)
57+
5558
frontend_url = Config.FRONTEND_SITE_NAME
5659

5760
# Add this near the top of your app.py, after initializing the app

0 commit comments

Comments
 (0)