Distinguish Applications by a user defined Environment
Right now, Application Insights seems to only distinguish between the Debug and Release version of an application. At my company. we have several "downstream" environments DEV/MAIN/QA/POST that an application might run in before it is deployed to production. In the QA and POST environment, the application will run the Release version of the code.
So, I would like to see a way where I can record the Environment an application is running in. Preferably it would be something in the web.config so the correct value can be set at deployment time.
The dashboard would let me either look at results for a single environment, or roll up the values across all environments.
Noel Anderton commented
Not only do we need to be able to set up and view environments but we need to be able to promote code from Dev to QA for example, with out a lot of hacks to change the configuration.
Maybe we could use the same Guid across each environment but get a choice on where to add a server into an environment based on IP or server name.
Prasanna Narayanasamy commented
1. I'd like to use multiple components within the same subscription/account, one component per environment.
2. There should be a simple documented way to set Component Id and Component Name through Azure configuration
3. Better still, do away with one of them! We don't need to keep track of which component id matches with a component name - AI should do that for us. So should be specifying only one of them, preferably component id.
4. Provide a way to programmatically set the component id/name in global.asax. Currently I'm doing this by calling ServerAnalytics.Start("<component-id>"); within Application_Start but it is an undocumented feature.
Sudhindra Kovalam commented
I Second Kurt C's Idea.
We need control to specify application ID and the instrumentation Keys via code in C#. Makes our live much more simpler.
I believe it is so for Server analytics. It should be extended to diagnostics and performance too.
Kurt C commented
I would also like a way to distinguish per environment that is not creating yet another application.
I do not like web.config or applicationinsights.config though. It is not testable and not transparent. I would like the ability to configuire application insights in C# code somewhere during application_start, that way I can load my settings the way we store settings and at runtime decide what the correct Application Guid or other variables are to use.