FabricFabricHarness
Reference

Telemetry

Events, metrics, and OpenTelemetry hooks.

Fabric Harness emits structured events for every meaningful step in an agent run. The full notes live at docs/telemetry.md.

Event types

agent_start
text_delta
tool_start         tool_end
command_start      command_end
task_start         task_end
approval_requested approval_resolved
checkpoint_created
compaction_start   compaction_end
artifact_published
error
idle
result

Transports

  • SSEfh dev exposes a streaming endpoint per session.
  • WebSocket — designed-for richer UIs.
  • OpenTelemetry — span/attribute names align with Foundry conventions when running on Foundry Hosted Agents.
  • Event Hubs / Kafka — designed-for enterprise pipelines.

Metrics from the CLI

fh metrics <session-id> [--json]

Aggregates:

  • token usage (prompt + completion),
  • tool calls,
  • shell commands,
  • artifacts,
  • approvals,
  • task counts.

Per-event hooks

Future: per-agent telemetry hooks for cost/latency budgets and custom span attributes. For now, wrap the harness loop and read events from the session history.