OptionalbackendOptionalcontextA function that returns a friendly name for a given context. This name will be used to identify the session in the observability UI.
contextFriendlyName: (context: LDContext) => {
if(context.kind === 'multi' && context.user?.email) {
return context.user.email;
} else if(context.kind === 'user') {
return context.key;
}
// Use the default identifier for contexts which don't contain a user.
return undefined;
}
The context to get a friendly name for.
The friendly name for the context, or undefined to use the default identifier.
OptionalmanualSpecifies if Highlight should not automatically initialize when the class is created.
This should be used with .start() and .stop() if you want to control when Highlight records.
OptionalserviceSpecifies the name of the app.
OptionalsessionBy default, session data is stored in the sessionStorage of the browser.
Set to true to store session data in a cookie instead.
This can help with compliance for cookie-consent regulation.
OptionalsessionKey to use to determine the sessionSecureID in order to override session generation logic. If a sessionKey is provided, the session will be combined with the previous session with the same key. Otherwise, the current session logic will be used to generate a sessionSecureID.
OptionalstorageSet to sessionStorage to bypass all window.localStorage usage.
This can help with compliance for cookie-consent regulation.
Using sessionStorage will cause app close+reopens to start a new highlight session,
as the session ID will not persist.
OptionalversionSpecifies the version of your application. This is commonly a Git hash or a semantic version.
Specifies where to send Highlight session data. You should not have to set this unless you are running an on-premise instance.