Limiting unnecerry app insights .NET dependecy logs as dicussed in the post "Reducing Log Analytics Cost for App Insights by Removing Successful Dependency Logs Ingestion from .NET Applications" is useful to reduce the costs. However, there are some .NET SDK methods, which are generating unnecessary execptions when used, filling up app indsights with exceptions. Once such method usage is BlobContainerClient.CreateIfNotExists, where it will always throw a 409 conflict, if the blob container is already exist.
Saturday 28 September 2024
Saturday 21 September 2024
Reducing Log Analytics Cost for App Insights by Removing Successful Dependency Logs Ingestion from .NET Applications
We have discussed how to reduce log analytics cost by reducing container log ingestion from apps deployed to AKS in the post "Reducing Log Analytics Cost by Preventing Container Logs Ingession from Azure Kubernetes Services (AKS)". However, when we inspected the charts o f data ingestion after reducing container logs, the next major data volume is ingested by app dependecy logs, coming from .NET apps running in AKS cluster. App dependecy logs are mostly information logs coming from the .NET SDK and other dependecies such as Azure storage etc. These logs are useful when there is an issue or error in the dependecy calls. However, when the dependency has run with successful state, there is not much use of that information. Since, the highest cost for app insights log analytics cost is incurred by dependency logs after we have removed container logs, it is worth to reduce the cost of log analytics data ingestion for app insights, by removing the successful dependecy logs from the app insights.
The expected outcome is as shown below. After the removal of succesful dpenedecy logs data ingestion for dependecy logs has reduce to almost zero.
Friday 13 September 2024
Automate Health Check Validation for AKS Apps with Nginx Ingress Using Azure DevOps Pipelines
We have discussed "Setup Application Ingress for AKS Using Nginx Ingress controller with Private IP" in a previous post. Once application and nginx ingress setup is deployed it takes some time for containers and pods to be ready for acepting traffic. We should validate whether the application contianers are deployed with correct docker image and running required replicas as specified in the horizontal pod autoscalers. Then we should verify if ingress for apps are setup corectly. If only all these health checks succeeed we can enable live traffic into a newly deployed set of applications in an AKS cluster (This is useful in blue-green deployments with new cluster or node pool to represent the blue or green instance). Let's use PowerShell and write health validation script and get it executed in Azure piplines to automate health check validation for apps deployed to AKS with nginx ingress.
Expected outecome is to validate ingress setup for application in an Azure DevOps pipelines task as below.
Saturday 7 September 2024
Setup Application Ingress for AKS Using Nginx Ingress controller with Private IP
We have dicussed "Deploy Nginx Ingress Conroller with Private IP (Limited Access to vNET) to AKS with Terraform, Helm and Azure DevOps Pipelines" and then "Automate Validation of Nginx Ingress Controller Setup in AKS with an Azure Pipeline Task" is discussed. As the next step, let's explore how to setup ingress for application deployed in AKS, using Nginx ingress controller deployed with private IP. The purpose is exposoing the application in AKS within the virtual network, so, that other applications in the same virtual network can access the application securely, without having to expose application in AKS publicly.
The expected outcome is to have ingress for apps setup as shown below.
Popular Posts
-
In Azure DevOps YAML pipelines there are several functions available for you to use. replace is such a useful function, which you can use t...
-
Adding Azure Container Registry (ACR) service connection to Azure DevOps is really simple as described in " Create Service Connection ...
-
We have discueed, that we have to use an environment variable to handle input parameter default values, if we are using trigger for workflo...
-
Some times a silly mistake can waste lot of time of a developer. The exception “System.IO.IOException: The response ended prematurely.” whil...
-
Sometimes you may need to edit files especially the web.config or appsettings.json files after deploying your application to Azure App Servi...