type DebugLogLevel = 'TRACE' | 'INFO' | 'WARN' | 'ERROR' | 'NONE'; /** * Create custom internal monitoring log event. Logs can be accessed by calling {@link germainApm.rootWindow.state.debugLog} on the monitored window. * * @param {DebugLogLevel} level Log level type. * @param {string} message Log main content message. * @param {Object} [details] An optional JavaScript object containing additional information about this log. */ export function log(level: DebugLogLevel, message: string, obj?: Object | (() => Object)): void; /** * Stop Germain APM UX monitoring. It uninstalls all monitoring instrumentation but it doesn’t remove germainApm code from the monitored page. * It stops the monitoring immediately and it doesn't trigger any data flush at that point. * Monitoring will restart on the next full page load (server side load must occur, e.g. hard page navigation or full page refresh via F5). * * @param {boolean} [onAllTabs] If true, stop monitoring on all monitored tabs only if BroadcastChannel is supported by your browser. * If false, stop monitoring only on the active tab and keep it active on other tabs. Default: true. */ export function stop(onAllTabs?: boolean): void; /** * Stop Germain APM UX monitoring, flush all data available in browser’s cache and, optionally, remove any available state. * Internally it makes a call to {@link germainApm.stop(onAllTabs)}. Custom logout event generator should call {@link germainApm.uninstall(true, true)}. * Monitoring will restart on the next full page load (server side load must occur, e.g. hard page navigation or full page refresh via F5). * * @param {boolean} [clearSessionState] If true, clears also monitoring state from the browser’s storage and removes the entire monitoring metadata. * If false, keeps monitoring state in browser’s storage. Default: false. * @param {boolean} [onAllTabs] If true, stop monitoring on all monitored tabs only if BroadcastChannel is supported by your browser. * If false, stop monitoring only on the active tab and keep it active on other tabs. Default: false. */ export function uninstall(clearSessionState?: boolean, onAllTabs?: boolean): void; /** Create custom events, metrics and transactions. */ export const api: API; interface API { /** * Start custom UX transaction data point marker. * * @param {string} name Transaction unique name. It will identify this transaction and must be used to close it. * @param {Object} [details] Optional JavaScript object containing additional information about this transaction. */ startTransaction: (name: string, details?: Record) => void; /** * Close ongoing custom ransaction and generate UX transaction data point. * * @param {string} name Transaction name to close. Must be one of the transaction name that has been started beforehand. * @param {Object} [details] Optional JavaScript object containing additional information about this transaction. */ endTransaction: (name: string, details?: Record) => void; /** * Create custom UX event data point. * * @param {string} name Event name. * @param {Object} [details] Optional JavaScript object containing additional information about this event. */ createEvent: (name: string, details?: Record) => void; /** * Create custom UX metric data point with a numeric value. * * @param {string} name Metric name. * @param {number} value Metric numeric value. * @param {Object} [details] Optional JavaScript object containing additional information about this metric. */ createMetric: (name: string, value: number, details?: Record) => void; /** * Create custom UX transaction data point with provided duration. * * @param {string} name Transaction name. * @param {number} duration Transaction duration. To keep consistent with other transactions, use seconds as unit. * @param {Object} [details] Optional JavaScript object containing additional information about this transaction. */ createTransaction: (name: string, duration: number, details?: Record) => void; } /** * Initialize Germain APM UX Monitoring. * * @param {string} servicesUrl Germain APM services root URL, e.g. "http://localhost:8080" * @param {string} initialProfileName UX monitoring profile configured in Germain APM, e.g. "Salesforce PROD" * @param {string} applicationName Web-application name, e.g. "Salesforce" * @param {string} [serverHostname] Optional hard-coded server hostname, e.g. "instance123.sfdc.com" */ export function init(servicesUrl: string, initialProfileName: string, applicationName: string, serverHostname?: string): void; /** * Check if Germain APM UX Monitoring has been initialized and running. * * @returns {boolean} True if Germain APM UX Monitoring initialized and running. */ export function isInitialized(): boolean;