internal KustoDataService() { KustoConnectionStringBuilder kcsb = new KustoConnectionStringBuilder($"https://ingest-{ServiceNameAndRegion}.kusto.windows.net") .WithAadManagedIdentity("system"); DirectJsonMappingResolver directJsonMappingResolver = new DirectJsonMappingResolver(); _httpRequestLogsTable = new KustoTable <HttpRequestLogEntry>(kcsb, DatabaseName, "UrlAccessLogs", directJsonMappingResolver); _scriptExecutionLogsTable = new KustoTable <ScriptExecutionLogEntry>(kcsb, DatabaseName, "ScriptExecLogs", directJsonMappingResolver); }
internal KustoDataService() { if (string.IsNullOrWhiteSpace(DatabaseName)) { throw new InvalidOperationException($"{nameof(DatabaseName)} was not correctly configured. " + "Make sure \"kusto_db_name\" is properly assigned in function app configuration."); } KustoConnectionStringBuilder kcsb = new KustoConnectionStringBuilder($"https://ingest-{ServiceNameAndRegion}.kusto.windows.net") .WithAadManagedIdentity("system"); DirectJsonMappingResolver directJsonMappingResolver = new DirectJsonMappingResolver(); _httpRequestLogsTable = new KustoTable <HttpRequestLogEntry>(kcsb, DatabaseName, "UrlAccessLogs", directJsonMappingResolver); _scriptExecutionLogsTable = new KustoTable <ScriptExecutionLogEntry>(kcsb, DatabaseName, "ScriptExecLogs", directJsonMappingResolver); }