Grant trace access
Run as ACCOUNTADMIN:
GRANT APPLICATION ROLE SNOWFLAKE.AI_OBSERVABILITY_READER TO APPLICATION AGENTLEDGER;
Cortex Code sessions appear on the next refresh. Open the dashboard from the app's page in Snowsight. Its Setup view shows which steps are complete.
What the app reads
AgentLedger is built on Snowflake's own telemetry, not on a proxy or a sidecar. It reads:
SNOWFLAKE.LOCAL.AI_OBSERVABILITY_EVENTSโ Cortex Code runs and their steps: model calls, tool calls, SQL, timings and status.SNOWFLAKE.ACCOUNT_USAGE.SNOWFLAKE_COCO_USAGE_HISTORYโ billed AI credits per request, when Snowflake has metered them.SNOWFLAKE.ACCOUNT_USAGE.QUERY_HISTORYandQUERY_ATTRIBUTION_HISTORYโ the SQL an agent ran, tagged with the request that caused it.
Each request is matched to the session that produced it using the Cortex Code session id, which is the same in the traces and in the developer hook. That is what makes cost per developer, branch and pull request possible.
No sessions yet?
Snowflake delivers traces on a best-effort basis and ACCOUNT_USAGE views can lag by a few hours, so recent activity can take a while to appear. The app refreshes every hour. If nothing appears at all, check that the grant above succeeded and that Cortex Code is enabled for the account.
Next steps
- Give auditors access to the dashboard.
- Connect developer machines so sessions carry a branch and commit.
- Understand how cost is calculated from these sources.