Azure Service Bus metrics in Azure Monitor (preview)

Service Bus metrics give you the state of resources in your Azure subscription. With a rich set of metrics data, you can assess the overall health of your Service Bus resources, not only at the namespace level, but also at the entity level. These statistics can be important as they help you to monitor the state of Service Bus. Metrics can also help troubleshoot root-cause issues without needing to contact Azure support.

Azure Monitor provides unified user interfaces for monitoring across various Azure services. For more information, see Monitoring in Microsoft Azure and the Retrieve Azure Monitor metrics with .NET sample on GitHub.

Important

When there has not been any interaction with an entity for 2 hours, the metrics will start showing "0" as a value until the entity is no longer idle.

Access metrics

Azure Monitor provides multiple ways to access metrics. You can either access metrics through the Azure portal, or use the Azure Monitor APIs (REST and .NET) and analysis solutions such as Log Analytics and Event Hubs. For more information, see Monitoring data collected by Azure Monitor.

Metrics are enabled by default, and you can access the most recent 30 days of data. If you need to retain data for a longer period of time, you can archive metrics data to an Azure Storage account. This is configured in diagnostic settings in Azure Monitor.

Access metrics in the portal

You can monitor metrics over time in the Azure portal. The following example shows how to view successful requests and incoming requests at the account level:

You can also access metrics directly via the namespace. To do so, select your namespace and then click Metrics (Preview). To display metrics filtered to the scope of the entity, select the entity and then click Metrics (preview).

For metrics supporting dimensions, you must filter with the desired dimension value.

Billing

Using metrics in Azure Monitor is free while in preview. However, if you use additional solutions that ingest metrics data, you may be billed by these solutions. For example, you are billed by Azure Storage if you archive metrics data to an Azure Storage account. You are also billed by Log Analytics if you stream metrics data to Log Analytics for advanced analysis.

The following metrics give you an overview of the health of your service.

Note

We are deprecating several metrics as they are moved under a different name. This might require you to update your references. Metrics marked with the "deprecated" keyword will not be supported going forward.

All metrics values are sent to Azure Monitor every minute. The time granularity defines the time interval for which metrics values are presented. The supported time interval for all Service Bus metrics is 1 minute.

Request metrics

Counts the number of data and management operations requests.

Metric Name Description
Incoming Requests (preview) The number of requests made to the Service Bus service over a specified period.

Unit: Count
Aggregation Type: Total
Dimension: EntityName
Successful Requests (preview) The number of successful requests made to the Service Bus service over a specified period.

Unit: Count
Aggregation Type: Total
Dimension: EntityName
Server Errors (preview) The number of requests not processed due to an error in the Service Bus service over a specified period.

Unit: Count
Aggregation Type: Total
Dimension: EntityName
User Errors (preview - see the following subsection) The number of requests not processed due to user errors over a specified period.

Unit: Count
Aggregation Type: Total
Dimension: EntityName
Throttled Requests (preview) The number of requests that were throttled because the usage was exceeded.

Unit: Count
Aggregation Type: Total
Dimension: EntityName

User errors

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

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

Message metrics

Metric Name Description
Incoming Messages (preview) The number of events or messages sent to Service Bus over a specified period.

Unit: Count
Aggregation Type: Total
Dimension: EntityName
Outgoing Messages (preview) The number of events or messages received from Service Bus over a specified period.

Unit: Count
Aggregation Type: Total
Dimension: EntityName

Connection metrics

Metric Name Description
ActiveConnections (preview) The number of active connections on a namespace as well as on an entity.

Unit: Count
Aggregation Type: Total
Dimension: EntityName
Connections Opened (preview) The number of open connections.

Unit: Count
Aggregation Type: Total
Dimension: EntityName
Connections Closed (preview) The number of closed connections.

Unit: Count
Aggregation Type: Total
Dimension: EntityName

Resource usage metrics

Note

The following metrics are available only with the premium tier.

Metric Name Description
CPU usage per namespace (preview) The percentage CPU usage of the namespace.

Unit: Percent
Aggregation Type: Maximum
Dimension: EntityName
Memory size usage per namespace (preview) The percentage memory usage of the namespace.

Unit: Percent
Aggregation Type: Maximum
Dimension: EntityName

Metrics dimensions

Azure Service Bus supports the following dimensions for metrics in Azure Monitor. Adding dimensions to your metrics is optional. If you do not add dimensions, metrics are specified at the namespace level.

Dimension name Description
EntityName Service Bus supports messaging entities under the namespace.

Next steps

See the Azure Monitoring overview.