Skip to content

Instantly share code, notes, and snippets.

View spotakash's full-sized avatar

akash spotakash

View GitHub Profile
@spotakash
spotakash / Appinsight_Aifoundry_TokenCount_Tracing
Last active February 23, 2026 06:37
🧠 KQL for GenAI Token Tracking (Agent + Model Level) This query aggregates LLM token usage (input, output, cached) across telemetry tables in Application Insights, grouped by: gen_ai.agent.id → Agent identifier name → Model name ⚙️ Key Challenges customMeasurements is dynamic JSON → requires explicit extraction Telemetry is inconsistent across e…
union isfuzzy=true
availabilityResults,
requests,
exceptions,
pageViews,
traces,
customEvents,
dependencies
| where customDimensions contains "gen_ai.agent.id"
| extend agentId = tostring(customDimensions["gen_ai.agent.id"])
@spotakash
spotakash / gist:4bc049fa4297ccec463e98dd55dd4ee1
Created November 24, 2025 10:29
📘 Azure Resource Graph Query — AKS Node Pools (K8s Version, Node OS Version, Node OS SKU)
This Azure Resource Graph (ARG) query retrieves AKS node pool details directly from the AKS cluster resource using the embedded agentPoolProfiles schema.
It extracts:
Kubernetes version → currentOrchestratorVersion
Node OS image version → nodeImageVersion
Node OS SKU → osSKU
Node count (works despite count being a reserved keyword)
@spotakash
spotakash / azcli_ephemeralodiskskuwithaz.sh
Last active September 18, 2025 07:29
Azure CLI script to list VM SKUs available in a specific region that support Ephemeral OS Disk, including the number of Availability Zones they are offered in, scoped to the currently logged-in subscription and session
#!/bin/bash
set +H
# Set your region
REGION=eastasia # Change to your desired region
# List VM SKUs in the region that support Ephemeral OS Disk and show AZ support
az vm list-skus \
-l $REGION \
--all \