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 quick start. The entire process shouldn't take more than 10 minutes of your time, depending on how quickly the package installs in your org.
2. Deploy Pharos Triton
There are 2 delivery methods. We recommend option A for its simplicity.
Option A: Deploy via an unlocked 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.
3. Triton Configuration
All of Triton's admin configuration lives in one place in the Pharos app. Navigate to Pharos Admin → Advanced → Triton.

The Triton area has its own left-hand navigation:
Configuration — the platform event, settings, log-level, persistence-level, and trace-link controls covered below.
X-Ray Machine — adds Triton logging to a Flow for you: it inserts Triton Log actions between the Flow's elements, giving you a breadcrumb trail without placing each action by hand. It works with screen, autolaunched, and scheduled Flows, but not with before-update Flows.
Resources — deployment links (sandbox / production install), the GitHub repository, and a link to this documentation.

Configuration is organized into five tabs — Platform Event, Settings, Log Levels, Persistence Level, and Trace Links.
3a. Platform Event
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. These controls now live on the Platform Event tab of Triton → Configuration.

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.
3b. Settings
The Settings tab exposes Triton's runtime switches and operational knobs. These map directly to Triton's TritonSettings__c custom settings.

Master Switch
Enable logging — the master switch for all Triton logging (Apex, Flow, and LWC). Turn it off to short-circuit every log before it is built or persisted — a global kill switch for maintenance windows or noisy incidents.
Enable flow flush batch — controls how Flow logs are published. When on, Flow logs are buffered and published by the asynchronous
TritonFlowFlushBatch. When off, Flow logs are flushed immediately (synchronously, in-transaction). Either way, logging never fails the Flow.
Operational Knobs
Leave a field blank to use Triton's packaged default.
Flow flush batch delay (minutes) — how long the flush batch waits before it runs, giving concurrent Flows time to add their logs to the shared buffer. Packaged default: 1 minute. Keep it below the Cache TTL: Flow logs still waiting in the cache when the TTL expires are never published.
Cache TTL (minutes) — how long Triton keeps the transaction id and buffered Flow logs in platform cache. Packaged default: 5 minutes.
For the mechanics behind these, see Buffering, Flushing & Deferred Publishing and the TritonFlowFlushBatch reference.
3c. Log Levels
The Log Levels tab is a visual editor for Triton's Log_Level__mdt rules — the same runtime filtering you'd otherwise manage as custom metadata. Each rule controls which logs Triton emits, scoped by any combination of Level, Category, Type, Area, Component, and User.

Click NEW to add a rule, or the pencil / trash icons to edit or delete an existing one. A rule sets a Level (the threshold) plus one or more scoping fields; leave a scope field blank to apply the rule more broadly.

For how thresholds and specificity are resolved, see Log Levels in Core Concepts.
3d. Persistence Level
The Persistence Level tab sets the minimum level Pharos stores in this org. Logs more verbose than that are dropped when Pharos ingests them, though they are still exported to an external telemetry backend if you have one. The default, Off, stores every log, and a log without a recognized level is always stored.
The two controls act at different points. A Log_Level__mdt rule stops Triton from publishing a log at all; Persistence Level decides what Pharos keeps after a log arrives. To reduce publishing volume, use Log Levels.
3e. Trace Links
Trace Links (Pharos 2.300 and later) — the OpenTelemetry backend that receives this org's logs through Hermes: Datadog, Grafana, Honeycomb, Splunk Observability, or a custom link template. Once set, every Log record page shows links that open the log's trace, or search for it, in that backend. The default, Off, shows no trace links.
4. Platform Cache Setup
Triton uses Org platform cache for two things: carrying a transaction id across contexts with Triton.withCache(), and holding Flow logs for the deferred flush batch, which is on by default. Both need a default partition with Org cache allocated, so set one up even if you never call withCache() yourself. (Triton's own Apex tests don't depend on it — they run against an in-memory stand-in for the cache.)
Creating a Cache Partition
Navigate to Setup → Platform Cache
Click New Platform Cache Partition
Configure the partition with the following settings:
Label:
Default(or your preferred name)Name:
DefaultDefault Partition: ✅ Check this box — This is critical! Triton requires a default partition to function properly with cache-based transaction management.
Allocating Org Cache Memory
In the Org Cache Allocation section, set the Organization value to at least
1MBClick Save
The image below shows the correct configuration with the Default Partition checkbox and Org Cache Allocation highlighted:

5. Configure Permissions
Pharos Triton comes with three permission sets to help manage access:
Triton End User
Purpose: Lets a user invoke Triton logging directly, from outside Apex
Access: Apex class access only — no object permissions, no field-level security, no custom metadata access
Includes: Access to the Triton Apex classes (
Triton,TritonBuilder,TritonFlow,TritonHelper,TritonLwc,TritonTypes)
Triton Read
Purpose: For users who need to view and analyze logs
Access: Read-only access to log fields and Log Level custom metadata, plus access to
LogLimitsController— the set grants no object-level CRUD and no system permissions of its ownIncludes:
Read access to Log Level custom metadata
Read access to all log fields (CPU time, heap size, SOQL queries, etc.)
When to use: Assign to developers, support staff, and business analysts who need to monitor and troubleshoot using logs
Triton Write
Purpose: For Triton and Pharos administrators, and for the platform-event subscriber that persists logs (see below)
Access: Read and edit access to log fields, read access to Log Level custom metadata, plus access to the Triton Apex classes — the set grants no object-level CRUD and no system permissions of its own
Includes:
Edit access to all log fields (CPU time, heap size, SOQL queries, span and transaction fields) — access to the Log object itself comes from your Pharos permission sets, not from this one
Read access to Log Level custom metadata — identical to
Triton Read. Creating or editing a Log Level rule additionally requires the Customize Application system permission, whether through the Triton console or through SetupAccess to the Triton Apex classes — those in
Triton End User, plusLogLimitsController
When to use: Assign to Triton administrators, Pharos platform administrators, and the running user of the log subscriber
Do you actually need Triton End User?
Salesforce only checks Apex class access at an entry point — the place where a user invokes Apex from outside Apex (an Aura/LWC @AuraEnabled call, an invocable action from a screen flow, a REST/SOAP request, a Visualforce controller). Once execution is inside Apex, every call it makes to another class runs unchecked, regardless of who kicked off the transaction.
That means the common case needs no permission set at all: a user saves a record, a trigger fires, the trigger's Apex calls Triton.log() to record what happened or catch an exception. The trigger runs in system context, so Salesforce never checks the user's access to the Triton classes. Your general user population does not need Triton End User just because their actions eventually cause a log to be written.
Triton End User is only needed by the user actually sitting at the entry point:
Path into Triton
Entry point?
Needs Triton End User?
Apex trigger → Triton.log()
No — runs in system mode
No
Apex class, batch, queueable, @future, scheduled
No
No
Record-triggered / autolaunched flow (system context)
No
No
Screen flow (user context) → Triton Log action
Yes — @InvocableMethod TritonFlow.log
Yes
LWC using the triton module
Yes — @AuraEnabled TritonLwc.saveComponentLogs
Yes
Visualforce / REST / SOAP calling Triton directly
Yes
Yes
Experience Cloud / guest users doing any of the above
Yes
Yes
Two things worth calling out explicitly:
Flows. The line that matters is user context vs. system context, not screen vs. autolaunched. Screen flows always run as the user, so the Log action needs
Triton End Useron anyone who runs one. Record-triggered and autolaunched flows default to system context and need nothing — but an autolaunched flow explicitly configured to run in user context does need the permission set.LWC is unavoidable. Any component built on the
tritonLWC module callsTritonLwc.saveComponentLogs, a hard@AuraEnabledentry point — there's no system-context path around it. Every user of an instrumented LWC needsTriton End User, full stop. If that component sits in a customer community, that means every community user. Plan for it rather than discovering it in production.
The platform-event subscriber needs Triton Write, not just Log_Admin
Triton publishes a platform event; a separate subscriber process performs the actual pharos__Log__c insert when that event is received. That subscriber's running user needs Triton Write, because several of the fields Triton populates — the limit fields (CPU time, heap size, SOQL queries, etc.) and the span/transaction fields — are un-namespaced custom fields the subscriber needs field-level security on, on top of whatever access Log_Admin already grants.
If the subscriber is missing Triton Write, logs will still land — but silently missing their limit and span data. There's no error to alert you; the record is just incomplete. If new Apex or Flow logs arrive with the essential limit fields (CPU time, heap size, SOQL queries, DML, callouts) empty, check the subscriber's permission sets before anything else. The extended limit fields stay blank unless a log asks for withFullLimitInfo(), and LWC logs carry no limit data.
Add the Log Limits component to the Log page
The logLimits component (Log Limits in Lightning App Builder) draws a usage bar for each governor limit a log captured. It can be placed only on the Log record page:
Open any Log record, then choose Edit Page from the Setup (gear) menu to open Lightning App Builder.
Drag Log Limits from the Custom components list onto the page.
Save, and activate the page if Salesforce prompts you.
The Log Limits component needs Triton Read or Triton Write
The logLimits LWC component (the one that renders limit-usage bars on a Log record page) calls LogLimitsController.getLimitUsage. LogLimitsController is granted by both Triton Read and Triton Write, so anyone already monitoring logs with either set can use the component.
It is not granted by Triton End User. A user whose only Triton permission set is Triton End User — or who has none at all — gets an Apex class-access error on that component specifically when they open a Log page containing it. If you place the component on a page such users can reach, give them Triton Read.
6. 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 Core Concepts to get started.
Last updated