Run API
Custom Data API
Create a Transaction
Create a Log
User Monitoring & Session Replay APIs
Overview
GermainUX RUM JS provides JavaScript APIs that allow developers to control User Monitoring and generate custom monitoring data directly from a monitored web application. The APIs are organized into two main groups:Run API
The Run API allows an application to control the RUM JS monitoring lifecycle. Available operations include:- Start Monitoring
- Stop Monitoring
- Uninstall Monitoring
Start Monitoring
User Monitoring normally starts automatically after thegermainapm.js script has been downloaded and loaded by the monitored application.
Therefore, start() does not normally need to be called explicitly.
Use it when monitoring has previously been stopped using germainApm.stop().
Parameters
Example
Stop Monitoring
Usestop() to immediately stop User Monitoring.
- Uninstalls the active monitoring instrumentation.
- Does not remove the
germainApmcode from the monitored page. - Does not immediately flush collected data.
- Allows monitoring to restart following the next full server-side page load, such as a hard navigation or browser refresh.
Parameters
Example
Uninstall Monitoring
Useuninstall() to stop monitoring, flush available data from the browser cache, and optionally clear the monitoring state.
uninstall() calls:
Parameters
Custom Data API
The Custom Data API allows developers to generate organization- or application-specific monitoring data. Custom data can be created as:- UX Events
- Metrics
- Transactions
- Logs
- Login activity
- Checkout steps
- Add-to-cart actions
- Search activity
- Workflow milestones
- Business errors
Show all 9
Show all 9
- Application states
- Processing durations
- Custom performance measurements
Create an Event
UsecreateEvent() to create a custom UX Event.
Parameters
Example
Create a Metric
UsecreateMetric() to create a custom UX Metric with a numeric value.
Parameters
Example
Create a Transaction
Use a custom Transaction when you want to measure a user or application activity that has a duration. The generated data is associated with the Browser Transaction KPI. GermainUX supports two approaches:- Provide the duration directly.
- Allow GermainUX to calculate the duration between start and end markers.
Transaction with a Known Duration
When the duration is already known, use:Parameters
Example
Transaction with a Calculated Duration
When the duration is not known in advance, usestartTransaction() and endTransaction().
Start Transaction
End Transaction
Example
Create a Log
UsegermainApm.log() to generate a custom internal monitoring log event.
Parameters
‼ Log an Error
For example:Log Trace Information
For example:Using Custom Data with Session Replay
Custom Events, Metrics, and Transactions provide additional application and business context for User Monitoring. For example: User starts checkout ↓ Application calls:Choosing the Appropriate Custom Data Type
Validate Custom Data
After implementing an API:Deploy the change in a test or non-production environment
Start a monitored session
Execute the application workflow that calls the API
Confirm that the expected custom data reaches GermainUX
Verify the associated KPI
Confirm the event, metric, or transaction contains the expected details
Open the associated user session when applicable
Confirm that the custom data correlates with the expected user activity
Validate that sensitive information is not included in custom details objects
Security & Privacy
Custom API calls can include application-specific information through theirdetails objects.
Do not send passwords, authentication tokens, secrets, payment information, or other sensitive information through custom monitoring data.
Before production deployment:
- Review the information included in custom data.
- Minimize personally identifiable information.
- Apply applicable masking and privacy requirements.
- Validate access permissions.
- Avoid exposing credentials or secrets in logs.
- Test custom API calls with controlled sessions.
Additional Resources
- Troubleshoot User Monitoring and Session Replay
- AI Insights & Recommendations
- More Analytics Features
- More Automation Features
- Dashboard & Reports
- Management Features.
Get Help
Contact GermainUX Support
Can't find what you need?
The content of this document is proprietary to GERMAIN SOFTWARE.

