Quick tip if you are hosting your ASP.NET Core application in Kubernetes: have a look at the Microsoft Application Insights for Kubernetes nuget package.
Through this package you can enrich your Application Insights telemetry data with Kubernetes specific information:
After adding the nuget package you can register the enricher by adding the following code:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void ConfigureServices(IServiceCollection services) | |
{ | |
services.AddApplicationInsightsTelemetry("----Your Application Insights Instrumentation Key ----"); | |
services.AddApplicationInsightsKubernetesEnricher(); | |
... | |
} |
More information: https://github.com/microsoft/ApplicationInsights-Kubernetes
No comments:
Post a Comment