Skip to main content
ComponentsEngine
Availability2017.1 or later

Before You Start

App, user, network

Deploy

Salesforce, then the wizard

Validate

Components and first data

Troubleshooting

Login and data gaps

Overview

The Salesforce.com Application Monitoring wizard connects a GermainUX Engine to one Salesforce org through the Salesforce API. It deploys the components that collect Event Monitoring logs, debug logs, org limits, audit and deployment history, usage statistics, Apex code and coverage, and instance status. For what Salesforce monitoring gives you, see Salesforce Operational Experience Intelligence. Browser monitoring (RUM JS or RUM Extension) is a separate deployment, described in Deploy Monitoring for Salesforce.

What the Wizard Creates

The wizard creates these components on the Engine you select. All of them belong to the Salesforce Application profile.

Before You Start

  • A GermainUX Engine that can reach Salesforce. See GermainUX Engine.
  • Outbound HTTPS (port 443) from the Engine to your My Domain host (for example acme.my.salesforce.com), to the login host you use (login.salesforce.com or test.salesforce.com), and to api.status.salesforce.com for instance status.
  • The Salesforce Event Monitoring add-on, for the Event Log Monitor. Without it, Salesforce provides no hourly event log files, and the other components still work.
  • A dedicated Salesforce integration user. Make it an API-only user, and don’t use a personal administrator account.
  • A Salesforce app for the login: an existing Connected App for username and password login, or an External Client App for JWT bearer login. See Prepare Salesforce.
  • Two folders on the Engine host with write access: one for event log files and one for debug logs.
  • Trace flags in Salesforce for the users whose debug logs you want. GermainUX collects debug logs that already exist and doesn’t create trace flags.

Permissions for the Integration User

Give the integration user these permissions through a permission set:

Deploy

Prepare Salesforce

Salesforce supports two logins for this integration. The wizard sets up username and password login. JWT bearer login uses a certificate instead of a password, and you switch the components to it after you run the wizard.
Use this login with an existing Connected App. Salesforce no longer lets you create new Connected Apps, External Client Apps don’t support this login, and Salesforce retires the OAuth username-password flow on February 20, 2027. For a new setup, use JWT bearer login.
1

Allow the username-password flow

In Salesforce Setup, open OAuth and OpenID Connect Settings, and turn on Allow OAuth Username-Password Flows. Orgs created recently block this flow by default.
2

Check the Connected App

In App Manager, open the Connected App you use for GermainUX. Make sure Enable OAuth Settings is on and the selected scopes include Manage user data via APIs (api). Note the Consumer Key and Consumer Secret.
3

Authorize the integration user

Under Manage Connected Apps, edit the app’s policies. Set Permitted Users to Admin approved users are pre-authorized, and add the integration user’s permission set.
4

Decide on IP restrictions

Either set IP Relaxation to Relax IP restrictions for the Engine’s IP address, or append the user’s security token to the password when you create the credentials in GermainUX.

Run the Wizard

1

Open the wizard

In the left menu, go to Settings > Wizards. On the Salesforce.com Application Monitoring card, select Add.
2

Select the Engine host

In Servers, select the host that the GermainUX Engine runs on, and then select Apply. The wizard creates the components on that Engine.
3

Fill in the fields

Enter the values from the table below. To add a URL, a folder or credentials that don’t exist yet, use the create option next to the field.
4

Finish

Select Finish. GermainUX creates the components, and they start at minute 30 of the next scheduled hour.
Salesforce.com Application Monitoring wizard with the Salesforce URL, login URI, client ID, credentials and log folders filled in

Salesforce.com Application Monitoring Wizard - GermainUX

Use JWT Bearer Login

Do this only for the JWT Bearer login. It changes the five components that log in to Salesforce: Event Log Monitor, Audit Monitor, Stats Monitor, Code Monitor and Debug Log Monitor.
1

Create credentials for the private key

In the left menu, go to Settings > Data Sources > Credentials, and create credentials with the integration user’s user name, and the content of germainux-salesforce.key as the password. The key can be on one line.
2

Change the login request of each component type

In the left menu, go to Settings > System > Engine Settings > Component Types. For each of the five component types, edit the login target GetAccessToken and replace its parameters with these two:
3

Switch each component to JWT

In the left menu, go to Settings > Germain > State, and open the Components tab. For each of the five components, set Auth Policy to JWT, set Credentials to the credentials from step 1, and add two references:
4

Save

Save each component. At every login, the Engine signs a new assertion that is valid for three minutes.

Collection Schedule and API Usage

Each component runs at minute 30 of the hour, every whole number of hours. The intervals are under Advanced in the wizard. At the default intervals, the components make about these Salesforce API requests: Each run of a component that logs in requests a new access token first. The Event Log Monitor and Debug Log Monitor look back 2 hours on each run, so a run that’s skipped is caught up by the next one. The components use version 60.0 of the Salesforce REST API.

Validate

1

Check the components

In the left menu, go to Settings > Germain > State, open the Components tab, and search for Salesforce. All ten components should be listed, enabled, on the Engine you selected.
2

Wait for the first run

The monitors run at minute 30 of the next scheduled hour. Salesforce publishes each hourly event log file about an hour after the hour ends, so allow two to three hours for the first Event Monitoring data.
3

Open the Salesforce Logs dashboard

In the left menu, go to Dashboards > IT > Application > Salesforce > Salesforce Logs. Logins, Lightning page views, API calls and Apex executions appear here first.
Components tab of the State screen listing the ten Salesforce components and their status

