Host unable to write diagnostics events to table storage if app is configured with managed identity
I had a function app that triggers from Service Bus. The app has service identity configured and the app and has the following role assignments: Storage Blob Data Owner Storage Table Data Contributor Azure Service Bus Data Owner Everything seems to work fine and the app successfully processes messages from Service Bus using identity but looking at the FunctionsLogs for the app I see a lot of entries with "Unable to get table reference. Aborting write operation" and "Azure Storage connection string is empty or invalid. Unable to write diagnostic events." exceptions in logs.
This could be is due to the WebHost expecting only a connection string to write to table storage and not checking for identity-based connections. Worried this could happen for any app that has storage diagnostics settings on. https://github.com/Azure/azure-functions-host/src/WebJobs.Script.WebHost/Diagnostics/DiagnosticEventTableStorageRepository.cs#L64
@fabiocav - please triage - tracking this for FlexConsumption GA
Causes noise in the logs; Affects all SKUs. P1
This is related to https://github.com/Azure/azure-functions-host/issues/9569 - the resolution here could be to properly converge on the shared services and fully remove the conditional check and log statement here.
Was this closed because it's a dupe of #9569 ?
I had a function app that triggers from Service Bus. The app has service identity configured and the app and has the following role assignments: Storage Blob Data Owner Storage Table Data Contributor Azure Service Bus Data Owner Everything seems to work fine and the app successfully processes messages from Service Bus using identity but looking at the FunctionsLogs for the app I see a lot of entries with "Unable to get table reference. Aborting write operation" and "Azure Storage connection string is empty or invalid. Unable to write diagnostic events." exceptions in logs.
This could be is due to the WebHost expecting only a connection string to write to table storage and not checking for identity-based connections. Worried this could happen for any app that has storage diagnostics settings on. https://github.com/Azure/azure-functions-host/src/WebJobs.Script.WebHost/Diagnostics/DiagnosticEventTableStorageRepository.cs#L64
@nzthiago - good day. I have an Azure Function app with the same issue. Did you manage to resolve this and if so how?
This was a duplicate of #9569, which should have addressed this problem. @mattchenderson FYI.