7
votes

I am helping investigate and diagnose some issues we have and have noticed that the User Errors metrics on a service bus queue is changing. I'd like to know exactly what this metric means as the documentation at https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-metrics-azure-monitor is a little vague.

Thank you for your help.

2

2 Answers

11
votes

I too was exploring possible User Errors on the Azure Service Bus. Below are few of my findings. User errors generally occur due to mistakes in the client application like,

  1. InvalidOperationException, The requested user operation is not allowed within the server or service. For example, Complete() generates InvalidOperationException if the message was received in ReceiveAndDelete mode
  2. OperationCanceledException, An attempt is made to invoke an operation on an object that has already been closed, aborted or disposed. In rare cases, the ambient transaction is already disposed.
  3. UnauthorizedAccessException, The TokenProvider object could not acquire a token, the token is invalid, or the token does not contain the claims required to perform the operation
  4. ArgumentException/ArgumentNullException/ ArgumentOutOfRangeException, when One or more arguments supplied to the method are invalid. The URI supplied to NamespaceManager or Create contains path segment(s). The URI scheme supplied to NamespaceManager or Create is invalid. The property value is larger than 32KB.
  5. SessionLockLostException, Lock associated with this session is lost
  6. MessageLockLostException, Lock token associated with the message has expired, or the lock token is not found
  7. MessageNotFoundException, Attempt to receive a message with a particular sequence number. This message is not found
  8. MessagingEntityNotFoundException, Entity associated with the operation does not exist or it has been deleted
  9. MessagingCommunicationException, Client is unable to establish a connection with Service Bus
  10. SessionLockLostException, Lock associated with this session is lost
  11. MessagingException, Generic messaging exception that may be thrown in the following cases: An attempt is made to create a QueueClient using a name or path that belongs to a different entity type (for example, a topic). An attempt is made to send a message larger than 256KB. The server or service encountered an error during processing of the request. This is usually a transient exception
  12. MessagingEntityAlreadyExistsException, Attempt to create an entity with a name that is already used by another entity in that service namespace
  13. QuotaExceededException, The messaging entity has reached its maximum allowable size, or the maximum number of connections to a namespace has been exceeded
  14. RuleActionException, Service Bus returns this exception if you attempt to create an invalid rule action. Service Bus attaches this exception to a deadlettered message if an error occurs while processing the rule action for that message
  15. FilterException, Service Bus returns this exception if you attempt to create an invalid filter. Service Bus attaches this exception to a deadlettered message if an error occurred while processing the filter for that message
  16. SessionCannotBeLockedException, attempt to accept a session with a specific session ID, but the session is currently locked by another client
  17. TransactionSizeExceededException, Too many operations are part of the transaction
  18. MessagingEntityDisabledException, Request for a runtime operation on a disabled entity
  19. NoMatchingSubscriptionException, Service Bus returns this exception if you send a message to a topic that has pre-filtering enabled and none of the filters match
  20. MessageSizeExceededException, A message payload exceeds the 256 KB limit. Note that the 256 KB limit is the total message size, which can include system properties and any .NET overhead
  21. TransactionException, The ambient transaction (Transaction.Current) is invalid. It may have been completed or aborted
  22. TransactionInDoubtException, An operation is attempted on a transaction that is in doubt, or an attempt is made to commit the transaction and the transaction becomes in doubt I collected the exhaustive list of exceptions from MSDN documentation and filtered the list to get the User Errors possible on a Azure ServiceBus
0
votes

There are two types of errors grouped under "User Errors".

They are:

1) Client side errors. Such as http which would be 400

2) Errors for when things happen while you process the message like message lock lost exception

Attribution: https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-metrics-azure-monitor#user-errors