Hello Team, I am trying to deploy Diagnostic Sett...
# azure
c
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 :
Copy code
autorest/azure: Service returned an error. Status=400 Code="BadRequest" Message="Category 'AllLogs' is not supported."
Copy code
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",

        resourceUri: etlAppInsights.id,
        logs: [
            {
            category: "allLogs",  <====This part is failing !!!!!
            enabled: true,
            retentionPolicy: {
                days: 0,
                enabled: false,
            },
        }],
        metrics: [{
            category: "AllMetrics",
            enabled: true,
            retentionPolicy: {
                days: 7,
                enabled: false,
            },
        }],
    });
i
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