When reviewing some log messages inside Application Insights I noticed a lot of messages like this:
AI: TelemetryChannel found a telemetry item without an InstrumentationKey. This is a required field and must be set in either your config file or at application startup.
I had an ApplicationInsights section inside my appsettings.json where I provided an instrumentation key, so that could not be the issue(and the trace message arrived in the correct Application Insights resource).
This turned out to be a bug in the Application Insights version I was using(2.15.0).
Upgrading to the latest version(2.20.0 at the moment of writing) solved the problem.
Up to the next issue!