Skip to content

[SVLS-8622] add web app slot support#2130

Merged
ava-silver merged 10 commits intomasterfrom
ava.silver/svls-8622/add-web-app-slot-support
Mar 2, 2026
Merged

[SVLS-8622] add web app slot support#2130
ava-silver merged 10 commits intomasterfrom
ava.silver/svls-8622/add-web-app-slot-support

Conversation

@ava-silver
Copy link
Contributor

@ava-silver ava-silver commented Feb 25, 2026

What and why?

This PR adds support for Azure Web App deployment slots in the AAS (Azure App Service) instrumentation commands. Previously, the CLI only supported instrumenting main Web Apps, but Azure allows creating deployment slots for staging, testing, and blue-green deployments. This enhancement enables users to instrument and uninstrument specific deployment slots.

Also, to be more clear on language, opts for 'Web App' as the resource type instead of the more generic 'App Service'. I'll make a follow up PR to also update the command to have web-app as an alias for the scope

I also discovered a bug in the windows runtime detection which I've fixed, where sometimes a nodejs app will not be properly identified since it uses the weird convention of requiring a specific env var to be set. Sometimes, the netFrameworkVersion is specified even for other runtimes, so we should check the other runtimes first, and then check the netFrameworkVersion as a last resort.

How?

  • Added a new --slot parameter to specify the slot name for instrumentation
  • Updated the WebApp interface to include an optional slot property
  • Modified Azure resource ID parsing to handle slot-specific resource paths (e.g., /sites/{name}/slots/{slotName})
  • Updated all Azure API calls to use slot-specific methods when a slot is specified (e.g., getSlot, restartSlot, updateApplicationSettingsSlot)
  • Added utility functions renderWebApp and resourceIdSegment for consistent display and resource path generation
  • Updated command descriptions and documentation to reflect "Web App (or slot)" terminology
  • Updated the env var fetching to happen at the beginning which allows them to be properly used for the windows node case.

Validation

I've done some thorough manual testing with web apps and validating that telemetry comes through, and I've also added/updated the unit tests in the plugin.

Review checklist

  • Feature or bugfix MUST have appropriate tests (unit, integration)

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@ava-silver ava-silver added enhancement New feature or request serverless Related to [aas, cloud-run, lambda, stepfunctions] labels Feb 25, 2026 — with Graphite App
@ava-silver ava-silver force-pushed the ava.silver/svls-8622/add-web-app-slot-support branch from 176ebd3 to fd756c0 Compare February 26, 2026 17:24
@ava-silver ava-silver marked this pull request as ready for review February 27, 2026 18:43
@ava-silver ava-silver requested review from a team as code owners February 27, 2026 18:43
@iadjivon iadjivon self-assigned this Feb 27, 2026
Co-authored-by: Tal Usvyatsky <18072279+TalUsvyatsky@users.noreply.github.com>
@ava-silver ava-silver requested a review from Drarig29 March 2, 2026 14:17
Copy link
Contributor

@Drarig29 Drarig29 left a comment

Choose a reason for hiding this comment

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

LGTM

@ava-silver ava-silver merged commit 496b504 into master Mar 2, 2026
67 of 72 checks passed
@ava-silver ava-silver deleted the ava.silver/svls-8622/add-web-app-slot-support branch March 2, 2026 14:42
@vishal-joshi-datadog vishal-joshi-datadog mentioned this pull request Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request serverless Related to [aas, cloud-run, lambda, stepfunctions]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants