Enabling Observability
Turn on telemetry in MeshAgent with just two lines of code:Python
INFO):
Python
What It Does
otel_config() automatically:
- Initializes OpenTelemetry for tracing, logging, and metrics
- Tags all telemetry with your project, room, and session IDs
- Streams telemetry directly to MeshAgent Studio in real time
- Ensures all standard
loggingcalls (e.g.logging.info) are captured
How It’s Scoped
MeshAgent automatically tags telemetry so data appears in the correct room and aggregates cleanly at the project level:| Tag | Description |
|---|---|
project | The project this service belongs to |
room | The current room |
session | The active session ID |
service.name | The name you passed to otel_config |
What MeshAgent Captures
- Traces: The full path of a task through your agents and tools
- Spans: The individual steps inside that path (TaskRunner.ask, Tool.execute, etc.)
- Metrics: Usage and performance data (response time, token and cost tracking)
- Logs & events: Contextual messages for debugging and analysis
Where You See It
- Developer Console: Located in the lower half of room’s interface in MeshAgent Studio. Open it while chatting with an agent, uploading files, or running tasks in a room to see live logs, traces, and metrics as they happen. This provides insights into agent, tool, and room behavior as you interact. It’s ideal for debugging, testing, and understanding what’s happening behind the scenes while you work.
- Session Viewer: Displays the same telemetry information in a dedicated, focused view for each room session. View the results live while a session is running or after it ends to review what happened.
- Usage Dashboard: Provides an aggregated, project-level summary of cost, latency, and activity across rooms and participants. Use it to spot trends, compare performance, and understand overall trends and usage patterns.
Next Steps
- Introduction to Observability: Learn why telemetry matters and what MeshAgent captures automatically.
- Custom Traces, Logs, and Metrics: Add your own spans, counters, or structured logs to capture custom behavior.