Track frontend application UI events? Better way?

I want to build ELK application to track frontend events from my react application. I having two approaches in mind

  1. Store events in log file using winston package and later push it to logstash and elastic with filebeats
  2. Directly send the incoming events data to logstash with UDP protocol and later to elastic.

I want to understand which one is the better way to solve this problem. I am little concerned since beats use IO operations to read data, this might affect my server performance.

Have you perhaps considered the Real User Monitoring (RUM) agent?

Thanks @stephenb for your response. RUM looks fine. But considering the above options which you think will be better in terms of performance ?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.