DEVOURED
Monitoring Cortex Agent Performance With Trace Data
Monte Carlo details how to monitor Snowflake Cortex Agents in production by analyzing trace data for token consumption, latency, and errors using GET_AI_OBSERVABILITY_EVENTS.
What: Michael Segner and Virna Sekuj from Monte Carlo describe monitoring Snowflake Cortex Agents using native observability tables accessible via `SNOWFLAKE.LOCAL.GET_AI_OBSERVABILITY_EVENTS`. Key metrics include total tokens, duration (latency), and span-level status codes (e.g., STATUS_CODE_OK, STATUS_CODE_ERROR) to detect issues like context bloat or slow tool calls. This article was updated on April 29, 2026.
Why it matters: As AI agents move into production, the need for robust observability and performance monitoring becomes critical, mirroring the evolution of traditional software systems and highlighting the maturity curve for managing AI-driven applications.
Takeaway: If you are deploying Snowflake Cortex Agents, leverage `SNOWFLAKE.LOCAL.GET_AI_OBSERVABILITY_EVENTS` to build monitoring for token usage, latency, and error rates at the span level.
Deep dive
- The article outlines how to monitor Snowflake Cortex Agents by querying structured observability events.
- Snowflake Intelligence natively logs rich trace data, including conversation history, tool execution, LLM planning, and response generation.
- This trace data is stored in native observability tables and accessible via the
SNOWFLAKE.LOCAL.GET_AI_OBSERVABILITY_EVENTStable function. - Each agent interaction is composed of hierarchical spans, with
record_nameidentifying span types likechat,planning,response_generation, andtool_call. - Key performance metrics to monitor include total token consumption (prompt + completion tokens per span), duration/latency (P50, P90), and span-level status codes (
STATUS_CODE_OK,STATUS_CODE_ERROR). - Common issues like token spikes can indicate changes in input length, context window accumulation, retrieval behavior changes, or increased tool call depth.
- Monitoring completion rates (proportion of
STATUS_CODE_OKspans) is crucial for catching silent failures. - High usage volatility in early deployments requires careful tuning of monitor sensitivity and consideration of filtering to business hours for cleaner baselines.
- The article emphasizes combining signals across span types for effective troubleshooting, such as correlating high planning tokens with low tool call completion rates.
- The underlying principle is to continuously watch agent behavior, learn what "normal" looks like, and surface deviations before users notice them at scale.
Decoder
- Cortex Agent: AI agents offered by Snowflake Intelligence, designed to perform tasks by interacting with data within the Snowflake ecosystem.
- Trace data: Detailed logs of an agent's operations, capturing sequential events (spans) during a request, including planning, tool calls, and response generation.
- Span: A single operation or step within a trace, such as an LLM planning step, a tool call, or a response generation step.
- SNOWFLAKE.LOCAL.GET_AI_OBSERVABILITY_EVENTS: A Snowflake table function used to access native observability events for Cortex Agents.
Original article
Full article content is not available for inline reading.
Explore all 58 articles in today's digest
Fresh dev news, AI-digested daily. Never miss a trend at devoured.fyi