Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add alexpizarro/azure-lean-stack-skills --skill instrumenting-azure-app-insightsgit clone --depth 1 https://github.com/alexpizarro/azure-lean-stack-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/alexpizarro/azure-lean-stack-skills/instrumenting-azure-app-insights)<a href="https://agentmods.dev/skills/alexpizarro/azure-lean-stack-skills/instrumenting-azure-app-insights"><img src="https://agentmods.dev/badge/skills/alexpizarro/azure-lean-stack-skills/instrumenting-azure-app-insights/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/alexpizarro/azure-lean-stack-skills/instrumenting-azure-app-insights"><img src="https://agentmods.dev/badge/skills/alexpizarro/azure-lean-stack-skills/instrumenting-azure-app-insights.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00087 | $0.01418 |
| Opus 5 | $0.00044 | $0.00709 |
| Sonnet 5 | $0.00017 | $0.00284 |
| Haiku 4.5 | $0.00009 | $0.00142 |
Grade A, and why
instrumenting-azure-app-insights scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 183 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Instrumenting Azure Application Insights
Workspace-based Application Insights with cost guardrails. Classic (non-workspace) App Insights is retiring, so this is the only forward-compatible setup.
When to invoke
- Adding observability to a new project
- Migrating off classic Application Insights
- Setting up failure-rate alerts that page an owner
- Auditing observability cost on an existing app
The two-resource setup
App Insights now sits on top of a Log Analytics workspace:
Log Analytics Workspace ← cost guardrail lives here (dailyQuotaGb)
↑
│ WorkspaceResourceId
│
Application Insights component ← what the SDK talks to
↑
│ APPLICATIONINSIGHTS_CONNECTION_STRING
│
Your app's instrumented SDK
Workspace owns:
- Retention (
retentionInDays: 30default; max 730) - Daily quota cap (
workspaceCapping.dailyQuotaGb: 1) - All actual data storage
App Insights component owns:
- The connection string the SDK uses
- Per-app filtering / sampling rules
Cost guardrail: dailyQuotaGb
The single most important setting. Without it, a runaway log loop can ingest 100+ GB and bill hundreds of dollars overnight.
resource workspace 'Microsoft.OperationalInsights/workspaces@2023-09-01' = {
properties: {
sku: { name: 'PerGB2018' }
retentionInDays: 30
workspaceCapping: { dailyQuotaGb: 1 } // ← hard daily cap
}
}
Rule of thumb:
- Hobby / low-traffic: 1 GB/day cap (~$2/month at default rates)
- Small SaaS: 5 GB/day cap
- Production with structured logging: start at 5, monitor, raise as needed
Once the cap is hit, ingestion is paused for the rest of the UTC day. You'll lose log lines but not the bill.
Optional metric alerts
When alertEmail is non-empty, the module creates:
- Action Group — sends to the email (could be extended to SMS, webhook, etc.)
- 5xx alert — fires if
requests/failed > 5in any 15-min window - Exceptions alert — fires if
exceptions/server > 5in any 15-min window
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 12d ago First seen · 183 lines · 87 tokens per session scan A 9878c02746db
instrumenting-azure-app-insights is a skill published in the GitHub repository alexpizarro/azure-lean-stack-skills (1 stars, last pushed 1mo ago), licensed MIT. It adds 87 tokens to every session and 1,418 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
azure-expert
Expert-level Microsoft Azure cloud platform, services, and architecture. Use when the user mentions cloud, Microsoft platforms, Azure Functions, or Cosmos DB.
azure-mgmt-applicationinsights-dotnet
Azure Application Insights SDK for .NET. Application performance monitoring and observability resource management. Use for creating Application Insights components, web tests, workbooks, analytics items, and API keys. Triggers: "Application Insights", "ApplicationInsights", "App Insights", "APM", "application…
azure-resource-manager-mysql-dotnet
Azure MySQL Flexible Server SDK for .NET. Database management for MySQL Flexible Server deployments. Use for creating servers, databases, firewall rules, configurations, backups, and high availability. Triggers: "MySQL", "MySqlFlexibleServer", "MySQL Flexible Server", "Azure Database for MySQL", "MySQL database…
azure-eventhub-dotnet
Azure Event Hubs SDK for .NET. Use for high-throughput event streaming: sending events (EventHubProducerClient, EventHubBufferedProducerClient), receiving events (EventProcessorClient with checkpointing), partition management, and real-time data ingestion. Triggers: "Event Hubs", "event streaming"…
azure-mgmt-fabric-dotnet
Azure Resource Manager SDK for Fabric in .NET. Use for MANAGEMENT PLANE operations: provisioning, scaling, suspending/resuming Microsoft Fabric capacities, checking name availability, and listing SKUs via Azure Resource Manager. Triggers: "Fabric capacity", "create capacity", "suspend capacity", "resume capacity"…
azure-resource-manager-durabletask-dotnet
Azure Resource Manager SDK for Durable Task Scheduler in .NET. Use for MANAGEMENT PLANE operations: creating/managing Durable Task Schedulers, Task Hubs, and retention policies via Azure Resource Manager. Triggers: "Durable Task Scheduler", "create scheduler", "task hub", "DurableTaskSchedulerResource", "provision…