Application Insights support for .NET Core 2.1 on App Service will be retired in an upcoming upgrade to App Service. To continue using Application Insights for your .NET Core apps, update to .NET Core 3.1, or .NET 5. .NET Core 2.1 has reach End-of-Support on August 21, 2021.
Upgrade to a newer version of .NET Core
You can update your .NET Core 2.1 applications to a newer version of .NET Core by updating the <TargetFramework> of your project file. For detailed instructions, please see this article.
The following mitigations should only be used as an interim. We suggest that you upgrade to a supported .NET version in the future and do not rely on these in the long-term.