Integrating Raygun with Azure Service Bus Queues

John-DanielAnnouncements, Plugins, UpdatesLeave a Comment

Azure service bus

Azure Service Bus offers a reliable and scalable message bus and by leveraging the queues provided with this service you can easily build integrations between your systems and/or third party systems and services. We have a large number of Raygun customers running on Azure so we’re pleased to announce support for Crash Reporting notifications to be raised to a Service Bus queue. This allows you to perform subsequent processing to integrate these notifications with your existing systems or processes, or to allow you to develop a custom notification integration with Raygun similar to our existing Webhook integration.

Getting integrated is straight-forward and we will assume that you have already created a service bus within your account and will use a new queue for receiving Raygun notifications.

Note: If you are looking for information to help you get started with Azure Service Bus, or just want to know what it’s all about we recommend you start here.

How to get started with Raygun and Azure Service Bus

#1 Setting up your queue

Enable partitioning to begin the integration with Azure Service Bus

‘Enable partitioning’ to begin the integration with Azure Service Bus

First, to get started we need to create a new queue under our Service Bus. Start by selecting your existing Service Bus within the portal and then click on the ‘Add queue‘ button in the header area. This will slide out a new dialog which allows you to add a new queue. The defaults looked fine for me however you may have custom requirements around message retention and storage. After we have given our new queue a name it will be provisioned for us by Azure.

Note: We will need to use the name of your queue as part of the settings for configuring the integration in Raygun later on.

Azure Service Bus has the ability to Add new shared.

Check ‘send’ inside the ‘Add new shared’ tab

The next step is to create an access policy with sending rights to the queue that you have configured.

Select the ‘Shared Access Policies‘ link in the sidebar and then click the ‘Add‘ button to create a new access policy. The defaults in the dialog were fine for me however you should review this to see if you have any specific requirements which you need to configure at this point. After this you will just need to enter a name for your policy and check the ‘Send‘ permission.

Note: The name of the policy will also be required as part of the settings for configuring the integration in Raygun later on.

Once the access policy has been created and you have refreshed the details for the access policy you will notice that there are four new read only fields which give the primary and secondary keys and associated connection strings for accessing the queue using this policy.

Integrating Azure Service Bus is easy - with the primary and secondary keys needed

Input the primary and secondary keys

Note: We will use the primary key as part of the settings for configuring the integration in Raygun later on.

#2 Configuring the integration

To enable the integration with your Service Bus queue in Raygun, select the ‘Integrations‘ link on the sidebar and then select ‘Azure Service Bus‘.

Azure Service Bus is plainly shown in the integrations menu in the Raygun dashboard

‘Integrations’ tab inside Raygun’s dashboard shows azure service bus

Initially we present you with some information about the integration and how it works, when you are ready to move ahead with configuring the settings click on the Setup tab.

The set up box inside Raygun will show what you need to know for the Azure Service Bus

The description will show you everything you need to know about the integration

On the Setup tab you will need to supply the Namespace which is the name of your service bus (in my case this was RaygunNotifications), the name of your queue (in my case this was MyQueue), an access key from a policy which has rights to send to the queue (this is the Primary Key from our shared access policy above) and finally the name of the access policy (in my case this was MyPolicy).

Image showing a screenshot Azure Service Bus 6 inside Raygun Crash Reporting

Raygun will show you everything you need to set up the integration in the Plugins and integrations’ box

Once you have supplied these four details you can check the Enabled checkbox and click Save to complete the setup of the integration and have it immediately enabled. You can come back to this dialog and update settings at any time in the future if the details change or you want to subsequently disable the integration.

When will I receive a notification?

Raygun will send notifications to you when the following happens:

  • A new error has occurred
  • Error reoccured after being resolved or ignored
  • Error still occurring 1, 5, 10, 30, 60 minute/s later

More information

You can find more information about our Azure Service Bus integration in the documentation section. The documentation also contains an example payload which you can use to understand what we will be delivering to you. The details for the crash reporting error payloads that accompany the notification details can be found as part of our API documentation.

Next level software intelligence across your entire stack. Get deeper analysis into how your applications are really performing. Learn more.

Leave a Reply

Your email address will not be published. Required fields are marked *