feat: generic token usage tracking implementation#294
Merged
Roopan-Microsoft merged 7 commits intoJun 18, 2026
Conversation
…ersion and remove deployment/workbook changes - Updated llm_token_telemetry.py (processor + backend-api) to match Ajit's latest from customer-chatbot PR microsoft#236 (adds perf counters, emit timing, slow-emit warnings, batch overhead tracking) - Removed workbook/dashboard files (deploy-workbooks.ps1, KQL queries, workbook JSON files, tokenUsageWorkbook.bicep) - Reverted infra changes (main.bicep, main_custom.bicep, main.parameters.json) - Reverted Dockerfile changes (frontend, processor) - Removed test file (test_llm_token_telemetry.py) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The lockfile was missing the azure-monitor-events-extension and azure-monitor-opentelemetry packages, causing uv sync --frozen in Docker to skip them. This made the emitter silently disabled. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ict-resolve-token-usage
Roopan-Microsoft
approved these changes
Jun 18, 2026
9ecb205
into
microsoft:psl-sw/37816-app-insights-telemetry
2 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
LLM Token Usage Dashboard Solution:
Deployment Automation:
Added the deploy-workbooks.ps1 PowerShell script to automate deployment of LLM token usage dashboards for both GKE and EKS clusters. The script uploads the corresponding workbook JSON content to Azure using the provided resource group and Application Insights resource ID.
Analytics and Visualization:
Added token-usage-queries.kql, a library of KQL queries for Application Insights/Log Analytics, enabling detailed analysis of token usage by agent, model, workflow step, user, and time trends, as well as cost estimation.
Introduced workbook-eks-content.json, a ready-to-deploy Azure Workbook dashboard for EKS, featuring summary tiles, tables, charts, and cost estimation, all parameterized by time range.
Does this introduce a breaking change?
Golden Path Validation
Deployment Validation
What to Check
Verify that the following are valid
Other Information