Add customer Application Insights telemetry to mobile app skill - #476
Add customer Application Insights telemetry to mobile app skill#476Prabhat Ojha (prabhatojha) wants to merge 5 commits into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e2aed632-0a43-491c-a5f4-53f305d12657
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e2aed632-0a43-491c-a5f4-53f305d12657
|
Prabhat Ojha (@prabhatojha) please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
There was a problem hiding this comment.
Pull request overview
This PR adds customer-owned Application Insights telemetry support to the mobile-apps plugin by wiring app.json’s expo.extra.appInsightsConfig into the runtime (PowerAppsProvider) and updating the /create-mobile-app workflow and planner/builder agent guidance so telemetry stays out of connector/data-model planning while still enabling explicit, opt-in customer event emission.
Changes:
- Pass
expo.extra.appInsightsConfigfromapp.jsonintoPowerAppsProvideronly whenenabledis true (to support the fixed Dev Player). - Add an explicit opt-in Step 6.8 to
/create-mobile-appto discover/select (or paste) a customer-owned Application Insights connection string and persist safe telemetry guidance. - Update shared instructions + planner/builder agent docs to treat Application Insights as host/runtime configuration, not a connector or data-model constraint, and to constrain customer telemetry to approved scalar properties.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| plugins/mobile-apps/template/app/_layout.tsx | Imports app.json and conditionally passes appInsightsConfig into PowerAppsProvider. |
| plugins/mobile-apps/skills/create-mobile-app/SKILL.md | Adds Step 6.8 flow for opt-in customer telemetry setup and updates workflow ordering/guardrails. |
| plugins/mobile-apps/shared/shared-instructions.md | Documents the “Application Insights is not a connector” exception in the connector-first rules. |
| plugins/mobile-apps/shared/references/connector-planning.md | Updates connector planning guidance to exclude Application Insights from connector inference and gating. |
| plugins/mobile-apps/agents/screen-planner.md | Adds per-screen “Customer telemetry” spec shape (only when explicitly requested). |
| plugins/mobile-apps/agents/screen-builder.md | Adds implementation rules for emitting customer-only telemetry via getCustomerTelemetryLogger(). |
| plugins/mobile-apps/agents/native-app-planner.md | Instructs planner to keep Application Insights outside plan gates and defer to Step 6.8. |
| plugins/mobile-apps/AGENTS.md | Records template prep rule for appInsightsConfig + adds opt-in telemetry guidance to agent rules. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| - Customer telemetry: enabled | ||
| - Customer telemetry app ID: <slug> | ||
| - Customer telemetry resource ID: <selected-resource-id or admin-provided> | ||
| - Customer telemetry destination: one C1-owned workspace-based Application Insights resource |
| - `DONE_WITH_CONCERNS` requires at least one concern. If none, use `DONE`. | ||
| - Special early-return signals (`INDUSTRY_CONFIRM_REQUESTED:`, `DESIGN_VIBE_REQUESTED:`) pre-date this protocol and remain in effect — they are special-cased "ask the user one question and re-spawn me" handoffs, not terminal returns. | ||
| - The canonical orchestrator handler lives in [`skills/create-mobile-app/SKILL.md`](./skills/create-mobile-app/SKILL.md) Step 3.0. Future skills that spawn agents should reference it rather than duplicating the switch. | ||
| 13. **Customer telemetry is Application Insights-specific and opt-in** — Each generated app targets one C1-owned, workspace-based Application Insights resource. `app.json` → `expo.extra.appInsightsConfig` defaults to disabled and stores its connection string, matching the Power Apps canvas-app model. Treat the value as sensitive project configuration: do not print it, write it to `memory-bank.md`, or include it in summaries. Keep `includeUserId` false unless explicitly approved. |
|
|
||
| **Key rule:** Dataverse is NOT a connector. If requirements mention custom business data / tables, that belongs in `## Data Model`, not `## Connectors`. | ||
|
|
||
| Application Insights telemetry is also NOT a connector. Exclude it from Gate 3 and allow planning to proceed with the actual business connectors. The orchestrator asks for the C1-owned Application Insights resource later at Step 6.8. |
There was a problem hiding this comment.
merge these changes to internal copy of template before merging here
Summary
getCustomerTelemetryLogger()with privacy-safe property guidanceappInsightsConfigfromapp.jsondirectly toPowerAppsProviderso telemetry works in the fixed Dev PlayerValidation
validate-mobile-files.jsPowerAppsNative.ApplicationStartedin a generated Dev Player app