Optional
backendOptional
contextA 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.
Optional
manualSpecifies 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.
Optional
serviceSpecifies the name of the app.
Optional
sessionBy 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.
Optional
sessionKey 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.
Optional
storageSet 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.
Optional
versionSpecifies 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.