Service Bus Log Analytics

Richard Gardner 1 Reputation point
2021-04-28T14:04:46.29+00:00

Could anyone explain why I am seeing nothing in my Service Bus Logs? I have attached it to Log Analytics and am asking it to record operational and metric activity.

As I understand it there are two types of events being monitored - operations, which is completely useless to me because I'm looking for errors in the message queue, and metrics, which I assume (possibly incorrectly) contains actual useful information which might tell me what sort of errors we are experiencing.

Really, all I want it to do is record the messages that generate errors and any connectivity issues - looking around the documentation it's all very heavy on the useless operational logs and contains virtually no information about the actually useful metrics.

So, I'm connected to Log Analytics, I can see there are a handful of entries in the AzureActivity table telling me nothing even remotely useful, but there's no data in the AzureDiagnostics table.

To be concise : How do I log the contents of a message that has generated an error with the error details?

Azure Service Bus
Azure Service Bus
An Azure service that provides cloud messaging as a service and hybrid integration.
621 questions
Azure AI Metrics Advisor
Azure AI Metrics Advisor
An Azure artificial intelligence analytics service that proactively monitors metrics and diagnoses issues.
82 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Mike Urnun 9,811 Reputation points Microsoft Employee
    2021-05-10T02:01:30.243+00:00

    Hi @Richard Gardner - Sorry for the late reply. I tried answering some of your points below:

    Could anyone explain why I am seeing nothing in my Service Bus Logs? I have attached it to Log Analytics and am asking it to record operational and metric activity.

    Since Azure Service Bus is a message broker and that it isn't expected to transform/process the content of the messages while the messages are on Azure in-transit to consumer(s), the operational and activity logs that you're seeing in your Log Analytics are limited to the management operations carried out against your Service Bus namespace only. We attempt to communicate this point via our docs as follows:

    Azure Service Bus currently supports activity and operational logs, which capture management operations that are performed on the Azure Service Bus namespace. Specifically, these logs capture the operation type, including queue creation, resources used, and the status of the operation.

    If you feel that our docs can be improved, please consider sharing your feedback using the "This Page" button found at the bottom of the doc page and we'd be happy to work with our content authors to implement the improvements you suggest.

    Also, the service provides a guarantee (SLA) that sending/receiving of messages and other operations will work 99.9% of the time: https://azure.microsoft.com/en-us/support/legal/sla/service-bus/v1_1/

    If the service isn't meeting the SLA above with your Service Bus namespace, the best course of action would be to open a support ticket and work with a support engineer who has deeper insights into your environment to troubleshoot the root cause. If your Azure subscription doesn't carry a support plan at the moment, let me know and I'd be able to help with opening a case (free of charge) for resolving any underlying issue there may be with your namespace.

    Regarding the below:

    Really, all I want it to do is record the messages that generate errors and any connectivity issues - looking around the documentation it's all very heavy on the useless operational logs and contains virtually no information about the actually useful metrics.

    Generally speaking, you'll want to look into & implement Application Insights and the Distributed Tracing feature at message producers and consumers. Given how the message broker is offering a 99.9% guarantee on its operations as well as error-handling features such as dead-lettering etc, it then becomes the message producers and consumers' own responsibility to keep track of any errors and failures they encounter when interacting with the message broker: Distributed tracing and correlation through Service Bus messaging

    To be concise: How do I log the contents of a message that has generated an error with the error details?

    Could you elaborate on your overall scenario and clarify why there could be an error generated within the contents of your messages?

    Lastly, metrics, on the other hand, are a high-level view of the overall health of your Service Bus resources so you can't really drill into them and narrow down to the specifics.

    I hope this is helpful, please let me know if you have any further questions.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.