Application performance monitoring (APM) is the process of using software tools and telemetry data to monitor the performance of business-critical applications. Businesses want to ensure that they maintain expected service levels and that customers receive a positive application experience. - AWS
NewRelic (our team’s first APM tool) has greatly assisted developers in identifying issues related to the speed of APIs and helps the team quickly respond to issues such as slowness, congestion, or system unavailability.
Based on the analysis of data flow in APM (NewRelic), developers can easily determine where the slowness occurs (which APIs? Which code sections?), and why it happens. A typical example is one incident that leads to SEPARATING THE ADMIN PART FROM THE APIs section, minimizing the negative impact of large SQL queries from the Admin part, which used to consume resources for Public APIs serving the app. Since then, there has been no more sudden spikes in computation for API queries.
ssh
. I prefer using Terminal with this doc https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-ssh-using-terminal but there are other options you can exploredocker
on Ubuntu. This document https://docs.docker.com/engine/install/ubuntu/ will help you like it did with mecurl -O https://github.com/getsentry/self-hosted/archive/refs/tags/23.11.2.tar.gz
tar -xvzf 23.11.2.tar.gz
cd 23.11.2
./install.sh
sudo docker compose up -d
You will need a domain name in order to let people access your Sentry. Detail instruction can be found in this article https://theappsguy.dev/configuring-domain-name-for-sentry-self-hosted?source=more_series_bottom_blogs
Install nginx
on your LightSail instance. I find this article very helpful when I tried to set up my nginx
https://theappsguy.dev/configuring-domain-name-for-sentry-self-hosted?source=more_series_bottom_blogs
The first time you access Sentry via your subdomain page, pay attention to the Root URL field. From my experience if you can do it right this first time, it saves you a lot of troubles handling with connection DSN later
You may ask what DSN is? Well, it’s for connection with your app. I used RoR so it is the string value for config.dsn
If the number of transactions you track is too large, you might run out of burst capacity and the instance will not work any more. Priority your trace sampler https://docs.sentry.io/platforms/javascript/configuration/sampling/
Sentry might not be able to name your transaction properly when you use GraphQL
. I run into this issue for Ruby https://github.com/rmosolgo/graphql-ruby/issues/3655. You’ll probably have to write your own custom tracer
Don’t forget to pick an instance with 4 cores and 8GB. You’ll run into obscure error message with lesser instance