Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/Azure.Functions.Cli/StaticResources/host.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
{
"version": "2.0"
"version": "2.0",
"logging": {
"applicationInsights": {
"samplingExcludedTypes": "Request",
"samplingSettings": {
"isEnabled": true
}
}
}
}
27 changes: 27 additions & 0 deletions test/Azure.Functions.Cli.Tests/E2E/InitTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,33 @@ public Task init_function_app_powershell_supports_managed_dependencies()
}, _output);
}

[Fact]
public Task init_function_app_contains_logging_config()
{
return CliTester.Run(new RunConfiguration
{
Commands = new[] { "init . --worker-runtime node" },
CheckFiles = new FileResult[]
{
new FileResult
{
Name = "host.json",
ContentContains = new []
{
"applicationInsights",
"samplingExcludedTypes",
"Request",
"logging"
}
}
},
OutputContains = new[]
{
"Writing host.json"
}
}, _output);
}

[Fact]
public Task init_managed_dependencies_is_only_supported_in_powershell()
{
Expand Down