Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Jira + Sentry - together we are stronger

Intro

Back in the days, when my position was called PHP Developer instead of Atlassian Consultant, we were testing Sentry to use it in our development projects. Even though my company used Jira, we've never made it to the integration between both systems. I've seen the integration app with Jira on the marketplace many times and I've always been wondering - what happened in the meantime and what's possible to do with Jira and Sentry now? Let's focus on the cloud versions, because for me the cloud is the future :-)!

Test scenario

Let's imagine a web development company, which supports existing solutions and also developing the new one. If something goes wrong and there's a problem with one of your sites, as a developer, who does the investigation of the problem, you usually have to connect to the server, navigate to the logs and try to find out, what's going on. Sometimes you even don't know about the problem on your site til the time your customer reports it.

Sentry can help you improve the situation - you can collect the errors from all your sites immediately after they happen, be informed about them and process them at one place. And what I would like to do especially - create Jira issues based on them.

Let's try it! 

Sign up for Sentry

Navigate to https://sentry.io/signup/ and fill in the form and create your account. Easy peasy. Be aware that if you want to do the integration between Jira and Sentry, free plan is not enough. I started the trial for this test scenario.

Create Sentry project

After you log in to your Sentry account, in the left menu click on the Projects menu item and Create project.

sentry_create_project.png

Choose a platform and a project name (in my case PHP and my-php-project).

Immediately you are provided with instructions, what needs to be done to capture all the errors in the PHP application.

sentry_configure_php.png

Create PHP project

I've created sample PHP project with index.php and based on the provided information installed SDK using composer

composer require sentry/sdk

My index.php looks like this.

<?php
require 'vendor/autoload.php';

Sentry\init(['dsn' => 'https://my-dns-url' ]);

/*
*
* This is my script for testing Sentry
*
*/

try {
throw new Exception('this is my test exception');
} catch (\Throwable $exception) {
Sentry\captureException($exception);
}

Create the first error in Sentry

After execution of this code the first error is created in Issues section in Sentry!

sentry_first_issue.png

You can see a lots of information in the issue detail.

sentry_first_issue_detail.png

 

Integration with Jira cloud

My goal is to send this Sentry error to Jira to be able to start work on the fix immediately.

Let's navigate to my organization settings -> Integrations. 

sentry_integrations.png

Let's select Jira (not Jira Server). Now I'm instructed I need to install integration app to my cloud Jira. After the installation the configuration needs to finished in Sentry.

sentry_integrations_config.png

A lot of things can be configured, I just leave it as it is and go back directly to my Sentry issue.

Create Jira issue

There's a new section in the right panel called Linked Issues in the error detail.

sentry_link_jira_issue.png

You can either create a new issue in your Jira site or link to the existing one. Let's create a new one. 

sentry_create_issue.png

It is possible to fill in not only the system fields, but also various custom fields. After the issue is created, you can get directly to the Jira clicking on it's key.

jira_issue_detail.png

There's Sentry section in the right panel, where you can get additional information and go back directly to the Sentry issue.

jira_issue_detail_sentry.png

Conclusion

I've succeeded in what I wanted to achieve and created Jira issue based on the Sentry error easily. It looks like there's a plenty of possibilities, how to continue - create Jira issues automatically based on the situation (not just manually), synchronize statuses of issues in Jira and Sentry etc. It looks very promising and I would consider Sentry as an option for my company and further testing, if I have any company :-).

1 comment

Comment

Log in or Sign up to comment
Bridget
Community Manager
Community Managers are Atlassian Team members who specifically run and moderate Atlassian communities. Feel free to say hello!
August 11, 2021

Such a high quality article, thanks @Hana Kučerová !

Like Hana Kučerová likes this
TAGS
AUG Leaders

Atlassian Community Events