Azure / Azure/azure-functions-host

WEBSITE_SLOT_NAME app setting value is the same in both staging and production slots

Open
#7,383 6 comments 1 reaction 0 assignees View on GitHub
Needs: Attention :wave:
Dominant language
C#
Stars
2k
Forks
482
Avg merge
2d 12h
Merged PRs (30d)
38

Description

Hello,

We recently noticed that the WEBSITE_SLOT_NAME app setting has the same value of "staging" in both the staging and production slots used by one of our function apps. This does not appear to have any impact on the functionality of our apps in either slot. It also appears to have no impact on swapping the slots. However, it is possibly causing an issue in app insights where the "cloud_RoleName" is set to the same value for all log data there, which could make it difficult to discern between which slot the logs originated from. See [potentially related issue here](https://github.com/Azure/azure-webjobs-sdk/issues/1366).

I'm not sure if this has anything to do with it, but worth mentioning that at one point the slots were originally set up to auto-swap. We have since moved away from auto-swapping, but still experience the issue.

#### Investigative information

- Timestamp: 2021-05-19T20:31:10.7258311Z
- Function App version: 3.0.15584.0
- Invocation ID: 7ecec7e5-6e28-46d9-875c-734a3e62182b
- Region: Central US

#### Repro steps

Unable to reproduce in any other apps. Many other apps we use follow this same setup without issue.

#### Expected behavior

Expected behavior is that the WEBSITE_SLOT_NAME app setting is different (and correct) between the slots. Also, app insights should have the correct cloud_RoleName when logging from different slots.

#### Actual behavior

WEBSITE_SLOT_NAME has the same value of "staging" on both slots, and app insights is reporting the same cloud_RoleName with "-staging" appended on the end for log data originating from either slot.

#### Known workarounds

None.

#### Related information

* Programming language used - C#

Contributor guide

Open the contributing guide

Research direction

Start by comparing WEBSITE_SLOT_NAME and cloud_RoleName in the staging and production slots described in the report, then review the potentially related azure-webjobs-sdk issue 1366. The issue provides no reproducible steps or files and says other apps do not show the problem; done would mean determining why the values match and confirming that logs distinguish the two slots.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp
Domain
backend, cloud, observability-sre
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.