[英]Do Azure Diagnostics run in Azure staging slot?
When collecting Azure diagnostic data, does the staging slot also send diagnostic data to the WadPerformanceCounters Table? 收集Azure诊断数据时,暂存槽是否还将诊断数据发送到WadPerformanceCounters表?
If so, how can I turn this off? 如果是这样,我该如何关闭呢? Or how can I differentiate between staging/production when reading the diagnostics.
或者在阅读诊断信息时如何区分阶段/生产。
I don't want to display data about our website assuming it's all production when in fact part of it is the staging slot. 我不想显示有关我们网站的数据,但前提是它全部是生产的,而实际上其中的一部分是登台广告位。
Yes - Windows Azure diagnostics runs in the Production and Staging slots. 是-Windows Azure诊断程序在生产和登台插槽中运行。 The only real difference between these two slots is the DNS name.
这两个插槽之间的唯一真正区别是DNS名称。
As for enabling diagnostics, there is a good starting point at http://msdn.microsoft.com/en-us/library/gg433048.aspx . 关于启用诊断,在http://msdn.microsoft.com/zh-cn/library/gg433048.aspx上有一个很好的起点。 This provides links to a lot of info on Windows Azure diagnostics.
这提供了指向有关Windows Azure诊断的许多信息的链接。
I don't believe there is a way in the diagnostics table data (WadPerformanceCountersTable, for example) to distinguish between Production and Staging slots. 我认为诊断表数据(例如,WadPerformanceCountersTable)中没有一种方法可以区分生产插槽和登台插槽。 You might be able to filter based off the RowKey value, which I believe contains the deploymentID and that would be different between Production and Staging.
您也许可以根据RowKey值进行过滤,我认为其中包含DeploymentID,而Production和Staging之间的值将有所不同。
You could also use a different storage account for Production and Staging slots. 您还可以将其他存储帐户用于生产和暂存插槽。 It'd be a fairly quick update of the .cscfg that could be done at run time.
.cscfg的更新非常快,可以在运行时完成。
When collecting Azure diagnostic data, does the staging slot also send diagnostic data to the WadPerformanceCounters Table?
收集Azure诊断数据时,暂存槽是否还将诊断数据发送到WadPerformanceCounters表?
Yes, they do end up in the same table. 是的,它们的确存在于同一表中。
Each deployment gets its unique deployment identifier which can be found on the dashboard for particular instance (production or staging) 每个部署都会获得其唯一的部署标识符,该标识符可在特定实例(生产或登台)的仪表板上找到
Sample WadPerformanceCountersTable
table 样本
WadPerformanceCountersTable
表
In order to find logs related to specific deployment (staging or production) you can filter the table by deployment identifier eg 为了找到与特定部署(阶段或生产)相关的日志,您可以按部署标识符过滤表,例如
DeploymentId eq '1a2c09bea1234bc1b5e6edb99993ab21'
If you have too many entries for a single deployment identifier, you reduce number of entries by adding, say, time attribute (all entries with DeploymentId '1a2c09bea1234bc1b5e6edb99993ab21' logged after midnight 5 January 2013 ) eg 如果单个部署标识符的条目过多,则可以通过添加时间属性来减少条目数量( 2013年1月5日午夜之后记录的所有具有DeploymentId'1a2c09bea1234bc1b5e6edb99993ab21'的条目),例如
DeploymentId eq '1a2c09bea1234bc1b5e6edb99993ab21' and Timestamp gt datetime'2013-01-05T00:00:00Z'
Please note that this is not very optimal way of filtering Azure Table Storage (as pointed out by Kiwi and Gaurav. 请注意,这不是筛选Azure表存储的最佳方法(正如Kiwi和Gaurav指出的那样。
Any query which will not include PartitionKey
will result in full table scan. 任何不包含
PartitionKey
查询都将导致全表扫描。 Since PartitionKey
in WAD tables represent a date/time value, I would recommend using that instead of Timestamp
. 由于WAD表中的
PartitionKey
表示日期/时间值,因此我建议使用该值代替Timestamp
。 You may find Effective way of fetching diagnostics data post very useful. 您可能会发现获取诊断数据后的有效方法非常有用。
That should help you finding out entries per environment (staging vs. production) and particular deployment. 这应该有助于您找出每个环境(阶段与生产)和特定部署的条目。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.