Apex Code Monitoring for Salesforce Cloud (Configure)

⚙️ Configure Apex Code Monitoring for Salesforce

GermainUX monitors Salesforce Apex classes, triggers, source code, and test-coverage statistics.

🤝 This helps development and operations teams:

Benefit

Maintain an inventory of Apex classes and triggers

Review Apex source code from GermainUX

Track test coverage

Identify untested or insufficiently tested code

Detect code and coverage changes over time

Correlate Apex code information with related Salesforce issues

Review supporting evidence during root-cause analysis

Apex Code Monitoring is performed by the GermainUX Engine and is enabled automatically when Salesforce monitoring is deployed through the Salesforce Application wizard.

This feature collects Apex code metadata and test-coverage information on a schedule. For runtime exceptions, debug logs, or transaction-level performance, also configure the corresponding Salesforce monitoring features.

📋 Prerequisites

Before configuring Apex Code Monitoring, confirm that:

Requirement

A GermainUX Engine is deployed and running.

Salesforce monitoring has been deployed through the GermainUX Salesforce Application wizard.

The Salesforce OAuth connection is active.

The integration user can access the required Apex metadata and test-coverage information.

The selected GermainUX Engine can reach the Salesforce APIs.

The Salesforce organization has sufficient API capacity for the configured collection frequency.

For the initial integration, see Deploy GermainUX for Salesforce.

🚀 Enable Apex Code Monitoring

Apex Code Monitoring is enabled automatically during the initial Salesforce Application wizard deployment.

To deploy it:

  1. Open GermainUX Workspace.

  2. Open the left navigation menu.

  3. Select Wizards.

  4. Select Salesforce Application.

  5. Choose the GermainUX Engine that will monitor Salesforce.

  6. Enter the Salesforce connection and authentication settings.

  7. Expand Show Advanced if you need to customize the collection interval.

  8. Set Code Monitoring Interval.

    Code Monitoring Interval settings
    Code Monitoring Interval settings- Germain UX
  9. Complete the wizard.

The wizard creates a component with this type:

Salesforce Code Monitor

📅 Default Collection Frequency

By default, Apex Code Monitoring runs once per day.

Daily collection is appropriate for most environments because Apex source and test-coverage information usually changes only when code is deployed or tests run.

Use a more frequent schedule only when the additional freshness justifies the increased Salesforce API usage and GermainUX processing.

🔧 Configure the Frequency During Initial Deployment

When running the Salesforce Application wizard:

  1. Select Show Advanced.

  2. Locate Code Monitoring Interval.

  3. Enter the required execution frequency.

  4. Complete the wizard.

The configured interval determines how often GermainUX refreshes Apex class, trigger, and test-coverage information.

🔁 Change the Frequency After Deployment

To modify the schedule of an existing monitor:

  1. Open GermainUX Workspace.

  2. Open the left navigation menu.

  3. Select Germain.

  4. Open the State tab.

  5. Search for:

    Type Name = Salesforce Code Monitor
    
  6. Select the applicable monitor.

  7. Update Execution Schedule.

    Execution Schedule configuration for SFDC Instance Status component
  8. Save the change.

Confirm that the schedule is appropriate for the Salesforce organization’s deployment cadence and API limits.

⛔ Disable Apex Code Monitoring

To stop ongoing Apex code collection without removing the entire Salesforce integration:

  1. Open GermainUX Workspace.

  2. Open the left navigation menu.

  3. Select Germain.

  4. Open the State tab.

  5. Search for:

    Type Name = Salesforce Code Monitor
    
    image-20230330-102655.png
    Salesforce Code Monitor - Germain UX
  6. Locate the monitor associated with the intended Salesforce organization.

  7. Turn off the toggle in the Enabled column.

  8. Save the change if prompted.

Disabling the monitor stops future collection. Previously collected Apex information remains available according to the configured GermainUX retention policy.

✅ Re-enable Monitoring

To resume collection:

  1. Return to Germain → State.

  2. Search for Salesforce Code Monitor.

  3. Turn on the Enabled toggle.

  4. Confirm the execution schedule.

  5. Save the configuration.

  6. Allow the next scheduled execution to run.

📁 Information Collected

Depending on Salesforce permissions and available APIs, Apex Code Monitoring can collect information about:

Item

Apex class names

Apex trigger names

Source content

Code size and related metadata

Test-coverage statistics

Covered and uncovered code

Changes detected during subsequent collections

Organization and environment context

This information can be segmented and analyzed by available dimensions such as:

Dimension

Salesforce organization

Class

Trigger

Namespace

Collection time

Coverage level

Code version or deployment period

📊 Apex Code KPIs

The resulting KPIs help analyze Apex code inventory and test coverage.

See Apex Code KPIs for Salesforce.

Use these KPIs to identify:

What to identify

Apex classes with low test coverage

Triggers with insufficient coverage

Coverage regressions

Newly introduced or modified code

Code that requires additional review or testing

Differences between Salesforce environments

🖥️ View the Salesforce Code Dashboard

Open:

Dashboards → IT → Application → Salesforce → Salesforce Code

The dashboard can provide:

Feature

Apex class and trigger inventory

Test-coverage measures

Trends over time

Breakdown by class or trigger

Access to individual records

Drill-through to supporting Apex details

Select any relevant metric or record to open its detailed analysis.

🔎 Analyze Apex Source During Root-Cause Analysis

Apex class content collected by the monitor can be made available during analysis.

This helps teams:

  1. Detect an affected Salesforce KPI or issue.

  2. Identify the related Apex class or trigger.

  3. Open the corresponding instance or analysis view.

  4. Review available code and coverage information.

  5. Correlate it with exceptions, debug logs, user interactions, SOQL activity, or integration delays.

  6. Determine whether additional testing, code changes, or deployment validation is required.

Apex Code Monitoring provides code inventory and coverage context. Runtime execution evidence requires the applicable exception, debug-log, or transaction-monitoring configuration.

✅ Validate Apex Code Monitoring

After the first scheduled execution, verify that:

Check

The Salesforce Code Monitor component is enabled.

Its most recent execution completed successfully.

The next execution time matches the configured schedule.

Apex classes appear in the Salesforce Code dashboard.

Apex triggers appear.

Test-coverage statistics are populated.

The expected Salesforce organization is identified.

The integration user can access all intended Apex metadata.

No authentication, authorization, API-limit, or network errors appear in the Engine logs.

warning No Apex Data Appears

If the monitor runs but no Apex information is available:

  1. Confirm that the correct Salesforce organization is configured.

  2. Verify the OAuth connection.

  3. Confirm that the integration user can access Apex metadata and test-coverage data.

  4. Check that Salesforce Code Monitor is enabled.

  5. Review its execution schedule and last-run status.

  6. Confirm that the selected GermainUX Engine is running.

  7. Check connectivity from the Engine to Salesforce.

  8. Review Engine logs for Salesforce API errors.

  9. Check the Salesforce organization’s API usage and limits.

  10. Confirm that Apex classes, triggers, and coverage records exist in the organization.

⏳ Data Is Out of Date

If Apex information is present but not current:

  1. Check the monitor’s last successful execution.

  2. Confirm the configured Execution Schedule.

  3. Verify that recent executions did not fail.

  4. Review OAuth-token and Salesforce API errors.

  5. Confirm that Salesforce test coverage was recalculated after the latest code or test changes.

  6. Increase the monitoring frequency only if required and operationally acceptable.

For a more complete Apex analysis, configure:

Requirement

Guide

Capture Apex exceptions

Apex Exception Monitoring

Collect Salesforce debug logs

Debug Log Monitoring

Monitor Salesforce errors

Error Monitoring

Monitor user experience and replay affected sessions

User Monitoring and Session Replay

Configure broader Salesforce monitoring

Salesforce Monitoring Configuration

Combining these sources allows GermainUX to relate code and coverage information to the errors and user experiences affected by that code.

ℹ️ Get More Information

GermainUX can help determine which monitoring, analytics and automation capabilities are appropriate for your Windows Application environment.

Contact GermainUX Support.

Feature Availability: 2017.2 or later