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

# Events

Configure Salesforce Event Monitoring log capture to track API errors, access failures, and unexpected exceptions as Pharos log records.

Event Monitoring converts selected [Salesforce EventLogFile](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_eventlogfile_supportedeventtypes.htm) events into Pharos log records. Unlike [log monitoring](https://docs.pharos.ai/configuration-guide/monitoring/logs.md) or [limits monitoring](https://docs.pharos.ai/configuration-guide/monitoring/limits.md), there are no spike, threshold, or frequency rules here — Pharos simply captures the events you choose, within the per-hour limit you set, and ingests them into the standard log pipeline.

Once captured, these logs are treated like any other Pharos log — they flow through enrichment, fingerprinting, issue tracking, notification rules, and retention. This gives you a single pane of glass for both your application errors and platform-level events.

{% hint style="warning" %}
**Salesforce Add-On Required**

[Event Monitoring](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/using_resources_event_log_files.htm) is a paid Salesforce add-on. If your org does not have the Event Monitoring license, this feature is not available.
{% endhint %}

***

## Accessing Event Monitoring

**Navigate:** Pharos App → **Pharos Admin** → **Monitoring** → **Event Monitoring**

Before enabling, the page shows the toggle in the off state:

![Event Monitoring — disabled state](https://4264222071-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fdl9tmJ56lvwg5XY63QYr%2Fuploads%2Fgit-blob-d09c1a3baeaee2cc5dfb213962f982a6794617f6%2Fevents-disabled.png?alt=media)

***

## Enabling Event Log Capture

Turn the **Enable Event Monitoring Log Capture** toggle on. When enabled, the system generates log records for all event types you activate in the table below.

![Event Monitoring — enabled with event types table](https://4264222071-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fdl9tmJ56lvwg5XY63QYr%2Fuploads%2Fgit-blob-adb220cc2c970377727f69317fb8b2f97945cad2%2Fevents-enabled.png?alt=media)

The table appears with columns:

| Column          | Purpose                                                                                    |
| --------------- | ------------------------------------------------------------------------------------------ |
| **Checkbox**    | Bulk select for batch operations                                                           |
| **Event Type**  | The Salesforce event being monitored                                                       |
| **Limit**       | Maximum number of log records generated per hour for this event type                       |
| **Description** | Summary of what the event captures, with a "Read More..." link to Salesforce documentation |
| **Active**      | Toggle to enable or disable capture for this specific event type                           |

Use the **Search** bar above the table to filter event types by name.

***

## Supported Event Types

Pharos supports a curated set of event types — specifically those that relate to **errors, exceptions, and access failures**. These are the events most relevant to application health monitoring.

![Event types table — close-up](https://4264222071-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fdl9tmJ56lvwg5XY63QYr%2Fuploads%2Fgit-blob-681f7df02b9c74c52adf078e2bff9db567d0224d%2Fevents-table.png?alt=media)

### API Events

{% tabs %}
{% tab title="SOAP API" %}
Captures details about your org's SOAP API request activity. Tracks inbound SOAP calls — useful for monitoring integrations that use the SOAP API (e.g., legacy middleware, data loaders, custom integrations).

**Key fields captured:** Request URI, method, response status, execution time, user agent, client IP.

**Default limit:** 100 logs/hour

[Salesforce Documentation](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_eventlogfile_supportedeventtypes.htm)
{% endtab %}

{% tab title="REST API" %}
Captures details about REST-specific API requests. Covers all inbound REST API calls — the most common integration pattern for modern Salesforce applications.

**Key fields captured:** Request URI, HTTP method, response status code, execution time, user context.

**Default limit:** 100 logs/hour

[Salesforce Documentation](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_eventlogfile_supportedeventtypes.htm)
{% endtab %}
{% endtabs %}

### Apex Events

{% tabs %}
{% tab title="Apex Callout" %}
Captures details about callouts (external HTTP requests) made during Apex code execution. Essential for monitoring outbound integrations — failed callouts often indicate downstream service issues or network problems.

**Key fields captured:** Callout URL, method, response status code, execution time, request size, response size.

**Default limit:** 100 logs/hour

[Salesforce Documentation](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_eventlogfile_supportedeventtypes.htm)
{% endtab %}

{% tab title="Apex REST API" %}
Captures information about every Apex REST API request — custom REST endpoints exposed via `@RestResource` classes. Monitors the health of your custom API surface area.

**Key fields captured:** REST resource, HTTP method, response status, execution time, user context.

**Default limit:** 100 logs/hour

[Salesforce Documentation](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_eventlogfile_supportedeventtypes.htm)
{% endtab %}

{% tab title="Apex SOAP" %}
Captures details about custom SOAP web service calls — Apex classes exposed via `webService` keyword. Monitors legacy SOAP-based custom APIs.

**Key fields captured:** SOAP method, execution time, response status, request/response sizes.

**Default limit:** 100 logs/hour

[Salesforce Documentation](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_eventlogfile_supportedeventtypes.htm)
{% endtab %}

{% tab title="Apex Trigger" %}
Captures details about triggers that fire in an organization. Monitors trigger execution including failures, governor limit consumption, and execution time — critical for diagnosing performance issues in bulk operations.

**Key fields captured:** Trigger name, entity, execution time, rows processed, success/failure status.

**Default limit:** 100 logs/hour

[Salesforce Documentation](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_eventlogfile_supportedeventtypes.htm)
{% endtab %}

{% tab title="Apex Unexpected Exception" %}
Captures information about unexpected (unhandled) exceptions in Apex code execution. This is often the most valuable event type — it catches errors that were not explicitly handled by try/catch blocks.

**Key fields captured:** Exception type, exception message, stack trace, executing class/method.

**Default limit:** None (unlimited) — **Active by default**

{% hint style="info" %}
This is the only event type that is enabled by default and has no per-hour limit. Unhandled exceptions are critical signals that should never be throttled.
{% endhint %}

[Salesforce Documentation](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_eventlogfile_supportedeventtypes.htm)
{% endtab %}
{% endtabs %}

### UI and Client Events

{% tabs %}
{% tab title="Aura Request" %}
Captures details of requests to Apex methods from Aura and Lightning web components. Use it to benchmark request time or identify the URI of an unsuccessful request. Covers `@AuraEnabled` method invocations from the client side.

**Key fields captured:** Action name, execution time, success/failure, request size, user context.

**Default limit:** 100 logs/hour

[Salesforce Documentation](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_eventlogfile_supportedeventtypes.htm)
{% endtab %}

{% tab title="Lightning Error" %}
Captures errors that occurred during user interactions with Lightning Experience and the Salesforce mobile app. These are client-side errors surfaced to the platform — JavaScript errors, component failures, and rendering issues.

**Key fields captured:** Error message, component name, page URL, browser details, user context.

**Default limit:** 100 logs/hour

[Salesforce Documentation](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_eventlogfile_supportedeventtypes.htm)
{% endtab %}

{% tab title="Visualforce Request" %}
Captures details of Visualforce page requests. Requests can originate from the browser (UI) or API calls that render Visualforce pages. Useful for monitoring legacy UI pages and PDF rendering.

**Key fields captured:** Page URI, view state size, execution time, response status, user context.

**Default limit:** 100 logs/hour

[Salesforce Documentation](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_eventlogfile_supportedeventtypes.htm)
{% endtab %}
{% endtabs %}

### Access and Security Events

{% tabs %}
{% tab title="Insufficient Access" %}
Captures details about errors relating to insufficient record access, so that you can troubleshoot and resolve access issues for your users. These events fire when sharing rules, profiles, or permission sets prevent a user from accessing a record.

**Key fields captured:** Record ID, entity type, user context, access level attempted, sharing reason.

**Default limit:** 100 logs/hour

[Salesforce Documentation](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_eventlogfile_supportedeventtypes.htm)
{% endtab %}

{% tab title="Login" %}
Captures details about your org's user login history. Tracks successful and failed login attempts — useful for security monitoring, detecting brute-force attempts, and auditing user access patterns.

**Key fields captured:** Login type, source IP, login URL, browser, platform, authentication method, success/failure.

**Default limit:** 100 logs/hour

[Salesforce Documentation](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_eventlogfile_supportedeventtypes.htm)
{% endtab %}
{% endtabs %}

***

## How It Works

1. Salesforce generates [EventLogFile](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_eventlogfile_supportedeventtypes.htm) records for platform activity
2. Pharos reads these events on a periodic basis
3. For each activated event type, Pharos converts the event data into standard **Pharos log records**
4. The **Limit** field caps how many logs are created per event type per **one-hour** rolling window
5. Logs enter the standard Pharos pipeline — enrichment, fingerprinting, issue tracking, notifications

{% hint style="info" %}
The per-hour limit prevents high-volume event types from overwhelming your Pharos log storage. If an event type generates more events than the configured limit within an hour, excess events are skipped. Adjust limits based on your org's volume and which event types are most critical.
{% endhint %}

***

## Recommended Configuration

| Priority   | Event Types                                  | Rationale                                                        |
| ---------- | -------------------------------------------- | ---------------------------------------------------------------- |
| **High**   | Apex Unexpected Exception, Lightning Error   | Unhandled errors directly impact user experience                 |
| **High**   | Insufficient Access                          | Access failures are often invisible to admins without monitoring |
| **Medium** | Apex Callout, Apex Trigger                   | Integration failures and trigger errors indicate systemic issues |
| **Medium** | Login                                        | Security monitoring and failed-login detection                   |
| **Low**    | SOAP API, REST API, Apex REST API, Apex SOAP | API monitoring — enable if you have active integrations          |
| **Low**    | Aura Request, Visualforce Request            | Client-side monitoring — enable for performance profiling        |

**Apex Unexpected Exception** is active by default for good reason — unhandled exceptions are the highest-signal errors in any Salesforce org.

***

## Combining with Other Monitoring

Event Monitoring logs feed into the same Pharos pipeline as all other logs. Once captured, you can:

* Create [log monitoring rules](https://docs.pharos.ai/configuration-guide/monitoring/logs.md) to detect spikes or patterns in event monitoring logs
* Set up [notification rules](https://docs.pharos.ai/configuration-guide/notifications.md) to alert on specific event types
* Use [log retention](https://docs.pharos.ai/configuration-guide/log-retention.md) to manage the volume of captured event logs
* Analyze event monitoring data with [Org Genie](https://docs.pharos.ai/configuration-guide/integrations/openai.md) for AI-powered insights

***

## Troubleshooting

| Issue                      | Cause                                         | Resolution                                                 |
| -------------------------- | --------------------------------------------- | ---------------------------------------------------------- |
| No event types appear      | Event Monitoring license missing              | Verify your org has the Salesforce Event Monitoring add-on |
| Events not generating logs | Toggle or individual event type not activated | Enable both the master toggle and specific event types     |
| Logs capped unexpectedly   | Per-hour limit reached                        | Increase the Limit value for that event type               |
| Missing some event data    | Limit too low for high-volume events          | Raise the limit or prioritize which event types to capture |

***

## Related

* [Monitoring Rules (Logs)](https://docs.pharos.ai/configuration-guide/monitoring/logs.md) — Spike, impact, and frequency detection on log records
* [Governor Limits Monitoring](https://docs.pharos.ai/configuration-guide/monitoring/limits.md) — Track platform resource consumption
* [Notifications](https://docs.pharos.ai/configuration-guide/notifications.md) — Alert on captured event logs
* [Salesforce Event Monitoring Documentation](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_eventlogfile_supportedeventtypes.htm) — Full reference for all EventLogFile event types
