简体   繁体   English

记录Azure Service Bus服务器异常

[英]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? 例如,来自服务总线队列本身?

Have a look at the Azure metrics REST API here: 在这里查看Azure指标REST API:

https://msdn.microsoft.com/en-us/library/azure/dn163589.aspx https://msdn.microsoft.com/zh-CN/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. 开始并运行时有点麻烦,因为您需要在Azure上创建和安装管理证书。 The link below explains how: 以下链接说明了如何:

https://msdn.microsoft.com/en-us/library/azure/gg551722.aspx https://msdn.microsoft.com/zh-CN/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: 首先,为要监视的队列或主题命中受支持的度量标准资源-以下URL是一个经过编辑的示例:

https://management.core.windows.net/[SubscriptionID]/services/servicebus/Namespaces/[Namespace]/queues/[Queue]/Metrics 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. 它带回了大量的JSON,其中包括指向支持的指标资源的链接。 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 . 这将使您更全面地了解为什么客户可能无法发送和接收。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM