> For the complete documentation index, see [llms.txt](https://docs.pharos.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pharos.ai/configuration-guide/advanced/triton.md).

# Triton

Configure Triton in Pharos Admin (platform event, settings, log levels, persistence level, trace links) and use the X-Ray Machine to add logging to flows.

Pharos Triton is an open-source logging framework for Apex, LWC, and Flows. It publishes logs through the Pharos pipeline — enrichment, fingerprinting, categorization, and issue tracking all apply automatically.

Triton installs as its own unlocked package, **Pharos Triton**, on top of Pharos. Triton 2.0 requires Pharos 2.284.5 or later. See [Installing Pharos Triton](https://triton.pharos.ai/installing-pharos-triton).

**Navigate:** Pharos App → **Pharos Admin** → **Advanced** → **Triton**

The Triton area has its own left-hand navigation:

![Triton area navigation: Configuration, X-Ray Machine, Resources](https://4264222071-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fdl9tmJ56lvwg5XY63QYr%2Fuploads%2Fgit-blob-0a9bffc1a4b16d5b8219076724d2dddeee25c803%2Ftriton-nav.png?alt=media)

* **Configuration** — five tabs:
  * **Platform Event** — the subscriber user for Triton's platform event, suspending and resuming the subscription, and a test run.
  * **Settings** — the master logging switch, the Flow flush batch switch, and the flush-delay and cache-TTL knobs.
  * **Log Levels** — create, edit, and delete the log-level rules that decide which logs Triton keeps. Triton 2.0 ships with none, so every log is saved until you add one.
  * **Persistence Level** — the minimum level Pharos stores in this org. More verbose logs are dropped at ingestion; export to an OpenTelemetry backend is unaffected. The default, **Off**, stores every log.
  * **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. See [Backends & Routing](https://docs.pharos.ai/open-telemetry/hermes/backends.md).
* **X-Ray Machine** — adds Triton logging to a flow automatically (see below).
* **Resources** — install links, the source repository, and the Triton docs.

For the Platform Event, Settings, and Log Levels tabs in detail, see [Installing Pharos Triton](https://triton.pharos.ai/installing-pharos-triton) in the Triton docs. For full Triton documentation — APIs, configuration, Apex/LWC/Flow logging guides, and method references — see the dedicated Triton docs site.

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>🔱 Triton Documentation</strong></td><td>APIs, configuration, logging guides, and method references</td><td><a href="https://triton.pharos.ai">https://triton.pharos.ai</a></td></tr></tbody></table>

***

## X-Ray Machine

The X-Ray Machine automatically adds detailed logging across any flow — no manual Apex Action setup required. It instruments your flow by inserting Triton log calls between each element, giving you full execution visibility for troubleshooting, performance profiling, and audit.

{% hint style="success" %}
**Zero-code flow instrumentation.** The X-Ray Machine is the fastest way to add observability to flows. It works with screen flows, autolaunched flows, and scheduled flows. The only exception is **"before update" flows**, which cannot be instrumented.
{% endhint %}

### How It Works

The X-Ray Machine reads your flow's structure and automatically inserts **Apex Action** elements (Triton log calls) between each flow element. Each inserted action is named with the pattern:

> **Log After:** *\[previous element]*, **Before:** *\[next element]*

This creates a breadcrumb trail through the entire flow execution path, capturing timing, variable state, and execution context at every step.

### Using the X-Ray Machine

**Navigate:** Pharos Admin → Advanced → Triton → **X-Ray Machine**

![X-Ray Machine — default empty state](https://4264222071-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fdl9tmJ56lvwg5XY63QYr%2Fuploads%2Fgit-blob-1874e019e10562290ab0041e0de223daa1c657fe%2Fxray-empty.png?alt=media)

{% stepper %}
{% step %}

### 1. Select a Flow

Choose the flow you want to instrument from the dropdown. Any screen, autolaunched, or scheduled flow is eligible.
{% endstep %}

{% step %}

### 2. Select a Version

Choose which version of the flow to instrument. You can select an active version or a draft.
{% endstep %}

{% step %}

### 3. Select Type and Area

Set the **Type** (e.g., Screen Flow) and **Area** (e.g., Partners) for the log records. These values correspond to the log's categorization fields and are used for filtering, reporting, and notification rules.
{% endstep %}

{% step %}

### 4. Save As

Choose how to save the instrumented flow:

* **New Version** — creates a new version of the flow with the logging modifications (recommended)
* **Latest Draft** — saves the changes into the latest draft version

Click **Let's Go!** to run the X-Ray Machine.
{% endstep %}
{% endstepper %}

![X-Ray Machine — configured for "Partner Intake Form" flow](https://4264222071-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fdl9tmJ56lvwg5XY63QYr%2Fuploads%2Fgit-blob-2a98cc2411ef40f844dbb03fbdb02b1c97fc8bba%2Fxray-filled.png?alt=media)

Once complete, a **Visit Flow** link appears so you can review the instrumented flow in Flow Builder:

![X-Ray Machine — complete with Visit Flow link](https://4264222071-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fdl9tmJ56lvwg5XY63QYr%2Fuploads%2Fgit-blob-3414c56afbf3494e0b640a58030b97edca3e28df%2Fxray-complete.png?alt=media)

### Before and After

**Before X-Ray Machine** — the original flow with no logging:

![Flow before X-Ray Machine — clean flow without instrumentation](https://4264222071-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fdl9tmJ56lvwg5XY63QYr%2Fuploads%2Fgit-blob-e614777dc8590fed9a88c00583cb3043a4be7cd4%2Fflow-before-xray.png?alt=media)

**After X-Ray Machine** — the same flow with Triton log actions automatically inserted between every element (highlighted):

![Flow after X-Ray Machine — Triton Apex Actions inserted between each element](https://4264222071-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fdl9tmJ56lvwg5XY63QYr%2Fuploads%2Fgit-blob-ade01e503b4c24c414e2b76228d4365a832af926%2Fflow-after-xray.png?alt=media)

Every branch of the flow is instrumented, including decision branches and merge points. The inserted Apex Actions are standard Triton log calls — they feed into the same Pharos pipeline as all other logs, so you get enrichment, issue tracking, notifications, and all other platform capabilities.

***

## Manual Flow Logging

If you need selective logging rather than full instrumentation, you can add Triton's **Log** action (an Apex action) in Flow Builder yourself. This is useful when you only need visibility at specific decision points or integration callouts. See [Logging in Flow](https://triton.pharos.ai/flows) in the Triton docs for setup instructions.

***

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>🔱 Triton Documentation</strong></td><td>Full API reference, configuration guides, and examples</td><td><a href="https://triton.pharos.ai">https://triton.pharos.ai</a></td></tr><tr><td><strong>🔔 Notification Rules</strong></td><td>Alert on Triton-generated logs and issues</td><td><a href="https://docs.pharos.ai/configuration-guide/notifications.md">Notifications</a></td></tr><tr><td><strong>🛰️ Open Telemetry</strong></td><td>Export Triton and Salesforce telemetry to any OTLP backend with Hermes</td><td><a href="https://docs.pharos.ai/open-telemetry/open-telemetry.md">Open Telemetry</a></td></tr></tbody></table>
