@@ -12,71 +12,100 @@ Last updated: 2025-08-27
1212
1313> This scenario is intended to demonstrate rapid temporary file accumulation and disk degradation in Azure Functions.
1414
15+ <details >
16+ <summary ><b >List of References</b > (Click to expand)</summary >
17+
18+ - [ Kudu service overview] ( https://learn.microsoft.com/en-us/azure/app-service/resources-kudu )
19+ - [ log levels types] ( https://learn.microsoft.com/en-us/azure/azure-functions/configure-monitoring?tabs=v2#configure-log-levels )
20+ - [ How to configure monitoring for Azure Functions] ( https://learn.microsoft.com/en-us/azure/azure-functions/configure-monitoring?tabs=v2 )
21+ - [ host.json reference for Azure Functions 2.x and later] ( https://learn.microsoft.com/en-us/azure/azure-functions/functions-host-json#override-hostjson-values )
22+ - [ Sampling overrides %] ( https://learn.microsoft.com/en-us/azure/azure-monitor/app/java-standalone-config#sampling-overrides )
23+ - [ Sampling in Azure Monitor Application Insights with OpenTelemetry] ( https://learn.microsoft.com/en-us/azure/azure-monitor/app/opentelemetry-sampling )
24+
25+ </details >
26+
27+ > [ !NOTE]
28+ > Expected Results: <br />
29+ > - Rapid temp file accumulation in ` C:\local\Temp ` <br />
30+ > - Disk decay within 1-2 days <br />
31+ > - Restart clears only partial space due to locked files
1532
1633## Infrastructure Setup
1734
1835- ** App Service Plan (Windows)** - P1v3 tier for high-load testing
19- - See: [ ./terraform-infrastructure/variables.tf] ( ./terraform-infrastructure/variables.tf ) (lines 12-21)
20- - See: [ ./terraform-infrastructure/main.tf] ( ./terraform-infrastructure/main.tf ) (lines 35-45)
21- - ** Deployment Method** : Standard deployment (extracted .zip)
22- - See: [ ./terraform-infrastructure/main.tf] ( ./terraform-infrastructure/main.tf ) (line 115)
36+
37+ ``` terraform
38+ # Service Plan
39+ sku_name = "P1v3"
40+ ```
41+
42+ <img width =" 1908 " height =" 842 " alt =" image " src =" https://github.com/user-attachments/assets/fd5b96e4-be63-4319-b533-5c0fe18ec862 " />
43+
44+ - ** Deployment Method (Function App Environment Variables)** : Standard deployment (extracted .zip)
45+
2346 ``` terraform
2447 # Force standard deployment instead of mounted package
2548 "WEBSITE_RUN_FROM_PACKAGE" = "0"
2649 ```
27- - ** Application Insights** : Full logging (no sampling)
28- - See: [ ./terraform-infrastructure/main.tf] ( ./terraform-infrastructure/main.tf ) (lines 47-56)
50+
51+ <img width =" 1903 " height =" 842 " alt =" image " src =" https://github.com/user-attachments/assets/412aeee4-3c7d-43b6-82ea-87050e30f4fe " />
52+
53+ - ** Diagnostics Settings (Function App Environment Variables)** : Detailed diagnostics enabled
54+
2955 ``` terraform
30- # No sampling configured - full logging
31- sampling_percentage = 100
56+ # Enable full diagnostics for troubleshooting
57+ "WEBSITE_ENABLE_DETAILED_DIAGNOSTICS" = "true"
3258 ```
33- - ** Verbose Diagnostics** : Enabled
34- - See: [ ./terraform-infrastructure/main.tf] ( ./terraform-infrastructure/main.tf ) (line 118)
59+
60+ <img width =" 1917 " height =" 796 " alt =" image " src =" https://github.com/user-attachments/assets/bf8e1b7f-bc4a-4c1d-aced-e06f92df5185 " />
61+
62+ - ** Logging Configuration (Function App Environment Variables)** : Verbose logging enabled. Click here to understand more about [ log levels types] ( https://learn.microsoft.com/en-us/azure/azure-functions/configure-monitoring?tabs=v2#configure-log-levels )
63+
3564 ``` terraform
36- # Enable full diagnostics
37- "WEBSITE_ENABLE_DETAILED_DIAGNOSTICS" = "true"
65+ # Set verbose logging level for better diagnostics but higher disk usage
66+ "AzureFunctionsJobHost__logging__LogLevel__Default" = "Information"
67+ ```
68+
69+ <img width =" 1898 " height =" 828 " alt =" image " src =" https://github.com/user-attachments/assets/6a10498c-fa5d-4e01-a392-0da31ae89cfb " />
70+
71+ - ** SCM Separation (Function App Environment Variables)** : Enabled to ensure Kudu and function app run as separate processes
72+
73+ ``` terraform
74+ # Enable SCM separation for diagnostics
75+ "WEBSITE_DISABLE_SCM_SEPARATION" = "false"
3876 ```
39- - ** Storage Logging** : Enabled
40- - See: [ ./terraform-infrastructure/main.tf] ( ./terraform-infrastructure/main.tf ) (line 124)
77+
78+ <img width =" 1907 " height =" 842 " alt =" image " src =" https://github.com/user-attachments/assets/d2128b76-38e1-4e3a-af3f-835db68b428f " />
79+
80+ - ** Temp Access (Function App Environment Variables)** : Explicitly enabled for diagnostics and reporting
81+
4182 ``` terraform
42- # Log to storage account (increases I/O operations)
43- "AzureWebJobsDashboard " = azurerm_storage_account.storage.primary_connection_string
83+ # Enable temp file access for diagnostics
84+ "WEBSITE_ENABLE_TEMP_ACCESS " = "true"
4485 ```
45- - ** WEBSITE_RUN_FROM_PACKAGE** : Disabled (set to "0")
46- - See: [ ./terraform-infrastructure/main.tf] ( ./terraform-infrastructure/main.tf ) (line 115)
47- - ** Key Vault Integration** : Secrets stored in Azure Key Vault
48- - See: [ ./terraform-infrastructure/main.tf] ( ./terraform-infrastructure/main.tf ) (lines 147-193)
49- - ** Managed Identity** : System-assigned identity for Key Vault access
50- - See: [ ./terraform-infrastructure/main.tf] ( ./terraform-infrastructure/main.tf ) (lines 96-98)
5186
52- ## Expected Results
87+ < img width = " 1907 " height = " 841 " alt = " image " src = " https://github.com/user-attachments/assets/9fbb1211-5d5c-4356-b18f-deef61963150 " />
5388
54- - Rapid temp file accumulation in ` C:\local\Temp `
55- - Disk decay within 1-2 days
56- - Restart clears only partial space due to locked files
89+ > Overall:
5790
58- ## Deployment Instructions
91+ < img width = " 973 " height = " 825 " alt = " image " src = " https://github.com/user-attachments/assets/4563a3f1-7168-4b86-b629-6210e99b8f90 " />
5992
60- > For detailed deployment instructions including VS Code deployment and Azure DevOps pipeline samples, see the [ DEPLOYMENT.md ] ( ./DEPLOYMENT.md ) guide.
93+ - ** Application Insights ** : Full logging (no sampling). Click here to understand more about [ Sampling overrides % ] ( https://learn.microsoft.com/en-us/azure/azure-monitor/app/java-standalone-config#sampling-overrides )
6194
62- 1 . Go to the terraform-infrastructure directory:
63- ```
64- cd scenario-1-high-decay/terraform-infrastructure
65- ```
95+ ``` terraform
96+ # No sampling configured - full logging
97+ sampling_percentage = 100
98+ ```
6699
67- 2 . Update the ` terraform.tfvars ` file with your Azure subscription ID and preferred configuration values.
100+ < img width = " 1903 " height = " 837 " alt = " image " src = " https://github.com/user-attachments/assets/24197ef8-b302-480e-825b-4ddb34e18598 " />
68101
69- 3 . Initialize Terraform:
70- ```
71- terraform init
72- ```
102+ - ** Key Vault Integration** : Secrets stored in Azure Key Vault
103+ - ** Managed Identity** : System-assigned identity for Key Vault access
73104
74- 4 . Apply the Terraform configuration:
75- ```
76- terraform apply
77- ```
105+ ## Deployment Instructions
78106
79- 5 . After infrastructure deployment, follow the deployment approaches in [ DEPLOYMENT.md] ( ./DEPLOYMENT.md ) to publish the function app.
107+ 1 . Please follow the [ Terraform Deployment guide] ( ./terraform-infrastructure/README.md ) to deploy the necessary Azure resources for the workshop.
108+ 2 . After infrastructure deployment, follow the deployment approaches in [ Deployment Guide] ( ./DEPLOYMENT.md ) to publish the function app.
80109
81110## Testing
82111
@@ -86,13 +115,16 @@ Last updated: 2025-08-27
86115
87116> Monitor the function app using:
88117
89- - Azure Portal > Function App > Platform features > Advanced tools (Kudu)
118+ - Azure Portal > Function App > Development Tools > Advanced tools ([ Kudu] ( https://learn.microsoft.com/en-us/azure/app-service/resources-kudu ) )
119+
120+ https://github.com/user-attachments/assets/0e529115-13ae-4a2f-83ad-35c33be8bb67
121+
90122- Application Insights
91123- Azure Monitor metrics
92124
93125<!-- START BADGE -->
94126<div align =" center " >
95- <img src =" https://img.shields.io/badge/Total%20views-1342 -limegreen " alt =" Total views " >
96- <p >Refresh Date: 2025-08-29 </p >
127+ <img src =" https://img.shields.io/badge/Total%20views-42 -limegreen " alt =" Total views " >
128+ <p >Refresh Date: 2025-09-05 </p >
97129</div >
98130<!-- END BADGE -->
0 commit comments