Question

In windows azure Cloud Services there is the concept of a Production environment and a staging environment. Unfortunately, you cannot (as far as I can tell) specify separate table storage accounts when uploading performance counters, so all environments (and deployments) are lumped together.

I tried to use the DeploymentId (RoleEnviroment.DeploymentId) to extract specific environment information but this changes with each deployment so it only returns the performance counter information since the last deployment.

When querying the TableStorage table (WADPerformanceCountersTable) for the performance counter data I am using TableQuery for example:

        TableQuery<PerformanceCountersEntity> query = new TableQuery<PerformanceCountersEntity>().Where(
            TableQuery.CombineFilters(
                TableQuery.GenerateFilterCondition("DeploymentId", QueryComparisons.Equal, RoleEnvironment.DeploymentId),
                TableOperators.And,
                TableQuery.CombineFilters(
                    TableQuery.GenerateFilterConditionForDate("Timestamp", QueryComparisons.GreaterThan, new DateTimeOffset(earliestDate)),
                    TableOperators.And,
                    TableQuery.GenerateFilterCondition("Role", QueryComparisons.Equal, "ROLENAMEHERE")
                    )
                )
            );

So, is there any way to get all the performance counters from the WADPerformanceCountersTable for production (or staging) without post-processing the data once the TableQuery has been performed?

Edit: So, apparently you can specify separate storage accounts in the Windows Azure Management portal which solves my problem. This setting is located in Storage Account -> Configure -> Staging -> Diagnostic Connection Strings

Était-ce utile?

La solution 2

You can specify separate storage accounts for production/staging in the Windows Azure Management portal.

This setting is located in Storage Account -> Configure -> Staging -> Diagnostic Connection Strings

Autres conseils

So, first of all.. Staging deployment slot is not meant to be your QA or UAT or DEV environment. It is meant to be a deployment-slot that allows you to deploy to PROD without taking prod down. What this means is that you shouldn't try to differentiate between your staging and production on a general basis.

Now, to separate your PROD from QA and DEV environments, you can configure the Azure Diagnostics storage account to be different. As in, provide a DEV storage account for DEV version of the CSCFG file. Similarly, provide a QA storage account for QA version of the CSCFG file.

I wrote a blog long ago as to how to manage multiple environments in Azure that you may find useful : http://blog.paraleap.com/post/2011/09/13/Managing-environments-in-a-distributed-Azure-or-other-cloud-based-NET-solution

Alternatively, just keeping up with different CSCFG files that are married to each environment and contain different diagnostic storage accounts should do the trick

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top