> 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/monitoring/event-monitoring.md).

# Event Monitoring

Integrate with Salesforce Event Monitoring add-on to track events and set thresholds.

Event Monitoring in Pharos integrates with the **Salesforce Event Monitoring** add-on to capture select event types as logs. These events—such as Apex exceptions, Lightning errors, and API activity—are ingested into Pharos and appear alongside other log records, enabling unified search, reporting, and notification rules.

{% hint style="warning" %}
**Salesforce Add-On Required:** Event Monitoring is a paid Salesforce add-on. Your org must have Event Monitoring enabled. If not, this feature is unavailable.
{% endhint %}

***

## What Event Monitoring Adds

Pharos's automated error tracking captures unhandled exceptions, flow failures, and batch job errors. Event Monitoring extends that coverage by capturing **additional event types** that Salesforce exposes through its Event Monitoring API—including:

* **Apex Callout** — External HTTP callouts during Apex execution
* **Apex REST API** — REST API calls from Apex
* **Apex Trigger** — Trigger execution events
* **Apex Unexpected Exception** — Exceptions in Apex (complements automated capture)
* **Lightning Error** — Errors during Lightning/LWC interactions
* **Insufficient Access** — Record access errors
* **Login** — User login events (for security and audit correlation)
* **REST API** / **SOAP API** — API request activity

Each event type with an **error state** can be captured as a Pharos log record.

{% hint style="info" %}
External callout event types (such as Apex Callout) are ingested as **Apex**-category logs with Functional Area set to **Integration**—matching how custom Apex callout logging is categorized. This makes `Functional Area = "Integration"` the natural filter for routing integration errors in notification and monitoring rules.
{% endhint %}

***

## How It Works

Salesforce records platform activity in `EventLogFile` records. Pharos reads those on a periodic basis and, for each event type you've activated, converts the event data into ordinary Pharos log records.

That conversion is the important part: once an event becomes a log, it is indistinguishable from any other log in the system. It gets enriched, fingerprinted, and grouped into issues, and it can drive notification, ticketing, and retention rules exactly like an Apex exception can. Event Monitoring doesn't add a parallel pipeline — it adds a new source feeding the existing one.

Each event type carries a per-hour cap on how many logs Pharos will create from it, which is what keeps a high-volume type from flooding your storage. Events beyond that cap in a given hour are skipped rather than queued.

For enabling it and choosing event types, see [Event Monitoring](https://docs.pharos.ai/configuration-guide/monitoring/events.md).

***

## No Spike or Threshold Patterns

Unlike [Log Monitoring](https://docs.pharos.ai/platform-overview/pharos-platform-architecture/monitoring/log-monitoring.md) or [Governor Limits](https://docs.pharos.ai/platform-overview/pharos-platform-architecture/monitoring/governor-limits.md), Event Monitoring does **not** support spike detection or threshold rules. Events are captured as logs when they occur, within the per-hour limit.

{% hint style="info" %}
**For pattern alerting:** Use [notification rules](https://docs.pharos.ai/configuration-guide/notifications.md) on the resulting logs or configure log-based monitoring rules.
{% endhint %}

***

## Controlling Data Volume

The **Limit** (max logs per hour) per event type prevents Event Monitoring from overwhelming your org:

| Factor           | Consideration                                         |
| ---------------- | ----------------------------------------------------- |
| **Event volume** | High-traffic orgs may need lower limits               |
| **Storage**      | More logs consume more Data Storage                   |
| **Retention**    | Log retention rules apply to event logs               |
| **Criticality**  | Prioritize event types most relevant to your use case |

***

## 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>📊 Configuration Guide: Events</strong></td><td>Admin configuration steps</td><td><a href="https://docs.pharos.ai/configuration-guide/monitoring/events.md">Events</a></td></tr><tr><td><strong>📈 Log Monitoring</strong></td><td>Log-based spike and user impact rules</td><td><a href="https://docs.pharos.ai/platform-overview/pharos-platform-architecture/monitoring/log-monitoring.md">Log Monitoring</a></td></tr><tr><td><strong>⚡ Governor Limits</strong></td><td>Limit monitoring</td><td><a href="https://docs.pharos.ai/platform-overview/pharos-platform-architecture/monitoring/governor-limits.md">Governor Limits</a></td></tr></tbody></table>
