fix: add missing "version" property to logs_build/host.json for Azure Functions v4#137
Open
tanmoycloud wants to merge 1 commit intoSumoLogic:masterfrom
Open
Conversation
…unctions 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 SumoLogic#136
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
EventHubs/target/logs_build/host.jsonis missing the required"version": "2.0"property and uses the deprecated v1"eventHub"key. This causes the Azure Functions v4 runtime (~4) to fail with:Microsoft.Azure.WebJobs.Script: The host.json file is missing the required 'version' property.Changes
EventHubs/target/logs_build/host.json(fix)Before:
json { "eventHub": { "maxBatchSize": 400, "prefetchCount": 800, "batchCheckpointFrequency": 1 }, "functions": ["EventHubs_Logs"], "functionTimeout": "00:10:00" }After:
json { "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" }EventHubs/target/metrics_build/host.json(formatting only)Normalized indentation for consistency. No functional changes — this file was already correct.
What was fixed
version"version": "2.0"extensionBundleeventHubkey (singular)"eventHub"with v1 keys"eventHubs"with v2+ keys (maxEventBatchSize,maxWaitTime)loggingconfigReferences
Fixes #136
cc @sumoanema @himanshu219