from Sentry Memo Performance Measurement with Sentry

export const getNewTalkID = () => {
  const transaction = Sentry.startTransaction({ name: "getNewTalkID" });
  const span = transaction.startChild({ op: "getNewTalkID" });
 
  fetch(...)...
    .then((text) => {
    	  ...
          span.finish();
          transaction.finish();
        });
    })
    .catch(() => {
      Sentry.captureMessage("ERROR_ON_SERVER: getNewTalkID");
      ...
    });
};

image

If the filter is set to p100, outliers are included in the order of slowest to fastest. In this example, there’s one outlier that took 16 seconds. Actually, this is what I wanted to know (the time it takes for the server to sleep and wake up after receiving a request). image


This page is auto-translated from /nishio/Sentryでパフォーマンス計測 using DeepL. If you looks something interesting but the auto-translated English is not good enough to understand it, feel free to let me know at @nishio_en. I’m very happy to spread my thought to non-Japanese readers.