https://community.kronos.com/s/article/How-To-Grab-a-HAR-File


Goal/Question/Problem
HAR is the short form for HTTP Archive format, which tracks all the logging of web browser's interaction with a site. HAR files can be a requirement for troubleshooting issues specifically for problems listed below:
  • Performance Issue: slow page load, timeout when performing certain task
  • Page rendering : incorrect page format, missing information
First line troubleshooting can be conducted by following this guide. Providing these information to the support team will help expedite the troubleshooting process.

Before you begin

It is highly recommendedto generate multiple HAR files for comparison. Below are guidelines for effective information gathering:
  1. Generate a HAR file for an unaffected page (without performance issue or page rendering issues). Example. Dashboard, Issue View, Issue Search and Project page.
  2. Generate a HAR file for an affected page. Generate multiple times to get the better average and capture the consistent timing
Environment
Answer/Solution

Chrome

It is recommended to use Chrome to generate HAR files because it natively provides the Developer Tools to facilitate this. To learn more about the Chrome's developer tools, you can head towards this link.

Toolset
Chrome is bundled with a set of Developer Tools as covered in that link.

Providing Information to Support
  1. Bring up the developer tools using one of these methods:     
    • Using Keyboard Shortcut (⌘⌥I on OS X, Ctrl + Shift + i on Linux, F12 on Windows)
    • From Chrome Menu at the top-right of your browser window, then select Tools > Developer Tools.
  2.     
  3. Navigate to the Network tab on the Development Tool
  4. Check Disable Cache option to prevent caching of resources for this specific page.
  5. Refresh the page to start capturing the traffic between the browser to the server.
  6. Please capture a full page load so we can see the requests made prior to the problem we're analyzing.
  7. Complete the steps that trigger or demonstrate your issue.
  8. Right Click in the area where the network records are shown and select Save as HAR with content
  1. Before sending the HAR file to Atlassian, ensure to remove/censor any sensitive information using a text editor (i.e. remove passwords, secrets, etc).
 

Firefox

Toolset
Firefox comes with an embedded set of developer tools that you can use for troubleshooting.

Providing Information to Support
  1. Go to Tools > Web Developer > Network
  2. Refresh the page to start capturing the traffic between the browser to the server.     
    • Note: Please capture a full page load so we can see the requests made prior to the problem we're analyzing.
  3.     
  4. Complete the steps that trigger or demonstrate your issue.
  5. Click on Export followed by Save As... to save the HAR file
  1. Before sending the HAR file to Atlassian, ensure to remove/censor any sensitive information using a text editor (i.e. remove passwords, secrets, etc).It can also be helpful to obtain an export of the console.


Microsoft Edge

Toolset
Microsoft Edge has an inbuilt Developer tools.

Providing Information to Support
  1. Go to Developer tools using the F12 keyboard shortcut
  2. Refresh the page to start capturing the traffic between the browser to the server.      
    • Note: Please capture a full page load so we can see the requests made prior to the problem we're analyzing.
  3.     
  4. Complete the steps that trigger or demonstrate your issue.
  5. Click on Export as HAR (Floppy button next to the stop button on the Developer Tools) followed by Save As... to save the HAR file.


Analyzing Web Requests

  • The steps taken to analyze the Web Requests captured by HAR file varies depending on the troubleshooting Performance Issue or Page Rendering issue.
  • A common tool that is used to view the HAR files generated is HAR Viewer which is available as a Web Application.
Troubleshooting Performance Issues
The interested information for Performance issue is the load time and which request is causing the delay on the browser to serve the content to the user. So an understanding towards the definitions used for Web Request is required for effective troubleshooting, see below:
  • The below is extracted from HAR file loaded in HAR Viewer or Google's tool, HAR Analyzer.
  •  Highlighting any web request after loading the HAR file will reveal the information below:

Request start time since the beginning
The highlighted request is called after how long from the initial request. Example: Like below +6.32s means the current request is being called after 6.32 seconds after the initial request (Most of the time HTML request as the initial one)


