Skip to content

func new and func init create different host.json files #4660

@manvkaur

Description

@manvkaur

Version

4.2.2

Description

Different host.json contents are produced when func init is used first versus when user directly uses func new.
Check steps to reproduce for content details.

Expectation is that both files will be the same.

Steps to reproduce

  1. Open an empty folder in VS Code
  2. Open terminal
  3. Run command - func new
  4. Choose python
  5. Choose any trigger template
  6. Observe host.json
{
  "version": "2.0",
  "isDefaultHostConfig": true,
  "extensionBundle": {
    "id": "Microsoft.Azure.Functions.ExtensionBundle",
    "version": "[4.*, 5.0.0)"
  }
}
  1. Open an empty folder in VS Code
  2. Open terminal
  3. Run command - func init
  4. Choose python
  5. Observe host.json
{
  "version": "2.0",
  "logging": {
    "applicationInsights": {
      "samplingSettings": {
        "isEnabled": true,
        "excludedTypes": "Request"
      }
    }
  },
  "extensionBundle": {
    "id": "Microsoft.Azure.Functions.ExtensionBundle",
    "version": "[4.*, 5.0.0)"
  }
}

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions