I have many ASP.NETCore applications and one Azure Application Insight resource. I want to collect data from all my applications and be able to distinguish which information came from which application.
I don't see any option in configuring ApplicationInsightTelemetry to set up application id or something similar. Is there any way to tell to Application Insight from which application the information comes from?
My example configuration:
builder.Services.AddApplicationInsightsTelemetry(new ApplicationInsightsServiceOptions()
{
ConnectionString = "InstrumentationKey=00000000-0000-0000-0000-000000000000;",
})
CodePudding user response:
The properties you are looking for are Cloud Role Name
and Cloud Role Instance
. Application insights SDKs and agents will try to set these automatically, but you can also override them. Some further reading can be found here.