Reputation: 7338
We have an ASP.NET core 2.2
application using Azure Service bus topics and subscriptions.
We have configured the auto delete on idle feature on the subscriptions. After an idle time of 10
minutes the subscriptions are automatically deleted by the Azure infrastructure.
We have enabled the diagnostics logs for our service bus namespace on the Azure portal as explained here. We have verified that we are actually collecting logs and we are able to see them from the Azure portal. So far, so good.
Our problem is that we are not able to find among the collected logs the auto delete of the subscriptions after the configured idle time. Based on this documentation we would expected to see a log entry having an EventName_s
with the value AutoDelete Delete Subscription
, but we don't. We are sure that during our test at least one subscription has been deleted by the configured auto delete on idle rule.
Are the subscription auto delete events actually logged, as stated in the docs ?
Is there any configuration required to actually see the subscription auto delete events from the service bus diagnostics logs ?
Upvotes: 1
Views: 1126
Reputation: 750
@Enrico Massone The information in the document is correct that when you enabled diagnostic logs then you should see autodelete events logs. I have performed a test at my end and was able to see the below event for the configured diagnostic setting streaming the logs to log analytics workspace and storage account.
{ "Environment": "PROD", "Region": "South India", "ScaleUnit": "XXXX", "ActivityId": "249d60c9-780d-4fce-a3dc-69688b576d65", "EventName": "AutoDelete Delete Subscription", "resourceId": "/SUBSCRIPTIONS/XXXXX/RESOURCEGROUPS/XXXX/PROVIDERS/MICROSOFT.SERVICEBUS/NAMESPACES/XXX", "SubscriptionId": "XXXX", "EventTimeString": "11/25/2020 8:01:01 AM +00:00", "EventProperties": "{"SubscriptionId":"XXXXX","Namespace":"XXXX","Via":"AutoDelete","TrackingId":"249d60c9-780d-4fce-a3dc-69688b576d65_B4"}", "Status": "Succeeded", "Caller": "AutoDelete", "category": "OperationalLogs"}
Autodelete has a minimum value of 5 minutes and will trigger only on fulfilling the below conditions
If you want I can help you in verifying the logs from the backend whether the auto on idle was triggered or not. You can also perform another test to see if you observe the same behavior.
Upvotes: 1