Salesforce Components on the State Screen - GermainUX

Salesforce Logs dashboard showing logins, Lightning page views, API calls, Apex executions and errors over five days

Salesforce Logs Dashboard - GermainUX

Example: A Release Slows Down Apex

In this example, a release changes the Opportunity pricing code in the morning. Open the Analysis Dashboard on Salesforce Log Apex Execution for that day. VS RECENT shows Apex executions take 2.2 seconds on average, against 0.48 seconds at the same hours on the previous days. The Relationships chart shows when: durations stay high from mid-morning, after the release, to mid-afternoon.
Analysis of Salesforce Log Apex Execution on the release day, 2.21 seconds on average against 0.48 seconds on the previous days, with durations high from mid-morning to mid-afternoon

Apex Executions on the Day of a Release - GermainUX

To see what changed in a slow execution, compare it with a normal one.

Example: Compare a Slow Save with a Normal One

Once Apex executions arrive, you can put a slow one next to a normal one and see what changed. In this example, a release changes the Opportunity pricing code, and Opportunity saves slow down on the same morning.
1

Pick the slow save

Open the drillthrough of Salesforce Log Apex Execution for the day of the release, sorted by duration. Open the actions of the slowest save and choose Compare with another datapoint.
2

Pick a normal save

Change the time range of the drillthrough to a normal day, and find a save of the same entry point. Open its actions and choose Compare with the primary datapoint.
3

Read the differences

The Compare page shows both saves side by side. Here, the save takes 14.6 seconds instead of 0.5, and the Measures card shows why: it runs 101 SOQL queries instead of 3. A query in a loop is the cause, not Salesforce or the network.
Compare page of two Apex executions of the Opportunity pricing controller, 14.57 seconds on the release day against 0.53 seconds two days earlier, with 101 SOQL queries against 3 in the Measures card

Slow Opportunity Save Compared with a Normal One - GermainUX

Fix the code, then compare a save after the fix with the same normal one.

Example: Salesforce Is Slow, Not Your Code

In this example, Salesforce reports a minor incident on your instance one afternoon. Open the analysis of Salesforce Log Lightning Page View for that afternoon. Pages take 2.4 seconds on average, against 1.7 seconds on the previous days. Leading Factors list many users and no single page, so no release or page of yours is the cause. To confirm, check Salesforce Instance Status for the same hours.
Analysis of Salesforce Log Lightning Page View during a Salesforce minor incident, 2.37 seconds against 1.68 seconds on the previous days, with Leading Factors spread over many users

Lightning Page Views During a Salesforce Incident - GermainUX

Example: An Integration Uses Up the API Limit

In this example, the ERP integration re-syncs Opportunities one morning. Open the analysis of Salesforce Log Api with the number of calls as the measure. The morning has 559 API calls, against 122 at the same hours on the previous days. Leading Factors point to the integration’s address and its MuleSoft API calls. Check Salesforce Resource Usage to see how close the org came to its daily API limit.
Analysis of Salesforce API calls during an integration re-sync, 559 calls against 122 on the previous days, with the integration address and MuleSoft API paths as Leading Factors

API Calls During an Integration Re-Sync - GermainUX

Spread the re-sync over a longer window, or move it to the night, so users keep enough API capacity.

Troubleshooting

The message “Please assign an engine to be responsible for monitoring the Salesforce Application before applying a profile to this host” means no GermainUX Engine runs on the host you selected in Servers. Select the host of an Engine that is installed and registered. See GermainUX Engine.
Salesforce rejected the login. Check these, in order:
  • The user name, password and security token in the credentials. A password change also changes the security token.
  • The Login URI: test.salesforce.com for a sandbox, login.salesforce.com or your My Domain URL for production.
  • For username and password login: Allow OAuth Username-Password Flows is on, and the org isn’t one that blocks the flow.
  • The integration user is pre-authorized for the app, and the app is the one whose consumer key you entered.
  • For JWT bearer login: the certificate in the app matches the private key, the user name in the credentials is the integration user, and the Engine’s clock is correct.
  • The org has the Event Monitoring add-on, and the integration user has View Event Log Files.
  • Enough time has passed. Salesforce publishes hourly files with a delay, so data arrives two to three hours after the activity.
  • The Log Directory exists on the Engine host and the Engine can write to it, and the disk isn’t full.
The Event Log Monitor looks back 2 hours on each run. If you change the log monitoring interval, keep Timespan of query at least as long as the interval, or hours between runs are never collected.
GermainUX collects only debug logs that exist in Salesforce. Set a trace flag for the users you want to trace, in Salesforce Setup under Debug Logs. Trace flags expire, and Salesforce deletes old logs and limits the space they use, so renew the trace flag while you need the logs.
Check the Instance Name against Company Information in Salesforce Setup, and that the Engine can reach api.status.salesforce.com.
GermainUX takes the user name from the Login event of the session. Activity from a session that started more than 24 hours earlier, or before the Event Log Monitor started, shows without a user name.

Next Steps

Configure Monitoring for Salesforce

KPIs, SLAs, alerts and each monitored feature

Salesforce KPIs

What the components measure

Get Help

Contact GermainUX Support

The GermainUX team helps you get up and running faster, empower your team, turn data into actionable insights, and optimize performance to deliver measurable business outcomes.

Can't Find What You Need?

Search all GermainUX docs with Ctrl + K, or use the feedback buttons at the bottom of this page to tell us what is missing.

The content of this document is proprietary to GERMAIN SOFTWARE.