Application Insights: How to set the cloud role name in .NET Core & .NET 5

Wouter
2 min readDec 11, 2021

PS: I wrote a similar article on how to set the Cloud Role name in Angular.

If you are hosting your .NET solution in an Azure App Service this property is filled in for you, but in all other cases you need to set this property yourself. This can be done by creating your own Telemetry Initializer.

Create a custom Telemetry Initializer

Create a new class that inherits from the ITelemetryInitializer interface. Because my telemetry…

--

--