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.
OptionalcustomCustom headers to include with OTLP exports.
OptionaldebugDebug mode - enables additional logging.
OptionaldisableWhether errors tracking is disabled.
OptionaldisableWhether logs are disabled.
OptionaldisableWhether metrics are disabled.
OptionaldisableWhether traces are disabled.
OptionalotlpThe endpoint URL for the OTLP exporter.
OptionalresourceAdditional resource attributes to include in telemetry data.
OptionalserviceThe service name for the application.
OptionalserviceThe service version for the application.
OptionalsessionSession timeout in milliseconds.
OptionaltracingSpecifies where the backend of the app lives. If specified, the SDK will attach tracing headers to outgoing requests whose destination URLs match a substring or regexp from this list, so that backend errors can be linked back to the session. If 'true' is specified, all requests to the current domain will be matched.
OptionalurlA list of URLs to block from tracing.
The backend URL for the application.