🏁Installing Pharos Triton
Your journey into logging starts here! This article details how to set up the Pharos Triton tools so you can incorporate logging into your own code base.
1. Installing and Configuring Pharos
First, install the Pharos managed package, which includes the observability platform. There are several options:
Signup for Pharos Free edition from our website.
Sign up for a paid edition trial by visiting our AppExchange listing here.
Next, complete the basic configuration steps. Please refer to the Pharos guide here. The entire process shouldn't take more than 10 minutes of your time, depending on how quickly the package installs in your org.
Pharos Free Edition is indeed free. Completely. Now and forever. No hidden fees. This is our contribution to the Salesforce community and we will stand by it.
2. Deploy Pharos Triton
There are 2 delivery methods. We recommend option A for its simplicity.
Option A: Deploy via an unlocked managed package
Option B: Visit us at this Github repo. The code is available and free for all to use and modify as necessary. Feel free to utilize your favorite IDE or deployment tool to release the logger code in all environments as necessary. We recommend that the log util is deployed to production once it has been vetted through your development process. As your sandboxes are refreshed the log util will become available there as well.
If you've evaluated Pharos in the past and installed the Error Generator package, you may notice there is a Log.cls file included. This is actually a condensed version of Pharos Triton with some slight modifications. We recommend you use the official Triton version, however.
3. Platform Event Setup
Pharos Triton is based on platform events. In other words, every time logs are flushed, a platform event gets fired off.
In this section we will configure Pharos to raise platform events, thus enabling the use of the log util.
Let's get started by navigating to Pharos Admin → Advanced → Triton. Follow the steps in this quick tutorial to complete the configuration, and you're done!
Feel free to run a test at the end as well. You can come back to the results in the Logs tab in case the test takes a little while.
Why Platform Events?
Platform events are a great way to ensure reliable logging that will not get rolled back no matter what happens to the original transaction. Platform event operations also don't not count against DML limits, which is important in high volume processing situations. It is the de facto standard for logging on the Salesforce platform and is utilized by many other open source logging frameworks. For more information about platform events please refer to Salesforce developer documentation.
4. Start Logging!
This is where the fun begins. We recommend you identify which use cases you'd like to tackle first such as troubleshooting, tracing or profiling, or anything else. Once you have an idea of what you'd like to start with, head on over to Apex Logging Basics to get started.
Last updated