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.
OptionalnetworkOptions for recording network request and response headers and bodies, with controls for redacting sensitive data.
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.
OptionalurlURLs to not record headers and bodies for, and to not propagate trace
headers (e.g. traceparent) to. Each entry is matched as a
case-insensitive substring of the full request URL; a match suppresses
both recording and trace-header propagation for that request.
The backend URL for the application.