Vadim Berman
Vadim Berman

Reputation: 2032

Logging Azure Service Bus server exceptions

Is there a way to log Service Bus exceptions and errors if I don't have access to the client that submits the queue messages? As in, from the Service Bus queue itself?

Upvotes: 0

Views: 2460

Answers (1)

Ben Morris
Ben Morris

Reputation: 623

Have a look at the Azure metrics REST API here:

https://msdn.microsoft.com/en-us/library/azure/dn163589.aspx

It is a bit fiddly to get up and running with as you need to create and install a management certificate on Azure. The link below explains how:

https://msdn.microsoft.com/en-us/library/azure/gg551722.aspx

You start by hitting the supported metrics resource for the queue or topic you want to monitor - the URL below is a redacted example:

https://management.core.windows.net/[SubscriptionID]/services/servicebus/Namespaces/[Namespace]/queues/[Queue]/Metrics

It brings back a big chunk of JSON that includes links to the supported metrics resources. This includes counts of the failed requests and internal server errors.

Beyond that it's worth using a logger mechanism on your clients that lets you remotely aggregate more detailed messages. This will give you a fuller picture of why your clients might be failing to send and receive .

Upvotes: 2

Related Questions