04/06/2023, 2:03 PM
Hello Team, I am trying to deploy Diagnostic Setting for Azure Function/AppInsight which will send logs to EventHub. Azure-native provider is used for this. If I use all options in Logs, (AppEvents, AppMetrics...) this is working but apparently I am NOT gettings logs, but if I select in Azure Portal AllLogs, in that case logs are working, strange.... I am getting errror :
autorest/azure: Service returned an error. Status=400 Code="BadRequest" Message="Category 'AllLogs' is not supported."
const diagnosticSetting = new insights.DiagnosticSetting("ds-horizon-dev-appinsights", {
        name: "ds-horizon-dev-appinsights",
        eventHubAuthorizationRuleId: "/subscriptions/70723351-c6d0-4159-b670-ae4aef2e3936/resourcegroups/craftsphere-dev-monitoringaa96adba/providers/Microsoft.EventHub/namespaces/craftsphere-dev-datadog/authorizationrules/craftsphere-dev",
        eventHubName: "craftsphere-dev-datadog",

        logs: [
            category: "allLogs",  <====This part is failing !!!!!
            enabled: true,
            retentionPolicy: {
                days: 0,
                enabled: false,
        metrics: [{
            category: "AllMetrics",
            enabled: true,
            retentionPolicy: {
                days: 7,
                enabled: false,


04/07/2023, 12:54 AM
ive never been able to get alllogs to work on any diagnostic settings. i usually have to set each of them seprately. configure it how you like in the azure portal, then click on “export template” blade to see how the API has it configured