Skip to content

EventHubs logs_build/host.json missing required "version" property for Azure Functions v4 #136

Description

@tanmoycloud

Bug Report

Description

The EventHubs/target/logs_build/host.json file is missing the required "version": "2.0" property, which causes the Azure Functions v4 runtime to fail with:

Microsoft.Azure.WebJobs.Script: The host.json file is missing the required 'version' property.

Current logs_build/host.json

json { "eventHub": { "maxBatchSize": 400, "prefetchCount": 800, "batchCheckpointFrequency": 1 }, "functions": [ "EventHubs_Logs" ], "functionTimeout": "00:10:00" }

Issues

  1. Missing "version": "2.0" — Required by Azure Functions v2+ runtime. Without it, the function app fails to start on ~4 (v4).
  2. Uses deprecated eventHub key — Should be eventHubs (plural) for v2+ host.json schema. See Azure EventHub bindings configuration.
  3. Missing extensionBundle — The v2+ runtime requires an extension bundle declaration for EventHub bindings.
  4. Missing logging configuration — The metrics_build/host.json already has proper logging config, but logs_build does not.

Expected logs_build/host.json

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" }

This should match the structure already used in metrics_build/host.json (which is correct).

Environment

Note

The EventHubs log and metric integrations are marked as deprecated in the README. However, the logs_build/host.json should still be fixed for users currently running these functions, as it prevents the function app from starting entirely.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions