Skip to content

Using AppService deployment slots results in mixed up telemetry #13660

@eerhardt

Description

@eerhardt

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

When using deployment slots in AppService, once you "slot swap" all the telemetry will go to the last slot being swapped.

Looking at the environment variables in my settings, my main slot says:

Image

note that the OTEL_SERVICE_NAME is server-dev.

Looking at the dev slot, it says the same:

Image

This means both slots are sending telemetry to the same location in the dashboard.

Expected Behavior

When viewing telemetry in the dashboard, each "slot" should send telemetry to separate services so you can see how your main and dev slots are operating.

Steps To Reproduce

Using the following apphost code:

var slotName = builder.AddParameter("slotName");
builder.AddAzureAppServiceEnvironment("env")
    .WithDeploymentSlot(slotName);

var server = builder.AddProject<Projects.pytest2_Server>("server")
    .WithHttpHealthCheck("/health")
    .WithExternalHttpEndpoints();

aspire deploy your app with a dev slot.

Change some code and deploy again. This will make the new version go to the dev slot.

Perform a "slot swap" so the new version is now the "main".

Look at your traces and metrics in the dashboard. You should still see separate metrics for each slot.

Exceptions (if any)

No response

.NET Version info

No response

Anything else?

cc @ShilpiRach

Metadata

Metadata

Labels

area-integrationsIssues pertaining to Aspire Integrations packagesazureIssues associated specifically with scenarios tied to using Azureazure-app-service

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions