Measure Axios Request Performance & Reliability

In this article, you'll learn how to measure the performance and reliability of your Axios requests.


Setup Axios interceptors

Now that you've connected your application to Polaris, you can start sending request measurements to Polaris. To do this, you'll need to set up Axios interceptors.

import axios from 'axios';
import { measure, Instrument } from '';

let instrument: Instrument;
axios.interceptors.request.use((config) => {
  instrument = measure('request');
  return config;

  (response) => {
    return response;
  (error) => {{ error });
    return Promise.reject(error);

Now, you can use Axios to make requests. All requests made with Axios will send measurements to Polaris.