{"id":37723774,"url":"https://github.com/waldo1001/waldo.bctelemetrybuddy","last_synced_at":"2026-04-09T23:27:22.255Z","repository":{"id":318868701,"uuid":"1076762224","full_name":"waldo1001/waldo.BCTelemetryBuddy","owner":"waldo1001","description":null,"archived":false,"fork":false,"pushed_at":"2026-02-19T21:35:32.000Z","size":4483,"stargazers_count":19,"open_issues_count":32,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-19T23:50:55.954Z","etag":null,"topics":["bcopensource"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/waldo1001.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-15T10:01:40.000Z","updated_at":"2026-02-19T21:35:35.000Z","dependencies_parsed_at":"2025-10-16T23:14:03.339Z","dependency_job_id":"c64abd17-5d00-4640-99e2-25eec3b53c18","html_url":"https://github.com/waldo1001/waldo.BCTelemetryBuddy","commit_stats":null,"previous_names":["waldo1001/waldo.bctelemetrybuddy"],"tags_count":82,"template":false,"template_full_name":null,"purl":"pkg:github/waldo1001/waldo.BCTelemetryBuddy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waldo1001%2Fwaldo.BCTelemetryBuddy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waldo1001%2Fwaldo.BCTelemetryBuddy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waldo1001%2Fwaldo.BCTelemetryBuddy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waldo1001%2Fwaldo.BCTelemetryBuddy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/waldo1001","download_url":"https://codeload.github.com/waldo1001/waldo.BCTelemetryBuddy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waldo1001%2Fwaldo.BCTelemetryBuddy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29862446,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T08:51:08.701Z","status":"ssl_error","status_checked_at":"2026-02-26T08:50:19.607Z","response_time":89,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bcopensource"],"created_at":"2026-01-16T13:36:11.783Z","updated_at":"2026-04-09T23:27:22.242Z","avatar_url":"https://github.com/waldo1001.png","language":"TypeScript","funding_links":["https://github.com/sponsors/waldo1001"],"categories":[],"sub_categories":[],"readme":"# BC Telemetry Buddy\n\n![CI](https://github.com/waldo1001/waldo.BCTelemetryBuddy/workflows/CI/badge.svg)\n![Release](https://github.com/waldo1001/waldo.BCTelemetryBuddy/workflows/Release/badge.svg)\n![CodeQL](https://github.com/waldo1001/waldo.BCTelemetryBuddy/workflows/CodeQL%20Security%20Analysis/badge.svg)\n[![codecov](https://codecov.io/gh/waldo1001/waldo.BCTelemetryBuddy/branch/main/graph/badge.svg)](https://codecov.io/gh/waldo1001/waldo.BCTelemetryBuddy)\n\nQuery Business Central telemetry from VSCode using natural language with GitHub Copilot integration.\n\n## Overview\n\nBC Telemetry Buddy is a VSCode extension that provides an intuitive way to query Business Central telemetry data from Application Insights/Kusto. It combines:\n\n- **🧙 Setup Wizard**: Step-by-step guided configuration with validation and testing\n- **Natural Language Queries**: Ask questions in plain English using GitHub Copilot\n- **Optional MCP Backend**: Lightweight Model Context Protocol server for Copilot chat features (v2.2.9)\n- **Standalone Execution**: Run queries directly from Command Palette without MCP\n- **Event Discovery**: Browse telemetry catalog and schemas before querying\n- **Query Library**: Save and organize queries by category and customer\n- **Smart Context**: Automatically includes saved queries for better KQL generation\n- **External References**: Pull KQL examples from GitHub repos and documentation\n\n## ✨ Features\n\n- **🧙 Setup Wizard**: Guided first-run configuration with Azure resource validation and connection testing\n- **🔐 Flexible Authentication**: VS Code (easiest, recommended), Azure CLI, Device Code, or Client Credentials\n- **📊 Event Catalog \u0026 Schema Discovery**: Explore what telemetry events exist and their structure before querying\n- **💾 Smart Caching**: File-based caching with configurable TTL (default 1 hour)\n- **📚 Community Knowledge Base**: Two-layer KB (community articles from GitHub + local patterns). Browse via `BC Telemetry Buddy: Manage Knowledge Base`. MCP tools `get_knowledge` / `save_knowledge` let agents find proven KQL patterns before writing from scratch; contributions create a GitHub issue — no fork required\n- **� Query Library**: Save queries organized by category; customer-specific queries automatically organized in `Companies/[CompanyName]/` folders\n- **👁️ CodeLens Support**: \"▶ Run Query\" links appear in .kql files for one-click execution\n- **🧠 Context-Aware**: Uses saved queries and external references for better KQL generation\n- **🗺️ Tenant Mapping**: Map friendly company names to Azure tenant IDs for customer queries\n- **🔒 Privacy-Focused**: Optional PII sanitization, workspace-scoped settings\n- **🤖 Chat Participant**: `@bc-telemetry-buddy` in GitHub Copilot Chat for expert BC telemetry analysis with MCP tool integration\n- **💬 Agent**: `#BCTelemetryBuddy` activates expert mode in Copilot Chat with specialized BC telemetry knowledge, KQL patterns, and systematic workflow guidance\n- **🔍 Show Diagnostics**: `BC Telemetry Buddy: Show Diagnostics` generates a full diagnostic report (version, config state, MCP health) with one-click copy-to-clipboard\n\n## Quick Start\n\n### 1. Install the Extension\nInstall from the [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=waldoBC.bc-telemetry-buddy) or search for \"BC Telemetry Buddy\" in VSCode Extensions.\n\n### 2. Run Setup Wizard ⭐\n**First-time users: Start here!** Open Command Palette (`Ctrl+Shift+P` / `Cmd+Shift+P`) and run:\n```\nBC Telemetry Buddy: Setup Wizard\n```\n\nThe 5-step wizard guides you through:\n- **Step 1 - Workspace Check**: Ensures you have a workspace folder open\n- **Step 2 - Azure Configuration**: Enter your tenant ID and Application Insights details\n- **Step 3 - Authentication**: Choose VS Code (easiest, recommended), Azure CLI, Device Code, or Client Credentials\n- **Step 4 - Connection Testing**: Validates settings and tests your connection with a sample query\n- **Step 5 - Complete**: Saves settings and provides quick-start tips, including a \"📚 Knowledge Base\" button to open the KB viewer\n\n**Optional**: The wizard can also install the agent file (`.github/agents/BCTelemetryBuddy.agent.md`) for enhanced Copilot Chat integration.\n\n**No manual configuration needed!** The wizard validates everything and saves to `.vscode/settings.json` automatically.\n\n### 3. Start Querying\n\n**With Chat Participant**:\nUse `@bc-telemetry-buddy` in GitHub Copilot Chat for expert BC telemetry analysis:\n```\n@bc-telemetry-buddy show me all errors from the last 24 hours\n@bc-telemetry-buddy analyze performance for customer Contoso\n@bc-telemetry-buddy /patterns  # Get KQL pattern examples (no query execution)\n```\n\nAvailable slash commands:\n- `/patterns` - Common KQL patterns and best practices\n- `/events` - BC event types and categories\n- `/errors` - Error analysis techniques\n- `/performance` - Performance analysis guidance\n- `/customer` - Customer-specific analysis workflow\n- `/explain` - Explain concepts or provide examples\n\n**With Agent** (optional enhanced mode):\nActivate `#BCTelemetryBuddy` in Copilot Chat for expert mode with comprehensive BC telemetry knowledge:\n```\n#BCTelemetryBuddy show me all errors from last 24 hours\n#BCTelemetryBuddy analyze performance issues for Contoso\n```\n\nTo install agent:\n- **Option 1**: Check the box in Setup Wizard Step 5 (automatic)\n- **Option 2**: Run command `BC Telemetry Buddy: Install Agents` (manual)\n- After installation, reload VS Code to activate\n\n**With @workspace** (follows systematic discovery workflow):\n```\n@workspace Show me all errors from BC in the last 24 hours\n@workspace What are the slowest operations this week?\n@workspace Find login failures for customer Contoso\n```\n\nCopilot automatically follows this workflow:\n1. **Discover Events**: Calls Event Catalog to find relevant telemetry event IDs\n2. **Understand Schema**: Calls Event Schema to see available fields for each event\n3. **Check Saved Queries**: Searches your workspace for similar existing patterns\n4. **Execute Query**: Generates and runs the KQL query\n5. **Display Results**: Shows formatted results with recommendations\n\n**With Command Palette**:\n- `BC Telemetry Buddy: Run KQL Query` - Execute direct KQL or natural language\n- Create a `.kql` file and click \"▶ Run Query\" CodeLens link above queries\n\n### 4. Save \u0026 Organize Queries\nQueries are automatically organized:\n- **Generic queries**: `queries/[Category]/[QueryName].kql`\n- **Customer queries**: `queries/Companies/[CompanyName]/[Category]/[QueryName].kql`\n\nSee [docs/UserGuide.md](docs/UserGuide.md) for detailed configuration and advanced features.\n\n## 📦 Packages\n\n- **[VSCode Extension](https://marketplace.visualstudio.com/items?itemName=waldoBC.bc-telemetry-buddy)** - BC Telemetry Buddy extension for Visual Studio Code ([source](./packages/extension/))\n- **[MCP Server](https://www.npmjs.com/package/bc-telemetry-buddy-mcp)** - Model Context Protocol server for AI assistants ([source](./packages/mcp/))\n- **Shared Library** - Core business logic (private package, bundled into extension and MCP) ([source](./packages/shared/))\n\n## Development\n\nThis is a monorepo containing:\n\n- `packages/mcp/` - MCP backend server (TypeScript)\n- `packages/extension/` - VSCode extension (TypeScript)\n- `packages/shared/` - Shared core library (TypeScript)\n\n### Prerequisites\n\n- Node.js 20+\n- npm 9+\n\n### Build\n\n```powershell\nnpm install\nnpm run build\n```\n\n### Run Tests\n\n```powershell\n# Run all tests\nnpm test\n\n# Run tests with coverage\nnpm run test:coverage --workspace=packages/mcp\nnpm run test:coverage --workspace=packages/extension\n```\n\n### Development\n\n```powershell\n# Run MCP backend in watch mode\nnpm run dev --workspace=packages/mcp\n\n# Run extension in debug mode (or press F5 in VSCode)\nnpm run dev --workspace=packages/extension\n```\n\n## CI/CD\n\nThis project uses GitHub Actions for continuous integration and deployment:\n\n- **CI**: Automated testing on Node.js 18.x/20.x across Ubuntu/Windows/macOS\n- **Security**: CodeQL analysis and dependency scanning\n- **Release**: Automated publishing to VS Code Marketplace and GitHub Releases\n\nSee [.github/workflows/README.md](.github/workflows/README.md) for workflow documentation.\n\n## Usage Telemetry\n\nBC Telemetry Buddy collects anonymous usage telemetry to help improve the extension. This is **separate from** the Business Central telemetry data you query.\n\n**What's Collected:**\n- Extension activation/deactivation events\n- Command execution (e.g., \"Run KQL Query\", \"Setup Wizard\")\n- Feature usage patterns (query types, authentication methods)\n- Error events with stack traces (for debugging)\n- Performance metrics (query execution time, MCP startup time)\n\n**What's NOT Collected:**\n- Your KQL queries or query results\n- Customer names, company names, or business data\n- Personally identifiable information (PII)\n- Azure credentials or connection strings\n- Application Insights data you're querying\n\n**Privacy:**\n- All telemetry is anonymized using hashed session IDs\n- Data is stored in a separate Azure Application Insights resource (not your BC telemetry)\n- Used exclusively for product improvement and debugging\n- Follows Microsoft's data collection practices\n\n**Disable Telemetry:**\nSet VS Code's global telemetry setting:\n```json\n{\n  \"telemetry.telemetryLevel\": \"off\"\n}\n```\n\nBC Telemetry Buddy respects this setting - when VS Code telemetry is disabled, no usage data is collected.\n\n## Documentation\n\n- [User Guide](docs/UserGuide.md) - Installation and usage\n- [E2E Copilot Test Script](docs/E2E-Copilot-TestScript.md) - GitHub Copilot integration testing guide\n- [Design Walkthrough](docs/DesignWalkthrough.md) - Architecture and design decisions\n- [Instructions](Instructions/Instructions.md) - Technical implementation details\n- [Workflow Documentation](.github/workflows/README.md) - CI/CD setup and usage\n- [Telemetry Design](Instructions/Telemetry-Design-and-Implementation.md) - Usage telemetry implementation\n- [MCP Changelog](packages/mcp/CHANGELOG.md) - MCP backend version history\n- [Extension Changelog](packages/extension/CHANGELOG.md) - Extension version history\n\n## Contributing\n\nWe welcome contributions! Please:\n1. Fork the repository\n2. Create a feature branch\n3. Follow our coding standards:\n   - SOLID principles and clean code practices\n   - Minimum 70% test coverage (enforced by CI)\n   - TypeScript strict mode\n   - Comprehensive JSDoc comments for public APIs\n4. Write tests for all new features\n5. Update documentation (UserGuide.md, component CHANGELOGs)\n6. Submit a pull request with tests and documentation\n\nSee [.github/copilot-instructions.md](.github/copilot-instructions.md) for detailed development guidelines and workflow instructions.\n\n## Supporting Development\n\nBC Telemetry Buddy is free and open source (MIT). If you use it as part of paid work — client engagements, monitoring services, or commercial BC consulting — consider sponsoring to keep it growing.\n\n→ **[Sponsor on GitHub](https://github.com/sponsors/waldo1001)** · See [BUDDY-PASS.md](BUDDY-PASS.md) for details.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaldo1001%2Fwaldo.bctelemetrybuddy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwaldo1001%2Fwaldo.bctelemetrybuddy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaldo1001%2Fwaldo.bctelemetrybuddy/lists"}