Waiting
Amount of time waiting for the Server to respond. If this value is high, it could mean:

If the time waiting is low locally then the networks between your client and the server are the problem. The network traversal could be hindered by any number of things. There are a lot of points between clients and servers and each one has its own connection limitations and could cause a problem. The simplest method to test reducing this is to put your application on another host and see if the time waiting improves.

That the server is busy or suffering a performance issue. Below we can see that there is around 2 seconds wait time from the server; this scenario was due to a complex jql query:


Typically when in this situation, cross check for any heavy running tasks (Example : Creating Backup, Reindex).

If this is always seen during a specific time of the day, record the time of occurrence and create support ticket at support.atlassian.com for assistance on identifying the root cause.

Receiving
This one is the amount of time used for the server to transfer the required information to the client. Typically this is the where we detect is a network issue. See below for an example:This example above has a 1.6 seconds wait time, which took most of the delay for the request to complete.
DOM Loaded
DOM loaded means that all the HTML has been received and parsed by the browser into the DOM tree which can now be manipulated.
It occurs before the page has been fully rendered (as external resources may have not yet fully downloaded - including images, CSS, JavaScript and any other linked resources).

Do not confuse with onload event:
The onload event occurs when an object has been loaded. onload is most often used within the <body> element to execute a script once a web page has completely loaded all content (including images, script files, CSS files, etc.).

The onload event can be used to check the visitor's browser type and browser version, and load the proper version of the web page based on the information.

Ref: http://www.w3schools.com/jsref/event_onload.asp

Page Loaded
Total time taken for the page to be fully loaded. (Inclusive of AJAX call or any REST call from javascript to populate data on external server: Example, google analytics)

It does not means that the page is white without any content until the page is fully loaded, the page normally will show after the onload event, after that it will populate the information from the external call. Such as Dashboard Gadget when loading:If you have external resources to populate the page (Gadgets, external links) It could take a longer time to completely load the page, however it is not depending on the performance of the server but rather the speed to handle the request from other site/server.
Size
The size of the request being served plays a role on performance issue as well, for better understanding on how it contributes to delay:

How long will it take to serve the 2.4MB data? A calculation is shown below:
  • 3Mbps = Approximate 0.375MBps (note: B = byte, b = bit)
  • In order to get 2.4MB, you will need:
  • 2.4MB/0.375MBps = 6.4 seconds
And this depends on the throughput available, generally can run a Speed Test and check the throughput to server nearest to the hosting datacenter.

A similar view is obtained by viewing the Network tab on respective browser types listed above.

Steps to analyze is very straight forward if the above definition is clearly understood:
  1. Search for the delay responding request (typically the longest bar viewing the total web requests)
  2. Identify what is the longest waiting time, and how long it waited
  3. Check what is the main contributor towards the delay (Blocking, Waiting or Receiving)
  4. Run consistency checking by reloading the page multiple time
  5. Seek for assistance from the Support team with the information captured if identifying the Server is contributing the delay. For other issues, such as network, it is faster to reach out directly to the ISP or internal hosting team for assistance. The information gathered should be suffice to show the observation.


Troubleshooting Rendering Issue

In common cases, when a page fails to render correctly, the cause should be logged in the Consoletab from the Developer Tools. If no reason is logged, try disabling the browser cache by checking the box next to Disable Cache. This will force the browser to render the page from scratch instead of using cached data. Similarly the status code from the HAR file can also help to identify which request could have caused the issue.

It is important to be able to identify the status code from the HAR files generated as well. Below is few of the common example:
  • 200 - Success
  • 404 - Page not found / Bad Request
  • 401 - Unauthorized
  • 403 - Forbidden 
  • 304 - Not Modified (Content is cached)
  • 500 - Internal Server Error
For the definition of the error, you can refer to the HTTP/1.1 Status Code Definition page for detail.

After capturing the consistent behavior, provide this information to the support team together with the steps taken for the Support team to work on potential cause behind the observation.