setting DashboardConnectionString in JobHostConfiguration, but still seeing missing AzureWebJobsDashboard warning in xxx.scm.azurewebsites.net
See original GitHub issueissue
I am creating a continues webjob and want to see each function call from the dashboard(from https://xxx.scm.azurewebsites.net/azurejobs/#/jobs/continuous/xxx). I understand that I need to set the AzureWebJobsDashboard on portal as connection string.
I also believe that this could be set in the code throught DashboardConnectionString in JobHostConfiguration class. After doing that I can see azure-jobs-host-output and azure-webjobs-hosts in the storage account, but I am still seeing the missing AzureWebJobsDashboard warning on xxx.scm.azurewebsites.net, not be able to see each triggered function call log. I am sure that the connection string value is same when I set in as AzureWebJobsDashboard on portal config.
The reason I want to configure this in code is that we store webjobDashboardConnectionString and webjobStorageConnectionString in key vault and want to rotate them. And I don’t want to maintain a app.config, so I don’t have connection string field in app.config.
here is the code that shows how I implement this. Am I missing something here? Since I searched around and didn’t see anyone else asking this.
var config = new JobHostConfiguration();
config.DashboardConnectionString = webjobDashboardConnectionString;
config.StorageConnectionString = webjobStorageConnectionString;
ServiceBusConfiguration serviceBusConfig = new ServiceBusConfiguration
{
ConnectionString = serviceBusConnectionString
};
config.UseServiceBus(serviceBusConfig);
config.NameResolver = new ServiceBusQueueNameResolver();
var host = new JobHost(config);
host.RunAndBlock();
a potential workaround
I know that connection strings and application settings are environment variables for webjob, and I do print them by
Console.WriteLine("getting dashboard env var: {0}", Environment.GetEnvironmentVariable("CUSTOMCONNSTR_AzureWebJobsDashboard"));
Can I set the environment variable directly? I haven’t try this out but just thought about this.
version
Microsoft.Azure.WebJobs, Version=2.2.0.0 Microsoft.Azure.WebJobs.Host, Version=2.2.0.0 Microsoft.Azure.WebJobs.ServiceBus, Version=2.2.0.0
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:6
Top GitHub Comments
It still doesn’t work. Setting the config.DashboardConnectionString value has no effect on the Kudu dashboard. Is there any QA out there or we are the first few people who have ever used this setting?
There is another report https://stackoverflow.com/a/51217978
Is there any update on this? or this might be a SDK version issue?