> 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/platform-overview/pharos-platform-architecture/tracing/triton-tracing.md).

# Triton Tracing

Discover the combined potential of Triton and trace schedules for custom tracing.

**Triton** is Pharos's custom instrumentation framework—explicit logging calls in Apex, LWC, and Flows. When you combine Triton instrumentation with **trace schedules**, you get richer visibility: both the raw Salesforce debug log and Triton's custom logs, correlated by transaction.

***

## Triton + Trace Schedules: What You Get

| Source             | What It Provides                                                                 |
| ------------------ | -------------------------------------------------------------------------------- |
| **Trace schedule** | Raw Salesforce debug log—line-by-line execution, SOQL, governor limits           |
| **Triton**         | Custom business events, handled exceptions, performance metrics, transaction IDs |

When both are active in the same code path:

* **Debug log** shows the technical execution trace
* **Triton logs** show business-level milestones (e.g., "Order validated", "Payment API called")
* **Transaction ID** links them—view the full transaction timeline in one place

***

## Transaction Tracing

Triton supports **transaction IDs**—a GUID that links all log entries for a single business operation across execution contexts (LWC → Apex → Queueable → Flow → external API). When you trace an Issue with Triton-instrumented code:

1. Trace schedule captures the debug log
2. Triton logs in the same transaction share the transaction ID
3. Pharos correlates them into a single **transaction view**
4. You see the complete flow from user action to error

***

## When to Use Triton Tracing

| Scenario                  | Why It Helps                                                                                 |
| ------------------------- | -------------------------------------------------------------------------------------------- |
| **Complex integrations**  | Trace each step (auth, request, response, parse) with Triton; debug log shows Apex execution |
| **Multi-step workflows**  | Transaction ID links LWC → Flow → Apex → external call                                       |
| **Handled exceptions**    | Triton logs the catch block; you see what happened before the error                          |
| **Performance debugging** | Triton logs timing; debug log shows governor limit consumption                               |

***

## Triton Instrumentation Requirements

Triton doesn't run automatically—developers must add logging calls to code. For Triton Tracing to add value:

* The failing code path must include Triton logging calls (for example `Triton.error(...)` or `Triton.info(...)`)
* Triton 2.0 ships with no log-level rules, so every log is saved by default. If you've added [log-level rules](https://triton.pharos.ai/core-concepts/log-levels), make sure none of them filters out the level you need on this code path
* Transaction IDs must be passed through contexts if you want cross-context correlation

***

## Related

<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>🛠️ Pharos Triton Instrumentation</strong></td><td>Triton concepts and APIs</td><td><a href="https://docs.pharos.ai/platform-overview/pharos-platform-architecture/logs/log-ingestion-methods/pharos-triton-instrumentation.md">Pharos Triton Instrumentation</a></td></tr><tr><td><strong>🎯 Issue Tracing</strong></td><td>Trace schedules and results</td><td><a href="https://docs.pharos.ai/platform-overview/pharos-platform-architecture/tracing/issue-tracing.md">Issue Tracing</a></td></tr><tr><td><strong>🔬 Tracing Overview</strong></td><td>Full tracing guide</td><td><a href="https://docs.pharos.ai/platform-overview/pharos-platform-architecture/tracing.md">Tracing</a></td></tr><tr><td><strong>🔱 Configuration Guide: Triton</strong></td><td>Admin configuration steps</td><td><a href="https://docs.pharos.ai/configuration-guide/advanced/triton.md">Triton</a></td></tr></tbody></table>
