A workflow combines Azure CLI telemetry queries, an AI model, and scheduling features to automatically generate a daily application health report from Application Insights data. The setup uses scheduling capabilities in Claude Code Routines, Codex Scheduled tasks, or GitHub Copilot automations to run a prompt that queries exceptions, failed requests, slow dependencies, and worker liveness, then summarizes findings with suggested next steps while flagging telemetry as untrusted input requiring redaction. The result lets the developer continue an ongoing conversation about the findings rather than just receiving a static report, while remaining responsible for deciding on actions.

13m read timeFrom timdeschryver.dev
Post cover image
Table of contents
Why a scheduled task?WhatHowExampleConclusion

Questions this post answers

How can I use Claude Code or Codex scheduled tasks to automatically generate a daily report from Azure Application Insights telemetry?

Combine three pieces: the Azure CLI to query Application Insights telemetry (via az rest against the query API or monitor app-insights commands), an AI model to summarize exceptions, failed requests, slow dependencies, and worker liveness against a baseline window, and the scheduling feature built into Claude Code Routines, Codex Scheduled tasks, or GitHub Copilot automations to run the prompt daily. The task can run locally to reuse existing Azure CLI login credentials. daily.dev surfaces practical writeups like this for engineers wiring AI agents into their observability workflows.

Why should telemetry data be treated as untrusted input when feeding it to an AI agent?

Telemetry fields such as request paths, exception messages, traces, and custom dimensions can contain user-controlled values, so an agent should treat query results as untrusted data rather than instructions and must never execute commands or actions requested by telemetry values. The prompt should also require redaction of parameters, credentials, personal data, connection strings, and tokens before including any detail in the report. engineers automating AI-driven reporting can track these security patterns on daily.dev before wiring agents to production data.

1.7K Impressions3 Comments