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
customCustom headers to include with OTLP exports.
Optional
debugDebug mode - enables additional logging.
Optional
disableWhether errors tracking is disabled.
Optional
disableWhether logs are disabled.
Optional
disableWhether metrics are disabled.
Optional
disableWhether traces are disabled.
Optional
otlpThe endpoint URL for the OTLP exporter.
Optional
resourceAdditional resource attributes to include in telemetry data.
Optional
serviceThe service name for the application.
Optional
serviceThe service version for the application.
Optional
sessionSession timeout in milliseconds.
Optional
tracingSpecifies 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.
Optional
urlA list of URLs to block from tracing.
The backend URL for the application.