azure-service-fabricappinsightsazure-gov

Service Fabric .NET Framework services and ApplicationInsights.config endpoints for Azure gov


I have a service fabric application that hosts api’s with app insights enabled. The api services are .Net framework 4.8 webapi projects and they are native fabric stateless and stateful services. I don’t use the app insights service fabric specific packages, but do have the standard app insights for webapi packages. I have always been in Azure commercial and logs have worked just fine there.

Now that we are in azure gov, the only way to point a .Net Framework app to the gov app insights endpoints is by modifying the ApplicationInsights.config file.

So I’ve modified the file as per msdn, verified it is deployed with the fabric deploy package and its there next to the rest of the dlls on the vms. Yet my services still won’t log to azure gov app insight instances. Nothing is coming through. We set the instrumentation key programmatically, not in applicationinsights.config, could that be an issue? I noticed some of the msdn examples showed instrumentationkey being included in the config file, but would think that is optional.

Had anyone had experience pointing .net 4.8 fabric services to gov app insights?


Solution

  • This ended up being an issue with my gov configuration file. The MSDN document wasn't very clear on where the new config sections go. It made it look like they are all nested under the top level node of the config file. Turns out the TelementyChannel override has to go inside the default TelemenySinks node. I contacted microsoft on github about clarifying this in their docs.

    Link to the unclear documentation

    https://learn.microsoft.com/en-us/azure/azure-monitor/app/custom-endpoints?tabs=net

    Link to github issue to get it fixed

    https://github.com/MicrosoftDocs/azure-docs/issues/80066