From b05d0a74b9be797e591618504446101b0e2ded48 Mon Sep 17 00:00:00 2001 From: tanmoycloud Date: Fri, 6 Mar 2026 01:24:47 +0100 Subject: [PATCH] fix: add missing version property to logs_build/host.json for Azure Functions v4 The logs_build/host.json was missing the required "version": "2.0" property and used the deprecated v1 "eventHub" key instead of the v2+ "eventHubs" key. This causes Azure Functions v4 runtime to fail with: "The host.json file is missing the required version property." Changes: - logs_build/host.json: Add "version": "2.0", extensionBundle, rename "eventHub" to "eventHubs" with v2+ config keys, add logging config - metrics_build/host.json: Normalize indentation for consistency The logs_build/host.json now matches the structure of metrics_build/host.json (which was already correct). Fixes #136 --- EventHubs/target/logs_build/host.json | 29 +++++++++++++++++---- EventHubs/target/metrics_build/host.json | 32 ++++++++++++------------ 2 files changed, 40 insertions(+), 21 deletions(-) diff --git a/EventHubs/target/logs_build/host.json b/EventHubs/target/logs_build/host.json index 81bb3e42..efe45491 100644 --- a/EventHubs/target/logs_build/host.json +++ b/EventHubs/target/logs_build/host.json @@ -1,11 +1,30 @@ { - "eventHub": { - "maxBatchSize": 400, - "prefetchCount": 800, - "batchCheckpointFrequency": 1 + "version": "2.0", + "extensionBundle": { + "id": "Microsoft.Azure.Functions.ExtensionBundle", + "version": "[4.0.0, 5.0.0)" + }, + "eventHubs": { + "maxEventBatchSize": 400, + "maxWaitTime": "00:05:00", + "batchCheckpointFrequency": 1, + "prefetchCount": 800 + }, + "logging": { + "applicationInsights": { + "samplingSettings": { + "isEnabled": false + } + }, + "logLevel": { + "default": "Warning", + "Host.Aggregator": "Trace", + "Host.Results": "Information", + "Function": "Information" + } }, "functions": [ "EventHubs_Logs" ], "functionTimeout": "00:10:00" -} +} \ No newline at end of file diff --git a/EventHubs/target/metrics_build/host.json b/EventHubs/target/metrics_build/host.json index 733f211e..e13be81d 100644 --- a/EventHubs/target/metrics_build/host.json +++ b/EventHubs/target/metrics_build/host.json @@ -1,30 +1,30 @@ { "version": "2.0", "extensionBundle": { - "id": "Microsoft.Azure.Functions.ExtensionBundle", - "version": "[4.0.0, 5.0.0)" + "id": "Microsoft.Azure.Functions.ExtensionBundle", + "version": "[4.0.0, 5.0.0)" }, "eventHubs": { - "maxEventBatchSize" : 400, - "maxWaitTime" : "00:05:00", - "batchCheckpointFrequency" : 1, - "prefetchCount" : 800 + "maxEventBatchSize": 400, + "maxWaitTime": "00:05:00", + "batchCheckpointFrequency": 1, + "prefetchCount": 800 }, "logging": { "applicationInsights": { - "samplingSettings": { - "isEnabled": false - } - }, - "logLevel": { - "default": "Warning", - "Host.Aggregator": "Trace", - "Host.Results": "Information", - "Function": "Information" + "samplingSettings": { + "isEnabled": false } + }, + "logLevel": { + "default": "Warning", + "Host.Aggregator": "Trace", + "Host.Results": "Information", + "Function": "Information" + } }, "functions": [ "EventHubs_Metrics" ], "functionTimeout": "00:10:00" -} +} \ No newline at end of file