Skip to content

Commit 581d163

Browse files
authored
Merge pull request #580 from KelvinTegelaar/dev
[pull] dev from KelvinTegelaar:dev
2 parents 7566fcf + 6c9301d commit 581d163

File tree

2 files changed

+55
-1
lines changed

2 files changed

+55
-1
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Docs for the Azure Web Apps Deploy action: https://github.com/azure/functions-action
2+
# More GitHub Actions for Azure: https://github.com/Azure/actions
3+
4+
name: Build and deploy Powershell project to Azure Function App - cipp23l35
5+
6+
on:
7+
push:
8+
branches:
9+
- dev
10+
workflow_dispatch:
11+
12+
env:
13+
AZURE_FUNCTIONAPP_PACKAGE_PATH: '.' # set this to the path to your web app project, defaults to the repository root
14+
15+
jobs:
16+
deploy:
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: 'Checkout GitHub Action'
21+
uses: actions/checkout@v4
22+
23+
- name: 'Run Azure Functions Action'
24+
uses: Azure/functions-action@v1
25+
id: fa
26+
with:
27+
app-name: 'cipp23l35'
28+
slot-name: 'Production'
29+
package: ${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}
30+
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_8891846CC18E45F9B6795F5DD41640ED }}
31+
sku: 'flexconsumption'
32+

Modules/CIPPCore/Public/Entrypoints/Timer Functions/Start-CIPPProcessorQueue.ps1

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,29 @@ function Start-CIPPProcessorQueue {
2424
}
2525
if (Get-Command -Name $FunctionName -ErrorAction SilentlyContinue) {
2626
try {
27-
Invoke-Command -ScriptBlock { & $FunctionName @Parameters }
27+
# Prepare telemetry metadata
28+
$metadata = @{
29+
FunctionName = $FunctionName
30+
TriggerType = 'ProcessorQueue'
31+
QueueRowKey = $QueueItem.RowKey
32+
}
33+
34+
# Add parameters info if available
35+
if ($Parameters.Count -gt 0) {
36+
$metadata['ParameterCount'] = $Parameters.Count
37+
# Add common parameters
38+
if ($Parameters.Tenant) {
39+
$metadata['Tenant'] = $Parameters.Tenant
40+
}
41+
if ($Parameters.TenantFilter) {
42+
$metadata['Tenant'] = $Parameters.TenantFilter
43+
}
44+
}
45+
46+
# Wrap function execution with telemetry
47+
Measure-CippTask -TaskName $FunctionName -Metadata $metadata -Script {
48+
Invoke-Command -ScriptBlock { & $FunctionName @Parameters }
49+
}
2850
} catch {
2951
Write-Warning "Failed to run function $($FunctionName). Error: $($_.Exception.Message)"
3052
}

0 commit comments

Comments
 (0)