Is there a way to monitor user error in service bus?

Yang Chowmun 411 Reputation points
2021-07-30T03:45:48.25+00:00

I notice that the service bus has some user error from the overview section.
Is there a way for me to do some logging to find out the user error or set alarm to get notify upon an user error happened?

Azure Service Bus
Azure Service Bus
An Azure service that provides cloud messaging as a service and hybrid integration.
699 questions
0 comments No comments
{count} votes

Accepted answer
  1. MayankBargali-MSFT 70,936 Reputation points Moderator
    2021-07-30T05:36:08.337+00:00

    @Yang Chowmun As mentioned here

    The following two types of errors are classified as user errors:

    • Client-side errors (In HTTP that would be 400 errors).
    • Errors that occur while processing messages, such as MessageLockLostException.

    The 400 error can occur due to multiple reason due to user coding error etc. You can refer to different type of service bus exception that could cause due to user error. Your client application need to log the exact error exception/message. Monitor metrics can only tell you about the number of user error but not the cause. To know the cause please handle the different exception as per the service bus exception document and log it using application insights or as per your need.

    You can refer to Monitor service bus document on what are the metrics available that can be used in azure monitor to set the smart alert as per your requirement. You can use user error metric and based on your requirement/conditions set the alert.

    0 comments No comments

0 additional answers

Sort by: Most helpful

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.