Skip to content
This repository has been archived by the owner on Jul 5, 2020. It is now read-only.

No way to know which environment generated event in Azure Web Sites #248

Closed
SergeyKanzhelev opened this issue Dec 2, 2016 · 8 comments
Closed
Assignees
Labels
Milestone

Comments

@SergeyKanzhelev
Copy link
Contributor

In beta4 we used full name with the "slot" name as instance name:

image

In beta6 we are using hash code of an instance and kept role name to be the role name of the "main" site:

image

So now there is no way to know which slot dependency was sent from. Consider adding a custom property or change the role name property

@cijothomas
Copy link
Contributor

We might need to use %WEBSITE_HOSTNAME% for Rolename instead of WEBSITE_SITE_NAME, as the former appends the 'slot' name to the sitename.
Following output from production vs dev slot of my webapp

echo %WEBSITE_HOSTNAME%
D:\home\site\wwwroot
cijo22beta6-dev.azurewebsites.net

echo %WEBSITE_HOSTNAME%
D:\home\site\wwwroot
cijo22beta6.azurewebsites.net

@cijothomas
Copy link
Contributor

%WEBSITE_HOSTNAME% combined with WEBSITE_INSTANCE_ID would be needed. Because HostName alone will not be able to distinguish between instances, and instance_id can't distinguish slots. So a combination should be used.

@cijothomas cijothomas added the bug label Dec 5, 2016
@cijothomas cijothomas added this to the 2.3-Beta1 milestone Dec 5, 2016
@cijothomas cijothomas self-assigned this Dec 5, 2016
@cijothomas cijothomas modified the milestones: 2.2, 2.3-Beta1 Dec 6, 2016
@dnduffy
Copy link
Member

dnduffy commented Dec 7, 2016

Fixed: #250

@SergeyKanzhelev
Copy link
Contributor Author

Ok, the fix was applied to send slot as a nodeName. However nodeName is not exposed neither in UI nor in analytics. So it wasn't really fixed. Consider sending it as a role name instead of a host name

Also SCM_instance_id is not used any more. What's the reason? Using instance ID as Azure Web Apps understand it can help correlate telemetry with the azure Web Site telemetry. You can even send a ping to the specific instance of Azure Web Site using arr cookies. Computer name doesn't look like a meaningful choice for Azure Web Apps

@SergeyKanzhelev
Copy link
Contributor Author

@iusafaro can you please comment on this?

@SergeyKanzhelev SergeyKanzhelev modified the milestones: 2.3-Beta2, 2.2 Dec 14, 2016
@iusafaro
Copy link
Contributor

Yes, we're using HostName for NodeName as it contains slot. However ideally we'd like to use instance name, but there's no reliable way to get it - instance ID exposed by Azure Web Apps is tied to computer name and we don't want to over-count nodes as machine can be taken out of rotation and replaced by Azure.

We decided to use machine name for Role Instance Name as it was before to be in consistence with Quick Pulse. Otherwise it's very confusing when you see one metrics reported by machine name and other by instance ID.

Also I would continue using machine name as it's also used by Azure Web Apps itself when looking at Metrics per instance.

@SergeyKanzhelev
Copy link
Contributor Author

Since NodeName is not exposed in UI - we still need to expose slot somehow. Options are role name or custom property.

@cijothomas cijothomas assigned iusafaro and unassigned cijothomas Jan 27, 2017
@cijothomas
Copy link
Contributor

PR : #314

iusafaro added a commit that referenced this issue Feb 7, 2017
Issue #248 Azure Web App - update role name to contain the slot
@iusafaro iusafaro closed this as completed Feb 7, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants