Recorder or OpenTelemetry

Azure AI Foundry

Wrap each Azure OpenAI or Foundry model call, or export Foundry's OpenTelemetry traces. Pass the underlying model name to the recorder, not your deployment name.

  1. Wrap each call; chat completions return usage.prompt_tokens and usage.completion_tokens.
  2. Agent Service runs report usage on the run object when it completes.
  3. Download the events from Log Analytics with your own access.

Download from Log Analytics (you run this)

az monitor log-analytics query --workspace <workspace-id> \
  --analytics-query "ContainerAppConsoleLogs_CL | where TimeGenerated > ago(30d) | where Log_s has '<workflow>' | project Log_s" \
  -o tsv > .harness/runs/azure.jsonl

Where the log lands

In Log Analytics or Application Insights.

How it reaches the harness

You download it with the Azure CLI and your own credentials.

The table is FunctionAppLogs for Functions and AppTraces for Application Insights.

Read the full guide on GitHub

Add the recorder

20 platform guides in total.