@launchdarkly/observability + @launchdarkly/session-replay
    Preparing search index...

    Type Alias ObserveOptions

    ObserveOptions: CommonOptions & {
        consoleMethodsToRecord?: ConsoleMethods[];
        disableConsoleRecording?: boolean;
        enableLongtaskRecording?: boolean;
        enablePerformanceRecording?: boolean;
        enablePromisePatch?: boolean;
        enableReportingObserver?: boolean;
        environment?: "development" | "staging" | "production" | string;
        flagExposureDedupeMaxSize?: number;
        flagExposureDedupeWindowMillis?: number;
        networkRecording?: boolean | NetworkRecordingOptions;
        otel?: OtelOptions & { otlpEndpoint?: string };
        productAnalytics?: boolean | ProductAnalyticsEvents;
        reportConsoleErrors?: boolean;
        tracingOrigins?: boolean | (string | RegExp)[];
    }

    Type declaration

    • OptionalconsoleMethodsToRecord?: ConsoleMethods[]

      Specifies which console methods to record. The value here will be ignored if disabledConsoleRecording is true.

      All console methods.
      
      consoleMethodsToRecord: ['log', 'info', 'error']
      
    • OptionaldisableConsoleRecording?: boolean

      Specifies whether the SDK will record console messages.

      false
      
    • OptionalenableLongtaskRecording?: boolean

      Specifies whether to record main-thread longtask entries (>50ms) as long_task.duration histogram samples.

      true
      
    • OptionalenablePerformanceRecording?: boolean

      Specifies whether to record performance metrics (e.g. FPS, device memory).

      true
      
    • OptionalenablePromisePatch?: boolean

      Specifies whether window.Promise should be patched to record the stack trace of promise rejections.

      true
      
    • OptionalenableReportingObserver?: boolean

      Specifies whether to subscribe to the browser Reporting API and emit CSP/intervention reports as errors and deprecation reports as warn logs.

      true
      
    • Optionalenvironment?: "development" | "staging" | "production" | string

      Specifies the environment your application is running in. This is useful to distinguish whether your session was recorded on localhost or in production.

      'production'
      
    • OptionalflagExposureDedupeMaxSize?: number

      The maximum number of unique feature flag exposure keys tracked for deduplication at once. When exceeded, the least recently recorded keys are evicted to bound memory usage.

      2000
      
    • OptionalflagExposureDedupeWindowMillis?: number

      The time window, in milliseconds, during which repeated feature flag evaluations that resolve to the same result are deduplicated, so that only a single feature_flag exposure span is emitted per unique (flag key, value, variation, reason, context) within the window.

      This is useful for reducing exposure volume caused by frequent re-evaluations (for example, React re-renders).

      Set to 0 (the default) to disable deduplication and emit an exposure for every evaluation. Set a positive value to enable it.

      0 (disabled)
      
    • OptionalnetworkRecording?: boolean | NetworkRecordingOptions

      Specifies how and what the SDK records from network requests and responses.

    • Optionalotel?: OtelOptions & { otlpEndpoint?: string }

      OTLP options for OpenTelemetry tracing. Instrumentations are enabled by default.

    • OptionalproductAnalytics?: boolean | ProductAnalyticsEvents

      Specifies whether to record product analytics events.

      true
      
    • OptionalreportConsoleErrors?: boolean

      Specifies whether the SDK will report console.error invocations as Errors.

      false
      
    • OptionaltracingOrigins?: boolean | (string | RegExp)[]

      Specifies where the backend of the app lives. If specified, the SDK will attach the traceparent header 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.

      tracingOrigins: ['localhost', /^//, 'backend.myapp.com']