Skip to content

Add polyglot exports for ApplicationInsights#14751

Merged
davidfowl merged 1 commit intorelease/13.2from
sebros/polyglot-appinsight
Feb 27, 2026
Merged

Add polyglot exports for ApplicationInsights#14751
davidfowl merged 1 commit intorelease/13.2from
sebros/polyglot-appinsight

Conversation

@sebastienros
Copy link
Copy Markdown
Contributor

Related to #14069

Copilot AI review requested due to automatic review settings February 26, 2026 23:19
@github-actions
Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 14751

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 14751"

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Aspire Type System (ATS) exports for the Azure Application Insights integration so it’s callable from TypeScript AppHosts, and introduces a TypeScript ValidationAppHost to exercise the exported surface.

Changes:

  • Added [AspireExport] for AddAzureApplicationInsights and WithLogAnalyticsWorkspace, and [AspireExportIgnore] for non-ATS-friendly overloads.
  • Added a new playground/polyglot/TypeScript/.../ValidationAppHost for Azure Application Insights.
  • Updated .gitignore TypeScript AppHost ignore rules (notably affecting .modules/).

Reviewed changes

Copilot reviewed 9 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/Aspire.Hosting.Azure.ApplicationInsights/AzureApplicationInsightsExtensions.cs Exports/ignores specific overloads for ATS/polyglot compatibility.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.ApplicationInsights/ValidationAppHost/apphost.ts Exercises the exported Application Insights + Log Analytics APIs from TypeScript.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.ApplicationInsights/ValidationAppHost/apphost.run.json Adds a run profile for the validation apphost.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.ApplicationInsights/ValidationAppHost/.aspire/settings.json Declares TypeScript AppHost settings + package references.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.ApplicationInsights/ValidationAppHost/package.json Defines TS build/run dependencies for the validation apphost.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.ApplicationInsights/ValidationAppHost/package-lock.json Locks npm dependencies for the validation apphost.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.ApplicationInsights/ValidationAppHost/tsconfig.json TS compiler configuration for the validation apphost.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.ApplicationInsights/ValidationAppHost/.modules/transport.ts Adds generated TS SDK transport/runtime module.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.ApplicationInsights/ValidationAppHost/.modules/base.ts Adds generated TS SDK base types module.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.ApplicationInsights/ValidationAppHost/.modules/.codegen-hash Adds generated codegen hash marker.
.gitignore Adjusts ignore rules for TypeScript AppHost outputs.
Files not reviewed (1)
  • playground/polyglot/TypeScript/Aspire.Hosting.Azure.ApplicationInsights/ValidationAppHost/package-lock.json: Language not supported
Comments suppressed due to low confidence (1)

playground/polyglot/TypeScript/Aspire.Hosting.Azure.ApplicationInsights/ValidationAppHost/.modules/transport.ts:4

  • These .modules/* files are code-generated SDK artifacts (the presence of .codegen-hash indicates this) and typically shouldn’t be committed as source. Committing generated modules makes PRs noisy and risks them getting out of sync with the current ATS capability surface; prefer generating them on first run (per polyglot-apphost spec) and keeping them ignored by git.
// transport.ts - ATS transport layer: RPC, Handle, errors, callbacks
import * as net from 'net';
import * as rpc from 'vscode-jsonrpc/node.js';

@github-actions
Copy link
Copy Markdown
Contributor

🎬 CLI E2E Test Recordings

The following terminal recordings are available for commit c550ca5:

Test Recording
AddPackageInteractiveWhileAppHostRunningDetached ▶️ View Recording
AddPackageWhileAppHostRunningDetached ▶️ View Recording
AgentCommands_AllHelpOutputs_AreCorrect ▶️ View Recording
AgentInitCommand_MigratesDeprecatedConfig ▶️ View Recording
AgentInitCommand_WithMalformedMcpJson_ShowsErrorAndExitsNonZero ▶️ View Recording
AspireUpdateRemovesAppHostPackageVersionFromDirectoryPackagesProps ▶️ View Recording
Banner_DisplayedOnFirstRun ▶️ View Recording
Banner_DisplayedWithExplicitFlag ▶️ View Recording
CreateAndDeployToDockerCompose ▶️ View Recording
CreateAndDeployToDockerComposeInteractive ▶️ View Recording
CreateAndPublishToKubernetes ▶️ View Recording
CreateAndRunAspireStarterProject ▶️ View Recording
CreateAndRunAspireStarterProjectWithBundle ▶️ View Recording
CreateAndRunJsReactProject ▶️ View Recording
CreateAndRunPythonReactProject ▶️ View Recording
CreateEmptyAppHostProject ▶️ View Recording
CreateStartAndStopAspireProject ▶️ View Recording
CreateStartWaitAndStopAspireProject ▶️ View Recording
CreateTypeScriptAppHostWithViteApp ▶️ View Recording
DescribeCommandResolvesReplicaNames ▶️ View Recording
DescribeCommandShowsRunningResources ▶️ View Recording
DetachFormatJsonProducesValidJson ▶️ View Recording
DoctorCommand_DetectsDeprecatedAgentConfig ▶️ View Recording
DoctorCommand_WithSslCertDir_ShowsTrusted ▶️ View Recording
DoctorCommand_WithoutSslCertDir_ShowsPartiallyTrusted ▶️ View Recording
LogsCommandShowsResourceLogs ▶️ View Recording
PsCommandListsRunningAppHost ▶️ View Recording
PsFormatJsonOutputsOnlyJsonToStdout ▶️ View Recording
SecretCrudOnDotNetAppHost ▶️ View Recording
SecretCrudOnTypeScriptAppHost ▶️ View Recording
StagingChannel_ConfigureAndVerifySettings_ThenSwitchChannels ▶️ View Recording
StopAllAppHostsFromAppHostDirectory ▶️ View Recording
StopAllAppHostsFromUnrelatedDirectory ▶️ View Recording
StopNonInteractiveMultipleAppHostsShowsError ▶️ View Recording
StopNonInteractiveSingleAppHost ▶️ View Recording
StopWithNoRunningAppHostExitsSuccessfully ▶️ View Recording

📹 Recordings uploaded automatically from CI run #22465468429

@davidfowl davidfowl merged commit 143332f into release/13.2 Feb 27, 2026
350 checks passed
@davidfowl davidfowl deleted the sebros/polyglot-appinsight branch February 27, 2026 00:06
@dotnet-policy-service dotnet-policy-service bot added this to the 13.2 milestone Feb 27, 2026
@github-actions github-actions bot locked and limited conversation to collaborators Mar 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants